mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-27 20:39:16 +02:00
* added freepascal helper function
git-svn-id: trunk@14999 -
This commit is contained in:
parent
88f5addd1c
commit
1eb7bb27f1
@ -52,7 +52,9 @@ unit Cairo;
|
||||
|
||||
interface
|
||||
|
||||
Uses CTypes;
|
||||
Uses
|
||||
Classes,
|
||||
CTypes;
|
||||
|
||||
const
|
||||
{$ifdef win32}
|
||||
@ -639,6 +641,10 @@ function cairo_svg_version_to_string(version: cairo_svg_version_t): PChar; cdec
|
||||
|
||||
procedure cairo_debug_reset_static_data; cdecl; external LIB_CAIRO;
|
||||
|
||||
|
||||
(* FreePascal helpers *)
|
||||
function cairo_write_fpstream_func(closure: Pointer; data: PByte; length: LongWord): cairo_status_t; cdecl;
|
||||
|
||||
implementation
|
||||
|
||||
procedure cairo_version(out major, minor, micro: LongInt);
|
||||
@ -651,4 +657,12 @@ begin
|
||||
micro := (version mod ((major * 10000) + (minor * 100)));
|
||||
end;
|
||||
|
||||
function cairo_write_fpstream_func(closure: Pointer; data: PByte; length: LongWord): cairo_status_t; cdecl;
|
||||
var
|
||||
Stream: TStream absolute closure;
|
||||
begin
|
||||
Stream.Write(data^, length);
|
||||
Result := CAIRO_STATUS_SUCCESS;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user