This commit is contained in:
liujianjun 2024-10-22 23:54:28 +08:00
parent ecd035891d
commit f2b0ba4adf
8 changed files with 1885 additions and 358 deletions

View File

@ -0,0 +1,334 @@
type t_cairo_api = class()
{**
@explan(说明)cairo 的c接口函数 %%
**}
///////////////////////////cairo////////////////////////////////
procedure cairo_pattern_destroy(p:pointer);
begin
_f_ := static procedure(p:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(p);
end
function cairo_pattern_create_for_surface(f:pointer):pointer;
begin
_f_ := static function(f:pointer):pointer;cdecl;external get_cairo_func(functionname());
return ##_f_(f);
end
function cairo_create(s:pointer):pointer;
begin
_f_ := static function(s:pointer):pointer;cdecl;external get_cairo_func(functionname());
return ##_f_(s);
end
procedure cairo_save(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_restore(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
function cairo_move_to(cr:pointer;x:double;y:double);
begin
_f_ := static function(cr:pointer;x:double;y:double);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,x,y);
end
function cairo_line_to(cr:pointer;x:double;y:double);
begin
_f_ := static function(cr:pointer;x:double;y:double);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,x,y);
end
procedure cairo_set_source(cr:pointer;s:pointer);
begin
_f_ := static procedure(cr:pointer;s:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,s);
end
function cairo_get_source(cr:pointer):pointer;
begin
_f_ := static function(cr:pointer):pointer;cdecl;external get_cairo_func(functionname());
return ##_f_(cr);
end
procedure cairo_curve_to(cr:pointer;x1:double;y1:double;x2:double;y2:double;x3:double;y3:double);
begin
_f_ := static procedure(cr:pointer;x1:double;y1:double;x2:double;y2:double;x3:double;y3:double);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,x1,y1,x2,y2,x3,y3);
end
procedure cairo_rectangle(c:pointer;x:double;y:double;w:double;h:double);
begin
_f_ := static procedure(c:pointer;x:double;y:double;w:double;h:double);cdecl;external get_cairo_func(functionname());
return ##_f_(c,x,y,w,h);
end
procedure cairo_set_source_rgba(c:pointer;red:double;green:double;blue:double;alpha:double);
begin
_f_ := static procedure(c:pointer;red:double;green:double;blue:double;alpha:double);cdecl;external get_cairo_func(functionname());
return ##_f_(c,red,green,blue,alpha);
end
procedure cairo_set_source_rgb(c:pointer;r:double;g:double;b:double);
begin
_f_ := static procedure(c:pointer;r:double;g:double;b:double);cdecl;external get_cairo_func(functionname());
return ##_f_(c,r,g,b);
end
procedure cairo_set_line_width(c:pointer;w:double);
begin
_f_ := static procedure(c:pointer;w:double);cdecl;external get_cairo_func(functionname());
return ##_f_(c,w);
end
function cairo_get_line_width(c:pointer):double;
begin
_f_ := static function(c:pointer):double;cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_set_line_cap(c:pointer;cp:integer);
begin
_f_ := static procedure(c:pointer;cp:integer);cdecl;external get_cairo_func(functionname());
return ##_f_(c,cp);
end
function cairo_get_line_cap(c:pointer):integer;
begin
_f_ := static function(c:pointer):integer;cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_set_line_join(c:pointer;t:integer);
begin
_f_ := static procedure(c:pointer;t:integer);cdecl;external get_cairo_func(functionname());
return ##_f_(c,t);
end
function cairo_get_line_join(c:pointer):integer;
begin
_f_ := static function(c:pointer):integer;cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
//procedure draw_round_rectangle(c:pointer;x:double;y:double;w:double;h:double;r:double);cdecl;external 'libgtk-3.so';
procedure cairo_arc(cr:pointer; xc:double;yc:double;radius:double;angle1:double;angle2:double);
begin
_f_ := static procedure(cr:pointer; xc:double;yc:double;radius:double;angle1:double;angle2:double);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,xc,yc,radius,angle1,angle2);
end
procedure cairo_translate(cr:pointer;tx:double;ty:double);
begin
_f_ := static procedure(cr:pointer;tx:double;ty:double);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,tx,ty);
end
procedure cairo_rotate(cr:pointer;angle:double);
begin
_f_ := static procedure(cr:pointer;angle:double);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,angle);
end
procedure cairo_scale(cr:pointer;sx:double;sy:double);
begin
_f_ := static procedure(cr:pointer;sx:double;sy:double);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,sx,sy);
end
procedure cairo_set_operator(c:pointer;op:integer);
begin
_f_ := static procedure(c:pointer;op:integer);cdecl;external get_cairo_func(functionname());
return ##_f_(c,op);
end
function cairo_get_operator(c:pointer):integer;
begin
_f_ := static function(c:pointer):integer;cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_set_tolerance(c:pointer;tol:double);
begin
_f_ := static procedure(c:pointer;tol:double);cdecl;external get_cairo_func(functionname());
return ##_f_(c,tol);
end
function cairo_get_tolerance(c:pointer):double;
begin
_f_ := static function(c:pointer):double;cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_destroy(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_close_path(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_set_fill_rule(c:pointer;rul:integer);
begin
_f_ := static procedure(c:pointer;rul:integer);cdecl;external get_cairo_func(functionname());
return ##_f_(c,rul);
end
procedure cairo_clip(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_clip_preserve(c:pointer); //叠加裁剪
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_clip_extents(c:pointer;var x1:double;var y1:double;var x2:double;var y2:double);
begin
_f_ := static procedure(c:pointer;var x1:double;var y1:double;var x2:double;var y2:double);cdecl;external get_cairo_func(functionname());
return ##_f_(c,x1,y1,x2,y2);
end
function cairo_in_clip(c:pointer;x:double;y:double):integer;
begin
_f_ := static function(c:pointer;x:double;y:double):integer;cdecl;external get_cairo_func(functionname());
return ##_f_(c,x,y);
end
procedure cairo_reset_clip(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_stroke(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_stroke_preserve(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_set_dash(c:pointer;dash:array of double;num_dash:integer;offset:double);
begin
_f_ := static procedure(c:pointer;dash:array of double;num_dash:integer;offset:double);cdecl;external get_cairo_func(functionname());
return ##_f_(c,dash,num_dash,offset);
end
procedure cairo_fill(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_fill_preserve(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
procedure cairo_fill_extents(c:pointer;x1:double;y1:double;x2:double;y2:double);
begin
_f_ := static procedure(c:pointer;x1:double;y1:double;x2:double;y2:double);cdecl;external get_cairo_func(functionname());
return ##_f_(c,x1,y1,x2,y2);
end
procedure cairo_paint_with_alpha(c:pointer;alpah:double);
begin
_f_ := static procedure(c:pointer;alpah:double);cdecl;external get_cairo_func(functionname());
return ##_f_(c,alpah);
end
procedure cairo_paint(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(c);
end
//////////////////////text//////// https://developer.gnome.org/cairo/stable/cairo-cairo-font-options-t.html#cairo-font-options-get-hint-metrics
procedure cairo_show_text(c:pointer;t:string);
begin
_f_ := static procedure(c:pointer;t:string);cdecl;external get_cairo_func(functionname());
return ##_f_(c,t);
end
procedure cairo_select_font_face(cr:pointer;n:string;slat:integer;weight:integer);
begin
_f_ := static procedure(cr:pointer;n:string;slat:integer;weight:integer);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,n,slat,weight);
end
procedure cairo_set_font_size(cr:pointer;sz:double);
begin
_f_ := static procedure(cr:pointer;sz:double);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,sz);
end
procedure cairo_text_extents(cr:pointer;s:string;ext:pointer);
begin
_f_ := static procedure(cr:pointer;s:string;ext:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,s,ext);
end
procedure cairo_font_extents(cr:pointer;ext:pointer);
begin
_f_ := static procedure(cr:pointer;ext:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,ext);
end
procedure cairo_get_font_options(cr:pointer;ft:pointer);
begin
_f_ := static procedure(cr:pointer;ft:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,ft);
end
procedure cairo_set_font_options(cr:pointer;ft:pointer);
begin
_f_ := static procedure(cr:pointer;ft:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,ft);
end
function cairo_font_options_create():pointer;
begin
_f_ := static function():pointer;cdecl;external get_cairo_func(functionname());
return ##_f_();
end
procedure cairo_font_options_destroy(op:pointer);
begin
_f_ := static procedure(op:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(op);
end
////////cairo surface//////2
{
CAIRO_FORMAT_INVALID = -1,
CAIRO_FORMAT_ARGB32 = 0,
CAIRO_FORMAT_RGB24 = 1,
CAIRO_FORMAT_A8 = 2,
CAIRO_FORMAT_A1 = 3,
CAIRO_FORMAT_RGB16_565 = 4,
CAIRO_FORMAT_RGB30 = 5
}
function cairo_image_surface_create(t:integer;w:integer;h:integer):pointer;
begin
_f_ := static function(t:integer;w:integer;h:integer):pointer;cdecl;external get_cairo_func(functionname());
return ##_f_(t,w,h);
end
function cairo_image_surface_create_from_png(f:string):pointer;
begin
_f_ := static function(f:string):pointer;cdecl;external get_cairo_func(functionname());
return ##_f_(f);
end
function cairo_image_surface_get_width(sf:pointer):integer;
begin
_f_ := static function(sf:pointer):integer;cdecl;external get_cairo_func(functionname());
return ##_f_(sf);
end
function cairo_image_surface_get_height(sf:pointer):integer;
begin
_f_ := static function(sf:pointer):integer;cdecl;external get_cairo_func(functionname());
return ##_f_(sf);
end
procedure cairo_surface_destroy(sf:pointer);
begin
_f_ := static procedure(sf:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(sf);
end
procedure cairo_set_source_surface(cr:pointer;sf:pointer;x:double;y:double);
begin
_f_ := static procedure(cr:pointer;sf:pointer;x:double;y:double);cdecl;external get_cairo_func(functionname());
return ##_f_(cr,sf,x,y);
end
procedure cairo_pattern_set_extend(c:pointer;pe:integer);
begin
_f_ := static procedure(c:pointer;pe:integer);cdecl;external get_cairo_func(functionname());
return ##_f_(c,pe);
end
function cairo_pattern_create_linear(x0:double;y0:double;x1:double;y1:double):pointer;
begin
_f_ := static function(x0:double;y0:double;x1:double;y1:double):pointer;cdecl;external get_cairo_func(functionname());
return ##_f_(x0,y0,x1,y1);
end
procedure cairo_pattern_add_color_stop_rgb(c:pointer;offset:double;r:double;g:double;b:double;a:double);
begin
_f_ := static procedure(c:pointer;offset:double;r:double;g:double;b:double;a:double);cdecl;external get_cairo_func(functionname());
return ##_f_(c,offset,r,g,b,a);
end
function api_init();
begin
end
protected
class function get_cairo_func(n); /////////////////////////获取cairo 函数指针
begin
return getdlsymaddress("libgtk-3.so.0",n);
end
end

View File

@ -0,0 +1,703 @@
type t_gdiplusflat_api=class() //gdiplus接口
{**
@explan(说明)gdi+ 的c接口函数 %%
**}
(* *************************************************************************\
* Module Name:
* GdiplusFlat.h
************************************************************************* *)
//----------------------------------------------------------------------------
// GraphicsPath APIs
//----------------------------------------------------------------------------
Function GdipCreatePath(brushMode:integer;var path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePath";
Function GdipCreatePath2(pn2:pointer;pn5:pointer;pn7:integer;pn9:integer;var path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePath2";
Function GdipCreatePath2I(pn2:pointer;pn5:pointer;pn7:integer;pn9:integer;var path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePath2I";
Function GdipClonePath(path:pointer;var clonePath:pointer):integer;stdcall;external "gdiplus.dll" name "GdipClonePath";
Function GdipDeletePath(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeletePath";
Function GdipResetPath(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetPath";
Function GdipGetPointCount(path:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPointCount";
Function GdipGetPathTypes(path:pointer;types:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathTypes";
Function GdipGetPathPoints(pn2:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathPoints";
Function GdipGetPathPointsI(pn2:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathPointsI";
Function GdipGetPathFillMode(path:pointer;var fillmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathFillMode";
Function GdipSetPathFillMode(path:pointer;fillmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathFillMode";
Function GdipGetPathData(path:pointer;pathData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathData";
Function GdipStartPathFigure(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipStartPathFigure";
Function GdipClosePathFigure(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipClosePathFigure";
Function GdipClosePathFigures(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipClosePathFigures";
Function GdipSetPathMarker(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathMarker";
Function GdipClearPathMarkers(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipClearPathMarkers";
Function GdipReversePath(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipReversePath";
Function GdipGetPathLastPoint(path:pointer;lastPoint:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathLastPoint";
Function GdipAddPathLine(path:pointer;x1:single;y1:single;x2:single;y2:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathLine";
Function GdipAddPathLine2(path:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathLine2";
Function GdipAddPathArc(path:pointer;x:single;y:single;width:single;height:single;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathArc";
Function GdipAddPathBezier(path:pointer;x1:single;y1:single;x2:single;y2:single;x3:single;y3:single;x4:single;y4:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathBezier";
Function GdipAddPathBeziers(path:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathBeziers";
Function GdipAddPathCurve(path:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurve";
Function GdipAddPathCurve2(path:pointer;points:pointer;ct:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurve2";
Function GdipAddPathCurve3(path:pointer;points:pointer;ct:integer;offset:integer;numberOfSegments:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurve3";
Function GdipAddPathClosedCurve(path:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathClosedCurve";
Function GdipAddPathClosedCurve2(path:pointer;points:pointer;ct:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathClosedCurve2";
Function GdipAddPathRectangle(path:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathRectangle";
Function GdipAddPathRectangles(path:pointer;rects:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathRectangles";
Function GdipAddPathEllipse(path:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathEllipse";
Function GdipAddPathPie(path:pointer;x:single;y:single;width:single;height:single;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathPie";
Function GdipAddPathPolygon(path:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathPolygon";
Function GdipAddPathPath(path:pointer;addingPath:pointer;connect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathPath";
Function GdipAddPathString(path:pointer;string:string;length:integer;family:pointer;style:integer;emSize:single;layoutRect:pointer;format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathString";
Function GdipAddPathStringI(path:pointer;string:string;length:integer;family:pointer;style:integer;emSize:single;layoutRect:pointer;format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathStringI";
Function GdipAddPathLineI(path:pointer;x1:integer;y1:integer;x2:integer;y2:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathLineI";
Function GdipAddPathLine2I(path:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathLine2I";
Function GdipAddPathArcI(path:pointer;x:integer;y:integer;width:integer;height:integer;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathArcI";
Function GdipAddPathBezierI(path:pointer;x1:integer;y1:integer;x2:integer;y2:integer;x3:integer;y3:integer;x4:integer;y4:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathBezierI";
Function GdipAddPathBeziersI(path:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathBeziersI";
Function GdipAddPathCurveI(path:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurveI";
Function GdipAddPathCurve2I(path:pointer;points:pointer;ct:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurve2I";
Function GdipAddPathCurve3I(path:pointer;points:pointer;ct:integer;offset:integer;numberOfSegments:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurve3I";
Function GdipAddPathClosedCurveI(path:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathClosedCurveI";
Function GdipAddPathClosedCurve2I(path:pointer;points:pointer;ct:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathClosedCurve2I";
Function GdipAddPathRectangleI(path:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathRectangleI";
Function GdipAddPathRectanglesI(path:pointer;rects:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathRectanglesI";
Function GdipAddPathEllipseI(path:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathEllipseI";
Function GdipAddPathPieI(path:pointer;x:integer;y:integer;width:integer;height:integer;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathPieI";
Function GdipAddPathPolygonI(path:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathPolygonI";
Function GdipFlattenPath(path:pointer;matrix:pointer;flatness:single):integer;stdcall;external "gdiplus.dll" name "GdipFlattenPath";
Function GdipWindingModeOutline(path:pointer;matrix:pointer;flatness:single):integer;stdcall;external "gdiplus.dll" name "GdipWindingModeOutline";
Function GdipWidenPath(nativePath:pointer;pen:pointer;matrix:pointer;flatness:single):integer;stdcall;external "gdiplus.dll" name "GdipWidenPath";
Function GdipWarpPath(path:pointer;matrix:pointer;points:pointer;ct:integer;srcx:single;srcy:single;srcwidth:single;srcheight:single;warpMode:pointer;flatness:single):integer;stdcall;external "gdiplus.dll" name "GdipWarpPath";
Function GdipTransformPath(path:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTransformPath";
Function GdipGetPathWorldBounds(path:pointer;bounds:pointer;matrix:pointer;pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathWorldBounds";
Function GdipGetPathWorldBoundsI(path:pointer;bounds:pointer;matrix:pointer;pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathWorldBoundsI";
Function GdipIsVisiblePathPoint(path:pointer;x:single;y:single;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisiblePathPoint";
Function GdipIsVisiblePathPointI(path:pointer;x:integer;y:integer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisiblePathPointI";
Function GdipIsOutlineVisiblePathPoint(path:pointer;x:single;y:single;pen:pointer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsOutlineVisiblePathPoint";
Function GdipIsOutlineVisiblePathPointI(path:pointer;x:integer;y:integer;pen:pointer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsOutlineVisiblePathPointI";
//----------------------------------------------------------------------------
// PathIterator APIs
//----------------------------------------------------------------------------
Function GdipCreatePathIter(var iterator:pointer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePathIter";
Function GdipDeletePathIter(iterator:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeletePathIter";
Function GdipPathIterNextSubpath(iterator:pointer;var resultCount:integer;var startIndex:integer;var endIndex:integer;isClosed:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterNextSubpath";
Function GdipPathIterNextSubpathPath(iterator:pointer;var resultCount:integer;path:pointer;isClosed:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterNextSubpathPath";
Function GdipPathIterNextPathType(iterator:pointer;var resultCount:integer;pathType:pointer;var startIndex:integer;var endIndex:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterNextPathType";
Function GdipPathIterNextMarker(iterator:pointer;var resultCount:integer;var startIndex:integer;var endIndex:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterNextMarker";
Function GdipPathIterNextMarkerPath(iterator:pointer;var resultCount:integer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterNextMarkerPath";
Function GdipPathIterGetCount(iterator:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterGetCount";
Function GdipPathIterGetSubpathCount(iterator:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterGetSubpathCount";
Function GdipPathIterIsValid(iterator:pointer;valid:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterIsValid";
Function GdipPathIterHasCurve(iterator:pointer;hasCurve:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterHasCurve";
Function GdipPathIterRewind(iterator:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterRewind";
Function GdipPathIterEnumerate(iterator:pointer;var resultCount:integer;points:pointer;types:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterEnumerate";
Function GdipPathIterCopyData(iterator:pointer;var resultCount:integer;points:pointer;types:pointer;startIndex:integer;endIndex:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterCopyData";
//----------------------------------------------------------------------------
// Matrix APIs
//----------------------------------------------------------------------------
Function GdipCreateMatrix(var matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMatrix";
Function GdipCreateMatrix2(m11:single;m12:single;m21:single;m22:single;dx:single;dy:single;var matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMatrix2";
Function GdipCreateMatrix3(rect:pointer;dstplg:pointer;var matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMatrix3";
Function GdipCreateMatrix3I(rect:pointer;dstplg:pointer;var matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMatrix3I";
Function GdipCloneMatrix(matrix:pointer;var cloneMatrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneMatrix";
Function GdipDeleteMatrix(matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteMatrix";
Function GdipSetMatrixElements(matrix:pointer;m11:single;m12:single;m21:single;m22:single;dx:single;dy:single):integer;stdcall;external "gdiplus.dll" name "GdipSetMatrixElements";
Function GdipMultiplyMatrix(matrix:pointer;matrix2:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyMatrix";
Function GdipTranslateMatrix(matrix:pointer;offsetX:single;offsetY:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateMatrix";
Function GdipScaleMatrix(matrix:pointer;scaleX:single;scaleY:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScaleMatrix";
Function GdipRotateMatrix(matrix:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotateMatrix";
Function GdipShearMatrix(matrix:pointer;shearX:single;shearY:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipShearMatrix";
Function GdipInvertMatrix(matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipInvertMatrix";
Function GdipTransformMatrixPoints(matrix:pointer;pts:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipTransformMatrixPoints";
Function GdipTransformMatrixPointsI(matrix:pointer;pts:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipTransformMatrixPointsI";
Function GdipVectorTransformMatrixPoints(matrix:pointer;pts:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipVectorTransformMatrixPoints";
Function GdipVectorTransformMatrixPointsI(matrix:pointer;pts:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipVectorTransformMatrixPointsI";
Function GdipGetMatrixElements(matrix:pointer; var matrixOut:array of single):integer;stdcall;external "gdiplus.dll" name "GdipGetMatrixElements"; //var matrixOut:single
Function GdipIsMatrixInvertible(matrix:pointer;var result:integer):integer;stdcall;external "gdiplus.dll" name "GdipIsMatrixInvertible";
Function GdipIsMatrixIdentity(matrix:pointer;var result:integer):integer;stdcall;external "gdiplus.dll" name "GdipIsMatrixIdentity";
Function GdipIsMatrixEqual(matrix:pointer;matrix2:pointer;var result:integer):integer;stdcall;external "gdiplus.dll" name "GdipIsMatrixEqual";
//----------------------------------------------------------------------------
// Region APIs
//----------------------------------------------------------------------------
Function GdipCreateRegion(var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegion";
Function GdipCreateRegionRect(rect:pointer;var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegionRect";
Function GdipCreateRegionRectI(rect:pointer;var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegionRectI";
Function GdipCreateRegionPath(path:pointer;var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegionPath";
Function GdipCreateRegionRgnData(regionData:pointer;size:integer;var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegionRgnData";
Function GdipCreateRegionHrgn(hRgn:pointer;var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegionHrgn";
Function GdipCloneRegion(region:pointer;var cloneRegion:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneRegion";
Function GdipDeleteRegion(region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteRegion";
Function GdipSetInfinite(region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetInfinite";
Function GdipSetEmpty(region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetEmpty";
Function GdipCombineRegionRect(region:pointer;rect:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCombineRegionRect";
Function GdipCombineRegionRectI(region:pointer;rect:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCombineRegionRectI";
Function GdipCombineRegionPath(region:pointer;path:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCombineRegionPath";
Function GdipCombineRegionRegion(region:pointer;region2:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCombineRegionRegion";
Function GdipTranslateRegion(region:pointer;dx:single;dy:single):integer;stdcall;external "gdiplus.dll" name "GdipTranslateRegion";
Function GdipTranslateRegionI(region:pointer;dx:integer;dy:integer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateRegionI";
Function GdipTransformRegion(region:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTransformRegion";
Function GdipGetRegionBounds(region:pointer;graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionBounds";
Function GdipGetRegionBoundsI(region:pointer;graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionBoundsI";
Function GdipGetRegionHRgn(region:pointer;graphics:pointer;hRgn:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionHRgn";
Function GdipIsEmptyRegion(region:pointer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsEmptyRegion";
Function GdipIsInfiniteRegion(region:pointer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsInfiniteRegion";
Function GdipIsEqualRegion(region:pointer;region2:pointer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsEqualRegion";
Function GdipGetRegionDataSize(region:pointer;var bufferSize:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionDataSize";
Function GdipGetRegionData(region:pointer;buffer:pointer;bufferSize:integer;sizeFilled:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionData";
Function GdipIsVisibleRegionPoint(region:pointer;x:single;y:single;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRegionPoint";
Function GdipIsVisibleRegionPointI(region:pointer;x:integer;y:integer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRegionPointI";
Function GdipIsVisibleRegionRect(region:pointer;x:single;y:single;width:single;height:single;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRegionRect";
Function GdipIsVisibleRegionRectI(region:pointer;x:integer;y:integer;width:integer;height:integer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRegionRectI";
Function GdipGetRegionScansCount(region:pointer;var ct:integer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionScansCount";
Function GdipGetRegionScans(region:pointer;rects:pointer;var ct:integer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionScans";
Function GdipGetRegionScansI(region:pointer;rects:pointer;var ct:integer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionScansI";
//----------------------------------------------------------------------------
// Brush APIs
//----------------------------------------------------------------------------
Function GdipCloneBrush(brush:pointer;var cloneBrush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneBrush";
Function GdipDeleteBrush(brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteBrush";
Function GdipGetBrushType(brush:pointer;type:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetBrushType";
//----------------------------------------------------------------------------
// HatchBrush APIs
//----------------------------------------------------------------------------
Function GdipCreateHatchBrush(hatchstyle:pointer;forecol:integer;backcol:integer;var brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateHatchBrush";
Function GdipGetHatchStyle(brush:pointer;hatchstyle:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetHatchStyle";
Function GdipGetHatchForegroundColor(brush:pointer;var forecol:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetHatchForegroundColor";
Function GdipGetHatchBackgroundColor(brush:pointer;var backcol:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetHatchBackgroundColor";
//----------------------------------------------------------------------------
// TextureBrush APIs
//----------------------------------------------------------------------------
Function GdipCreateTexture(image:pointer;wrapmode:integer;var texture:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateTexture";
Function GdipCreateTexture2(image:pointer;wrapmode:integer;x:single;y:single;width:single;height:single;var texture:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateTexture2";
Function GdipCreateTextureIA(image:pointer;imageAttributes:pointer;x:single;y:single;width:single;height:single;var texture:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateTextureIA";
Function GdipCreateTexture2I(image:pointer;wrapmode:integer;x:integer;y:integer;width:integer;height:integer;var texture:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateTexture2I";
Function GdipCreateTextureIAI(image:pointer;imageAttributes:pointer;x:integer;y:integer;width:integer;height:integer;var texture:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateTextureIAI";
Function GdipGetTextureTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetTextureTransform";
Function GdipSetTextureTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetTextureTransform";
Function GdipResetTextureTransform(brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetTextureTransform";
Function GdipMultiplyTextureTransform(brush:pointer;matrix:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyTextureTransform";
Function GdipTranslateTextureTransform(brush:pointer;dx:single;dy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateTextureTransform";
Function GdipScaleTextureTransform(brush:pointer;sx:single;sy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScaleTextureTransform";
Function GdipRotateTextureTransform(brush:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotateTextureTransform";
Function GdipSetTextureWrapMode(brush:pointer;wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetTextureWrapMode";
Function GdipGetTextureWrapMode(brush:pointer;var wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetTextureWrapMode";
Function GdipGetTextureImage(brush:pointer;var image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetTextureImage";
//----------------------------------------------------------------------------
// SolidBrush APIs
//----------------------------------------------------------------------------
Function GdipCreateSolidFill(color:integer;var brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateSolidFill";
Function GdipSetSolidFillColor(brush:pointer;color:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetSolidFillColor";
Function GdipGetSolidFillColor(brush:pointer;var color:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetSolidFillColor";
//----------------------------------------------------------------------------
// LineBrush APIs
//----------------------------------------------------------------------------
Function GdipCreateLineBrush(point1:pointer;point2:pointer;color1:integer;color2:integer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrush";
Function GdipCreateLineBrushI(point1:pointer;point2:pointer;color1:integer;color2:integer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrushI";
Function GdipCreateLineBrushFromRect(rect:pointer;color1:integer;color2:integer;mode:pointer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrushFromRect";
Function GdipCreateLineBrushFromRectI(rect:pointer;color1:integer;color2:integer;mode:pointer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrushFromRectI";
Function GdipCreateLineBrushFromRectWithAngle(rect:pointer;color1:integer;color2:integer;angle:single;isAngleScalable:pointer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrushFromRectWithAngle";
Function GdipCreateLineBrushFromRectWithAngleI(rect:pointer;color1:integer;color2:integer;angle:single;isAngleScalable:pointer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrushFromRectWithAngleI";
Function GdipSetLineColors(brush:pointer;color1:integer;color2:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetLineColors";
Function GdipGetLineColors(brush:pointer;var colors:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineColors";
Function GdipGetLineRect(brush:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineRect";
Function GdipGetLineRectI(brush:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineRectI";
Function GdipSetLineGammaCorrection(brush:pointer;useGammaCorrection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetLineGammaCorrection";
Function GdipGetLineGammaCorrection(brush:pointer;useGammaCorrection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineGammaCorrection";
Function GdipGetLineBlendCount(brush:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineBlendCount";
Function GdipGetLineBlend(brush:pointer;var blend:single;var positions:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineBlend";
Function GdipSetLineBlend(brush:pointer;var blend:single;var positions:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetLineBlend";
Function GdipGetLinePresetBlendCount(brush:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLinePresetBlendCount";
Function GdipGetLinePresetBlend(brush:pointer;var blend:integer;var positions:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLinePresetBlend";
Function GdipSetLinePresetBlend(brush:pointer;var blend:integer;var positions:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetLinePresetBlend";
Function GdipSetLineSigmaBlend(brush:pointer;focus:single;scale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetLineSigmaBlend";
Function GdipSetLineLinearBlend(brush:pointer;focus:single;scale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetLineLinearBlend";
Function GdipSetLineWrapMode(brush:pointer;wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetLineWrapMode";
Function GdipGetLineWrapMode(brush:pointer;var wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineWrapMode";
Function GdipGetLineTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineTransform";
Function GdipSetLineTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetLineTransform";
Function GdipResetLineTransform(brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetLineTransform";
Function GdipMultiplyLineTransform(brush:pointer;matrix:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyLineTransform";
Function GdipTranslateLineTransform(brush:pointer;dx:single;dy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateLineTransform";
Function GdipScaleLineTransform(brush:pointer;sx:single;sy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScaleLineTransform";
Function GdipRotateLineTransform(brush:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotateLineTransform";
//----------------------------------------------------------------------------
// PathGradientBrush APIs
//----------------------------------------------------------------------------
Function GdipCreatePathGradient(points:pointer;ct:integer;wrapMode:integer;var polyGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePathGradient";
Function GdipCreatePathGradientI(points:pointer;ct:integer;wrapMode:integer;var polyGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePathGradientI";
Function GdipCreatePathGradientFromPath(path:pointer;var polyGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePathGradientFromPath";
Function GdipGetPathGradientCenterColor(brush:pointer;var colors:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientCenterColor";
Function GdipSetPathGradientCenterColor(brush:pointer;colors:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientCenterColor";
Function GdipGetPathGradientSurroundColorsWithCount(brush:pointer;var color:integer;ct:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientSurroundColorsWithCount";
Function GdipSetPathGradientSurroundColorsWithCount(brush:pointer;var color:integer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientSurroundColorsWithCount";
Function GdipGetPathGradientPath(brush:pointer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientPath";
Function GdipSetPathGradientPath(brush:pointer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientPath";
Function GdipGetPathGradientCenterPoint(brush:pointer;points:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientCenterPoint";
Function GdipGetPathGradientCenterPointI(brush:pointer;points:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientCenterPointI";
Function GdipSetPathGradientCenterPoint(brush:pointer;points:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientCenterPoint";
Function GdipSetPathGradientCenterPointI(brush:pointer;points:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientCenterPointI";
Function GdipGetPathGradientRect(brush:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientRect";
Function GdipGetPathGradientRectI(brush:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientRectI";
Function GdipGetPathGradientPointCount(brush:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientPointCount";
Function GdipGetPathGradientSurroundColorCount(brush:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientSurroundColorCount";
Function GdipSetPathGradientGammaCorrection(brush:pointer;useGammaCorrection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientGammaCorrection";
Function GdipGetPathGradientGammaCorrection(brush:pointer;useGammaCorrection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientGammaCorrection";
Function GdipGetPathGradientBlendCount(brush:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientBlendCount";
Function GdipGetPathGradientBlend(brush:pointer;var blend:single;var positions:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientBlend";
Function GdipSetPathGradientBlend(brush:pointer;var blend:single;var positions:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientBlend";
Function GdipGetPathGradientPresetBlendCount(brush:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientPresetBlendCount";
Function GdipGetPathGradientPresetBlend(brush:pointer;var blend:integer;var positions:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientPresetBlend";
Function GdipSetPathGradientPresetBlend(brush:pointer;var blend:integer;var positions:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientPresetBlend";
Function GdipSetPathGradientSigmaBlend(brush:pointer;focus:single;scale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientSigmaBlend";
Function GdipSetPathGradientLinearBlend(brush:pointer;focus:single;scale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientLinearBlend";
Function GdipGetPathGradientWrapMode(brush:pointer;var wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientWrapMode";
Function GdipSetPathGradientWrapMode(brush:pointer;wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientWrapMode";
Function GdipGetPathGradientTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientTransform";
Function GdipSetPathGradientTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientTransform";
Function GdipResetPathGradientTransform(brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetPathGradientTransform";
Function GdipMultiplyPathGradientTransform(brush:pointer;matrix:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyPathGradientTransform";
Function GdipTranslatePathGradientTransform(brush:pointer;dx:single;dy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslatePathGradientTransform";
Function GdipScalePathGradientTransform(brush:pointer;sx:single;sy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScalePathGradientTransform";
Function GdipRotatePathGradientTransform(brush:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotatePathGradientTransform";
Function GdipGetPathGradientFocusScales(brush:pointer;var xScale:single;var yScale:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientFocusScales";
Function GdipSetPathGradientFocusScales(brush:pointer;xScale:single;yScale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientFocusScales";
//----------------------------------------------------------------------------
// Pen APIs
//----------------------------------------------------------------------------
Function GdipCreatePen1(color:integer;width:single;unit_:integer;var pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePen1";
Function GdipCreatePen2(brush:pointer;width:single;unit_:integer;var pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePen2";
Function GdipClonePen(pen:pointer;var clonepen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipClonePen";
Function GdipDeletePen(pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeletePen";
Function GdipSetPenWidth(pen:pointer;width:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPenWidth";
Function GdipGetPenWidth(pen:pointer;var width:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPenWidth";
Function GdipSetPenUnit(pen:pointer;unit_:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenUnit";
Function GdipGetPenUnit(pen:pointer;unit_:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenUnit";
Function GdipSetPenLineCap197819(pen:pointer;startCap:pointer;endCap:pointer;dashCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenLineCap197819";
Function GdipSetPenStartCap(pen:pointer;startCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenStartCap";
Function GdipSetPenEndCap(pen:pointer;endCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenEndCap";
Function GdipSetPenDashCap197819(pen:pointer;dashCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenDashCap197819";
Function GdipGetPenStartCap(pen:pointer;startCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenStartCap";
Function GdipGetPenEndCap(pen:pointer;endCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenEndCap";
Function GdipGetPenDashCap197819(pen:pointer;dashCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenDashCap197819";
Function GdipSetPenLineJoin(pen:pointer;lineJoin:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenLineJoin";
Function GdipGetPenLineJoin(pen:pointer;lineJoin:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenLineJoin";
Function GdipSetPenCustomStartCap(pen:pointer;customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenCustomStartCap";
Function GdipGetPenCustomStartCap(pen:pointer;var customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenCustomStartCap";
Function GdipSetPenCustomEndCap(pen:pointer;customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenCustomEndCap";
Function GdipGetPenCustomEndCap(pen:pointer;var customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenCustomEndCap";
Function GdipSetPenMiterLimit(pen:pointer;miterLimit:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPenMiterLimit";
Function GdipGetPenMiterLimit(pen:pointer;var miterLimit:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPenMiterLimit";
Function GdipSetPenMode(pen:pointer;penMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenMode";
Function GdipGetPenMode(pen:pointer;penMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenMode";
Function GdipSetPenTransform(pen:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenTransform";
Function GdipGetPenTransform(pen:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenTransform";
Function GdipResetPenTransform(pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetPenTransform";
Function GdipMultiplyPenTransform(pen:pointer;matrix:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyPenTransform";
Function GdipTranslatePenTransform(pen:pointer;dx:single;dy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslatePenTransform";
Function GdipScalePenTransform(pen:pointer;sx:single;sy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScalePenTransform";
Function GdipRotatePenTransform(pen:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotatePenTransform";
Function GdipSetPenColor(pen:pointer;argb:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenColor";
Function GdipGetPenColor(pen:pointer;var argb:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenColor";
Function GdipSetPenBrushFill(pen:pointer;brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenBrushFill";
Function GdipGetPenBrushFill(pen:pointer;var brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenBrushFill";
Function GdipGetPenFillType(pen:pointer;type:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenFillType";
Function GdipGetPenDashStyle(pen:pointer;dashstyle:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenDashStyle";
Function GdipSetPenDashStyle(pen:pointer;dashstyle:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenDashStyle";
Function GdipGetPenDashOffset(pen:pointer;var offset:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPenDashOffset";
Function GdipSetPenDashOffset(pen:pointer;offset:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPenDashOffset";
Function GdipGetPenDashCount(pen:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenDashCount";
Function GdipSetPenDashArray(pen:pointer;var dash:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenDashArray";
Function GdipGetPenDashArray(pen:pointer;var dash:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenDashArray";
Function GdipGetPenCompoundCount(pen:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenCompoundCount";
Function GdipSetPenCompoundArray(pen:pointer;var dash:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenCompoundArray";
Function GdipGetPenCompoundArray(pen:pointer;var dash:single;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenCompoundArray";
//----------------------------------------------------------------------------
// CustomLineCap APIs
//----------------------------------------------------------------------------
Function GdipCreateCustomLineCap(fillPath:pointer;strokePath:pointer;baseCap:pointer;baseInset:single;var customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateCustomLineCap";
Function GdipDeleteCustomLineCap(customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteCustomLineCap";
Function GdipCloneCustomLineCap(customCap:pointer;var clonedCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneCustomLineCap";
Function GdipGetCustomLineCapType(customCap:pointer;capType:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapType";
Function GdipSetCustomLineCapStrokeCaps(customCap:pointer;startCap:pointer;endCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetCustomLineCapStrokeCaps";
Function GdipGetCustomLineCapStrokeCaps(customCap:pointer;startCap:pointer;endCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapStrokeCaps";
Function GdipSetCustomLineCapStrokeJoin(customCap:pointer;lineJoin:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetCustomLineCapStrokeJoin";
Function GdipGetCustomLineCapStrokeJoin(customCap:pointer;lineJoin:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapStrokeJoin";
Function GdipSetCustomLineCapBaseCap(customCap:pointer;baseCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetCustomLineCapBaseCap";
Function GdipGetCustomLineCapBaseCap(customCap:pointer;baseCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapBaseCap";
Function GdipSetCustomLineCapBaseInset(customCap:pointer;inset:single):integer;stdcall;external "gdiplus.dll" name "GdipSetCustomLineCapBaseInset";
Function GdipGetCustomLineCapBaseInset(customCap:pointer;var inset:single):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapBaseInset";
Function GdipSetCustomLineCapWidthScale(customCap:pointer;widthScale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetCustomLineCapWidthScale";
Function GdipGetCustomLineCapWidthScale(customCap:pointer;var widthScale:single):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapWidthScale";
//----------------------------------------------------------------------------
// AdjustableArrowCap APIs
//----------------------------------------------------------------------------
Function GdipCreateAdjustableArrowCap(height:single;width:single;isFilled:pointer;var cap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateAdjustableArrowCap";
Function GdipSetAdjustableArrowCapHeight(cap:pointer;height:single):integer;stdcall;external "gdiplus.dll" name "GdipSetAdjustableArrowCapHeight";
Function GdipGetAdjustableArrowCapHeight(cap:pointer;var height:single):integer;stdcall;external "gdiplus.dll" name "GdipGetAdjustableArrowCapHeight";
Function GdipSetAdjustableArrowCapWidth(cap:pointer;width:single):integer;stdcall;external "gdiplus.dll" name "GdipSetAdjustableArrowCapWidth";
Function GdipGetAdjustableArrowCapWidth(cap:pointer;var width:single):integer;stdcall;external "gdiplus.dll" name "GdipGetAdjustableArrowCapWidth";
Function GdipSetAdjustableArrowCapMiddleInset(cap:pointer;middleInset:single):integer;stdcall;external "gdiplus.dll" name "GdipSetAdjustableArrowCapMiddleInset";
Function GdipGetAdjustableArrowCapMiddleInset(cap:pointer;var middleInset:single):integer;stdcall;external "gdiplus.dll" name "GdipGetAdjustableArrowCapMiddleInset";
Function GdipSetAdjustableArrowCapFillState(cap:pointer;fillState:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetAdjustableArrowCapFillState";
Function GdipGetAdjustableArrowCapFillState(cap:pointer;fillState:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetAdjustableArrowCapFillState";
//----------------------------------------------------------------------------
// Image APIs
//----------------------------------------------------------------------------
Function GdipLoadImageFromStream(stream:pointer;var image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipLoadImageFromStream";
Function GdipLoadImageFromFile(filename:string;var image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipLoadImageFromFile";
Function GdipLoadImageFromStreamICM(stream:pointer;var image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipLoadImageFromStreamICM";
Function GdipLoadImageFromFileICM(filename:string;var image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipLoadImageFromFileICM";
Function GdipCloneImage(image:pointer;var cloneImage:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneImage";
Function GdipDisposeImage(image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDisposeImage";
Function GdipSaveImageToFile(image:pointer;filename:string;clsidEncoder:pointer;encoderParams:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSaveImageToFile";
Function GdipSaveImageToStream(image:pointer;stream:pointer;clsidEncoder:pointer;encoderParams:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSaveImageToStream";
Function GdipSaveAdd(image:pointer;encoderParams:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSaveAdd";
Function GdipSaveAddImage(image:pointer;newImage:pointer;encoderParams:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSaveAddImage";
Function GdipGetImageGraphicsContext(image:pointer;var graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageGraphicsContext";
Function GdipGetImageBounds(image:pointer;srcRect:pointer;srcUnit:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageBounds";
Function GdipGetImageDimension(image:pointer;var width:single;var height:single):integer;stdcall;external "gdiplus.dll" name "GdipGetImageDimension";
Function GdipGetImageType(image:pointer;type:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageType";
Function GdipGetImageWidth(image:pointer;var width:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageWidth";
Function GdipGetImageHeight(image:pointer;var height:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageHeight";
Function GdipGetImageHorizontalResolution(image:pointer;var resolution:single):integer;stdcall;external "gdiplus.dll" name "GdipGetImageHorizontalResolution";
Function GdipGetImageVerticalResolution(image:pointer;var resolution:single):integer;stdcall;external "gdiplus.dll" name "GdipGetImageVerticalResolution";
Function GdipGetImageFlags(image:pointer;var flags:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageFlags";
Function GdipGetImageRawFormat(image:pointer;format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageRawFormat";
Function GdipGetImagePixelFormat(image:pointer;format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImagePixelFormat";
Function GdipGetImageThumbnail(image:pointer;thumbWidth:integer;thumbHeight:integer;var thumbImage:pointer;callback:pointer;callbackData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageThumbnail";
Function GdipGetEncoderParameterListSize(image:pointer;clsidEncoder:pointer;var size:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetEncoderParameterListSize";
Function GdipGetEncoderParameterList(image:pointer;clsidEncoder:pointer;size:integer;buffer:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetEncoderParameterList";
Function GdipImageGetFrameDimensionsCount(image:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipImageGetFrameDimensionsCount";
Function GdipImageGetFrameDimensionsList(image:pointer;dimensionIDs:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipImageGetFrameDimensionsList";
Function GdipImageGetFrameCount(image:pointer;dimensionID:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipImageGetFrameCount";
Function GdipImageSelectActiveFrame(image:pointer;dimensionID:pointer;frameIndex:integer):integer;stdcall;external "gdiplus.dll" name "GdipImageSelectActiveFrame";
Function GdipImageRotateFlip(image:pointer;rfType:pointer):integer;stdcall;external "gdiplus.dll" name "GdipImageRotateFlip";
Function GdipGetImagePalette(image:pointer;palette:pointer;size:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetImagePalette";
Function GdipSetImagePalette(image:pointer;palette:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImagePalette";
Function GdipGetImagePaletteSize(image:pointer;var size:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetImagePaletteSize";
Function GdipGetPropertyCount(image:pointer;var numOfProperty:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPropertyCount";
Function GdipGetPropertyIdList(image:pointer;numOfProperty:integer;list:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPropertyIdList";
Function GdipGetPropertyItemSize(image:pointer;propId:pointer;var size:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPropertyItemSize";
Function GdipGetPropertyItem(image:pointer;propId:pointer;propSize:integer;buffer:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPropertyItem";
Function GdipGetPropertySize(image:pointer;var totalBufferSize:integer;var numProperties:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPropertySize";
Function GdipGetAllPropertyItems(image:pointer;totalBufferSize:integer;numProperties:integer;allItems:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetAllPropertyItems";
Function GdipRemovePropertyItem(image:pointer;propId:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRemovePropertyItem";
Function GdipSetPropertyItem(image:pointer;item:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPropertyItem";
Function GdipImageForceValidation(image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipImageForceValidation";
//----------------------------------------------------------------------------
// Bitmap APIs
//----------------------------------------------------------------------------
Function GdipCreateBitmapFromStream(stream:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromStream";
Function GdipCreateBitmapFromFile(filename:string;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromFile";
Function GdipCreateBitmapFromStreamICM(stream:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromStreamICM";
Function GdipCreateBitmapFromFileICM(filename:string;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromFileICM";
Function GdipCreateBitmapFromScan0(width:integer;height:integer;stride:integer;format:pointer;):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromScan0";
Function GdipCreateBitmapFromGraphics(width:integer;height:integer;target:pointer;var bitmap:pointer):pointer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromGraphics";
Function GdipCreateBitmapFromDirectDrawSurface(surface:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromDirectDrawSurface";
Function GdipCreateBitmapFromGdiDib(gdiBitmapInfo:pointer;gdiBitmapData:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromGdiDib";
Function GdipCreateBitmapFromHBITMAP(hbm:pointer;hpal:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromHBITMAP";
Function GdipCreateHBITMAPFromBitmap(bitmap:pointer;var hbmReturn:pointer;background:integer):integer;stdcall;external "gdiplus.dll" name "GdipCreateHBITMAPFromBitmap";
Function GdipCreateBitmapFromHICON(hicon:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromHICON";
Function GdipCreateHICONFromBitmap(bitmap:pointer;var hbmReturn:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateHICONFromBitmap";
Function GdipCreateBitmapFromResource(hInstance:pointer;lpBitmapName:string;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromResource";
Function GdipCloneBitmapArea(x:single;y:single;width:single;height:single;format:pointer;srcBitmap:pointer;var dstBitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneBitmapArea";
Function GdipCloneBitmapAreaI(x:integer;y:integer;width:integer;height:integer;format:pointer;srcBitmap:pointer;var dstBitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneBitmapAreaI";
Function GdipBitmapLockBits(bitmap:pointer;rect:pointer;flags:integer;format:pointer;lockedBitmapData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBitmapLockBits";
Function GdipBitmapUnlockBits(bitmap:pointer;lockedBitmapData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBitmapUnlockBits";
Function GdipBitmapGetPixel(bitmap:pointer;x:integer;y:integer;var color:integer):integer;stdcall;external "gdiplus.dll" name "GdipBitmapGetPixel";
Function GdipBitmapSetPixel(bitmap:pointer;x:integer;y:integer;color:integer):integer;stdcall;external "gdiplus.dll" name "GdipBitmapSetPixel";
Function GdipBitmapSetResolution(bitmap:pointer;xdpi:single;ydpi:single):integer;stdcall;external "gdiplus.dll" name "GdipBitmapSetResolution";
//----------------------------------------------------------------------------
// ImageAttributes APIs
//----------------------------------------------------------------------------
Function GdipCreateImageAttributes(var imageattr:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateImageAttributes";
Function GdipCloneImageAttributes(imageattr:pointer;var cloneImageattr:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneImageAttributes";
Function GdipDisposeImageAttributes(imageattr:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDisposeImageAttributes";
Function GdipSetImageAttributesToIdentity(imageattr:pointer;type:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesToIdentity";
Function GdipResetImageAttributes(imageattr:pointer;type:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetImageAttributes";
Function GdipSetImageAttributesColorMatrix(imageattr:pointer;type:pointer;enableFlag:pointer;colorMatrix:pointer;grayMatrix:pointer;flags:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesColorMatrix";
Function GdipSetImageAttributesThreshold(imageattr:pointer;type:pointer;enableFlag:pointer;threshold:single):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesThreshold";
Function GdipSetImageAttributesGamma(imageattr:pointer;type:pointer;enableFlag:pointer;gamma:single):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesGamma";
Function GdipSetImageAttributesNoOp(imageattr:pointer;type:pointer;enableFlag:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesNoOp";
Function GdipSetImageAttributesColorKeys(imageattr:pointer;type:pointer;enableFlag:pointer;colorLow:integer;colorHigh:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesColorKeys";
Function GdipSetImageAttributesOutputChannel(imageattr:pointer;type:pointer;enableFlag:pointer;channelFlags:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesOutputChannel";
Function GdipSetImageAttributesOutputChannelColorProfile(imageattr:pointer;type:pointer;enableFlag:pointer;colorProfileFilename:string):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesOutputChannelColorProfile";
Function GdipSetImageAttributesRemapTable(imageattr:pointer;type:pointer;enableFlag:pointer;mapSize:integer;map:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesRemapTable";
Function GdipSetImageAttributesWrapMode(imageAttr:pointer;wrap:pointer;argb:integer;clamp:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesWrapMode";
Function GdipSetImageAttributesICMMode(imageAttr:pointer;on_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesICMMode";
Function GdipGetImageAttributesAdjustedPalette(imageAttr:pointer;colorPalette:pointer;colorAdjustType:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageAttributesAdjustedPalette";
//----------------------------------------------------------------------------
// Graphics APIs
//----------------------------------------------------------------------------
Function GdipFlush(graphics:pointer;intention:pointer):integer;stdcall;external "gdiplus.dll" name "GdipFlush";
Function GdipCreateFromHDC(hdc:pointer;var graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFromHDC";
Function GdipCreateFromHDC2(hdc:pointer;hDevice:pointer;var graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFromHDC2";
Function GdipCreateFromHWND(hwnd:pointer;var graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFromHWND";
Function GdipCreateFromHWNDICM(hwnd:pointer;var graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFromHWNDICM";
Function GdipDeleteGraphics(graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteGraphics";
Function GdipGetDC(graphics:pointer;hdc:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetDC";
Function GdipReleaseDC(graphics:pointer;hdc:pointer):integer;stdcall;external "gdiplus.dll" name "GdipReleaseDC";
Function GdipSetCompositingMode(graphics:pointer;compositingMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetCompositingMode";
Function GdipGetCompositingMode(graphics:pointer;compositingMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCompositingMode";
Function GdipSetRenderingOrigin(graphics:pointer;x:integer;y:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetRenderingOrigin";
Function GdipGetRenderingOrigin(graphics:pointer;var x:integer;var y:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetRenderingOrigin";
Function GdipSetCompositingQuality(graphics:pointer;compositingQuality:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetCompositingQuality";
Function GdipGetCompositingQuality(graphics:pointer;compositingQuality:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCompositingQuality";
Function GdipSetSmoothingMode(graphics:pointer;smoothingMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetSmoothingMode";
Function GdipGetSmoothingMode(graphics:pointer;var smoothingMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetSmoothingMode";
Function GdipSetPixelOffsetMode(graphics:pointer;pixelOffsetMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPixelOffsetMode";
Function GdipGetPixelOffsetMode(graphics:pointer;pixelOffsetMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPixelOffsetMode";
Function GdipSetTextRenderingHint(graphics:pointer;mode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetTextRenderingHint";
Function GdipGetTextRenderingHint(graphics:pointer;var mode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetTextRenderingHint";
Function GdipSetTextContrast(graphics:pointer;contrast:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetTextContrast";
Function GdipGetTextContrast(graphics:pointer;var contrast:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetTextContrast";
Function GdipSetInterpolationMode(graphics:pointer;interpolationMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetInterpolationMode";
Function GdipGetInterpolationMode(graphics:pointer;interpolationMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetInterpolationMode";
Function GdipSetWorldTransform(graphics:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetWorldTransform";
Function GdipResetWorldTransform(graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetWorldTransform";
Function GdipMultiplyWorldTransform(graphics:pointer;matrix:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyWorldTransform";
Function GdipTranslateWorldTransform(graphics:pointer;dx:single;dy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateWorldTransform";
Function GdipScaleWorldTransform(graphics:pointer;sx:single;sy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScaleWorldTransform";
Function GdipRotateWorldTransform(graphics:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotateWorldTransform";
Function GdipGetWorldTransform(graphics:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetWorldTransform";
Function GdipResetPageTransform(graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetPageTransform";
Function GdipGetPageUnit(graphics:pointer;unit_:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPageUnit";
Function GdipGetPageScale(graphics:pointer;var scale:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPageScale";
Function GdipSetPageUnit(graphics:pointer;unit_:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPageUnit";
Function GdipSetPageScale(graphics:pointer;scale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPageScale";
Function GdipGetDpiX(graphics:pointer;var dpi:single):integer;stdcall;external "gdiplus.dll" name "GdipGetDpiX";
Function GdipGetDpiY(graphics:pointer;var dpi:single):integer;stdcall;external "gdiplus.dll" name "GdipGetDpiY";
Function GdipTransformPoints(graphics:pointer;destSpace:pointer;srcSpace:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipTransformPoints";
Function GdipTransformPointsI(graphics:pointer;destSpace:pointer;srcSpace:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipTransformPointsI";
Function GdipGetNearestColor(graphics:pointer;var argb:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetNearestColor";
// Creates the Win9x Halftone Palette (even on NT) with correct Desktop colors
Function GdipCreateHalftonePalette():pointer;stdcall;external "gdiplus.dll" name "GdipCreateHalftonePalette";
Function GdipDrawLine(graphics:pointer;pen:pointer;x1:single;y1:single;x2:single;y2:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawLine";
Function GdipDrawLineI(graphics:pointer;pen:pointer;x1:integer;y1:integer;x2:integer;y2:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawLineI";
Function GdipDrawLines(graphics:pointer;pen:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawLines";
Function GdipDrawLinesI(graphics:pointer;pen:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawLinesI";
Function GdipDrawArc(graphics:pointer;pen:pointer;x:single;y:single;width:single;height:single;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawArc";
Function GdipDrawArcI(graphics:pointer;pen:pointer;x:integer;y:integer;width:integer;height:integer;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawArcI";
Function GdipDrawBezier(graphics:pointer;pen:pointer;x1:single;y1:single;x2:single;y2:single;x3:single;y3:single;x4:single;y4:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawBezier";
Function GdipDrawBezierI(graphics:pointer;pen:pointer;x1:integer;y1:integer;x2:integer;y2:integer;x3:integer;y3:integer;x4:integer;y4:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawBezierI";
Function GdipDrawBeziers(graphics:pointer;pen:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawBeziers";
Function GdipDrawBeziersI(graphics:pointer;pen:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawBeziersI";
Function GdipDrawRectangle(graphics:pointer;pen:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawRectangle";
Function GdipDrawRectangleI(graphics:pointer;pen:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawRectangleI";
Function GdipDrawRectangles(graphics:pointer;pen:pointer;rects:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawRectangles";
Function GdipDrawRectanglesI(graphics:pointer;pen:pointer;rects:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawRectanglesI";
Function GdipDrawEllipse(graphics:pointer;pen:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawEllipse";
Function GdipDrawEllipseI(graphics:pointer;pen:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawEllipseI";
Function GdipDrawPie(graphics:pointer;pen:pointer;x:single;y:single;width:single;height:single;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawPie";
Function GdipDrawPieI(graphics:pointer;pen:pointer;x:integer;y:integer;width:integer;height:integer;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawPieI";
Function GdipDrawPolygon(graphics:pointer;pen:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawPolygon";
Function GdipDrawPolygonI(graphics:pointer;pen:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawPolygonI";
Function GdipDrawPath(graphics:pointer;pen:pointer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawPath";
Function GdipDrawCurve(graphics:pointer;pen:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurve";
Function GdipDrawCurveI(graphics:pointer;pen:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurveI";
Function GdipDrawCurve2(graphics:pointer;pen:pointer;points:pointer;ct:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurve2";
Function GdipDrawCurve2I(graphics:pointer;pen:pointer;points:pointer;ct:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurve2I";
Function GdipDrawCurve3(graphics:pointer;pen:pointer;points:pointer;ct:integer;offset:integer;numberOfSegments:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurve3";
Function GdipDrawCurve3I(graphics:pointer;pen:pointer;points:pointer;ct:integer;offset:integer;numberOfSegments:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurve3I";
Function GdipDrawClosedCurve(graphics:pointer;pen:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawClosedCurve";
Function GdipDrawClosedCurveI(graphics:pointer;pen:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawClosedCurveI";
Function GdipDrawClosedCurve2(graphics:pointer;pen:pointer;points:pointer;ct:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawClosedCurve2";
Function GdipDrawClosedCurve2I(graphics:pointer;pen:pointer;points:pointer;ct:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawClosedCurve2I";
Function GdipGraphicsClear(graphics:pointer;color:integer):integer;stdcall;external "gdiplus.dll" name "GdipGraphicsClear";
Function GdipFillRectangle(graphics:pointer;brush:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipFillRectangle";
Function GdipFillRectangleI(graphics:pointer;brush:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillRectangleI";
Function GdipFillRectangles(graphics:pointer;brush:pointer;rects:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillRectangles";
Function GdipFillRectanglesI(graphics:pointer;brush:pointer;rects:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillRectanglesI";
Function GdipFillPolygon(graphics:pointer;brush:pointer;points:pointer;ct:integer;fillMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillPolygon";
Function GdipFillPolygonI(graphics:pointer;brush:pointer;points:pointer;ct:integer;fillMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillPolygonI";
Function GdipFillPolygon2(graphics:pointer;brush:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillPolygon2";
Function GdipFillPolygon2I(graphics:pointer;brush:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillPolygon2I";
Function GdipFillEllipse(graphics:pointer;brush:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipFillEllipse";
Function GdipFillEllipseI(graphics:pointer;brush:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillEllipseI";
Function GdipFillPie(graphics:pointer;brush:pointer;x:single;y:single;width:single;height:single;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipFillPie";
Function GdipFillPieI(graphics:pointer;brush:pointer;x:integer;y:integer;width:integer;height:integer;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipFillPieI";
Function GdipFillPath(graphics:pointer;brush:pointer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipFillPath";
Function GdipFillClosedCurve(graphics:pointer;brush:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillClosedCurve";
Function GdipFillClosedCurveI(graphics:pointer;brush:pointer;points:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillClosedCurveI";
Function GdipFillClosedCurve2(graphics:pointer;brush:pointer;points:pointer;ct:integer;tension:single;fillMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillClosedCurve2";
Function GdipFillClosedCurve2I(graphics:pointer;brush:pointer;points:pointer;ct:integer;tension:single;fillMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillClosedCurve2I";
Function GdipFillRegion(graphics:pointer;brush:pointer;region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipFillRegion";
Function GdipDrawImage(graphics:pointer;image:pointer;x:single;y:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawImage";
Function GdipDrawImageI(graphics:pointer;image:pointer;x:integer;y:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImageI";
Function GdipDrawImageRect(graphics:pointer;image:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawImageRect";
Function GdipDrawImageRectI(graphics:pointer;image:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImageRectI";
Function GdipDrawImagePoints(graphics:pointer;image:pointer;dstpoints:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImagePoints";
Function GdipDrawImagePointsI(graphics:pointer;image:pointer;dstpoints:pointer;ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImagePointsI";
Function GdipDrawImagePointRect(graphics:pointer;image:pointer;x:single;y:single;srcx:single;srcy:single;srcwidth:single;srcheight:single;srcUnit:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImagePointRect";
Function GdipDrawImagePointRectI(graphics:pointer;image:pointer;x:integer;y:integer;srcx:integer;srcy:integer;srcwidth:integer;srcheight:integer;srcUnit:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImagePointRectI";
Function GdipDrawImageRectRect(graphics:pointer;image:pointer;dstx:single;dsty:single;dstwidth:single;dstheight:single;srcx:single;srcy:single;srcwidth:single;srcheight:single;srcUnit:pointer;imageAttributes:pointer;callback:pointer;callbackData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImageRectRect";
Function GdipDrawImageRectRectI(graphics:pointer;image:pointer;dstx:integer;dsty:integer;dstwidth:integer;dstheight:integer;srcx:integer;srcy:integer;srcwidth:integer;srcheight:integer;srcUnit:pointer;imageAttributes:pointer;callback:pointer;callbackData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImageRectRectI";
Function GdipDrawImagePointsRect(graphics:pointer;image:pointer;points:pointer;ct:integer;srcx:single;srcy:single;srcwidth:single;srcheight:single;srcUnit:pointer;imageAttributes:pointer;callback:pointer;callbackData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImagePointsRect";
Function GdipDrawImagePointsRectI(graphics:pointer;image:pointer;points:pointer;ct:integer;srcx:integer;srcy:integer;srcwidth:integer;srcheight:integer;srcUnit:pointer;imageAttributes:pointer;callback:pointer;callbackData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImagePointsRectI";
Function GdipEnumerateMetafileDestPoint(graphics:pointer;metafile:pointer;destPoint:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestPoint";
Function GdipEnumerateMetafileDestPointI(graphics:pointer;metafile:pointer;destPoint:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestPointI";
Function GdipEnumerateMetafileDestRect(graphics:pointer;metafile:pointer;destRect:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestRect";
Function GdipEnumerateMetafileDestRectI(graphics:pointer;metafile:pointer;destRect:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestRectI";
Function GdipEnumerateMetafileDestPoints(graphics:pointer;metafile:pointer;destPoints:pointer;ct:integer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestPoints";
Function GdipEnumerateMetafileDestPointsI(graphics:pointer;metafile:pointer;destPoints:pointer;ct:integer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestPointsI";
Function GdipEnumerateMetafileSrcRectDestPoint(graphics:pointer;metafile:pointer;destPoint:pointer;srcRect:pointer;srcUnit:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileSrcRectDestPoint";
Function GdipEnumerateMetafileSrcRectDestPointI(graphics:pointer;metafile:pointer;destPoint:pointer;srcRect:pointer;srcUnit:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileSrcRectDestPointI";
Function GdipEnumerateMetafileSrcRectDestRect(graphics:pointer;metafile:pointer;destRect:pointer;srcRect:pointer;srcUnit:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileSrcRectDestRect";
Function GdipEnumerateMetafileSrcRectDestRectI(graphics:pointer;metafile:pointer;destRect:pointer;srcRect:pointer;srcUnit:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileSrcRectDestRectI";
Function GdipEnumerateMetafileSrcRectDestPoints(graphics:pointer;metafile:pointer;destPoints:pointer;ct:integer;srcRect:pointer;srcUnit:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileSrcRectDestPoints";
Function GdipEnumerateMetafileSrcRectDestPointsI(graphics:pointer;metafile:pointer;destPoints:pointer;ct:integer;srcRect:pointer;srcUnit:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileSrcRectDestPointsI";
Function GdipPlayMetafileRecord(metafile:pointer;recordType:pointer;flags:integer;dataSize:integer;data:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPlayMetafileRecord";
Function GdipSetClipGraphics(graphics:pointer;srcgraphics:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipGraphics";
Function GdipSetClipRect(graphics:pointer;x:single;y:single;width:single;height:single;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipRect";
Function GdipSetClipRectI(graphics:pointer;x:integer;y:integer;width:integer;height:integer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipRectI";
Function GdipSetClipPath(graphics:pointer;path:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipPath";
Function GdipSetClipRegion(graphics:pointer;region:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipRegion";
Function GdipSetClipHrgn(graphics:pointer;hRgn:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipHrgn";
Function GdipResetClip(graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetClip";
Function GdipTranslateClip(graphics:pointer;dx:single;dy:single):integer;stdcall;external "gdiplus.dll" name "GdipTranslateClip";
Function GdipTranslateClipI(graphics:pointer;dx:integer;dy:integer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateClipI";
Function GdipGetClip(graphics:pointer;region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetClip";
Function GdipGetClipBounds(graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetClipBounds";
Function GdipGetClipBoundsI(graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetClipBoundsI";
Function GdipIsClipEmpty(graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsClipEmpty";
Function GdipGetVisibleClipBounds(graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetVisibleClipBounds";
Function GdipGetVisibleClipBoundsI(graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetVisibleClipBoundsI";
Function GdipIsVisibleClipEmpty(graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleClipEmpty";
Function GdipIsVisiblePoint(graphics:pointer;x:single;y:single;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisiblePoint";
Function GdipIsVisiblePointI(graphics:pointer;x:integer;y:integer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisiblePointI";
Function GdipIsVisibleRect(graphics:pointer;x:single;y:single;width:single;height:single;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRect";
Function GdipIsVisibleRectI(graphics:pointer;x:integer;y:integer;width:integer;height:integer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRectI";
Function GdipSaveGraphics(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSaveGraphics";
Function GdipRestoreGraphics(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRestoreGraphics";
Function GdipBeginContainer(graphics:pointer;dstrect:pointer;srcrect:pointer;unit_:integer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBeginContainer";
Function GdipBeginContainerI(graphics:pointer;dstrect:pointer;srcrect:pointer;unit_:integer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBeginContainerI";
Function GdipBeginContainer2(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBeginContainer2";
Function GdipEndContainer(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEndContainer";
Function GdipGetMetafileHeaderFromWmf(hWmf:pointer;wmfPlaceableFileHeader:pointer;header:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileHeaderFromWmf";
Function GdipGetMetafileHeaderFromEmf(hEmf:pointer;header:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileHeaderFromEmf";
Function GdipGetMetafileHeaderFromFile(filename:string;header:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileHeaderFromFile";
Function GdipGetMetafileHeaderFromStream(stream:pointer;header:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileHeaderFromStream";
Function GdipGetMetafileHeaderFromMetafile(metafile:pointer;header:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileHeaderFromMetafile";
Function GdipGetHemfFromMetafile(metafile:pointer;hEmf:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetHemfFromMetafile";
Function GdipCreateStreamOnFile(filename:string;access:integer;var stream:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateStreamOnFile";
Function GdipCreateMetafileFromWmf(hWmf:pointer;deleteWmf:pointer;wmfPlaceableFileHeader:pointer;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMetafileFromWmf";
Function GdipCreateMetafileFromEmf(hEmf:pointer;deleteEmf:pointer;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMetafileFromEmf";
Function GdipCreateMetafileFromFile(file:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMetafileFromFile";
Function GdipCreateMetafileFromWmfFile(file:string;wmfPlaceableFileHeader:pointer;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMetafileFromWmfFile";
Function GdipCreateMetafileFromStream(stream:pointer;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMetafileFromStream";
Function GdipRecordMetafile(referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafile";
Function GdipRecordMetafileI(referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafileI";
Function GdipRecordMetafileFileName(fileName:string;referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafileFileName";
Function GdipRecordMetafileFileNameI(fileName:string;referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafileFileNameI";
Function GdipRecordMetafileStream(stream:pointer;referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafileStream";
Function GdipRecordMetafileStreamI(stream:pointer;referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafileStreamI";
Function GdipSetMetafileDownLevelRasterizationLimit(metafile:pointer;metafileRasterizationLimitDpi:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetMetafileDownLevelRasterizationLimit";
Function GdipGetMetafileDownLevelRasterizationLimit(metafile:pointer;var metafileRasterizationLimitDpi:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileDownLevelRasterizationLimit";
Function GdipGetImageDecodersSize(var numDecoders:integer;pn4:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageDecodersSize";
Function GdipGetImageDecoders(numDecoders:integer;size:integer;decoders:pointer):pointer;stdcall;external "gdiplus.dll" name "GdipGetImageDecoders";
Function GdipGetImageEncodersSize(var numEncoders:integer;pn4:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageEncodersSize";
Function GdipGetImageEncoders(numEncoders:integer;size:integer;encoders:pointer):pointer;stdcall;external "gdiplus.dll" name "GdipGetImageEncoders";
Function GdipComment(graphics:pointer;sizeData:integer;data:pointer):integer;stdcall;external "gdiplus.dll" name "GdipComment";
//----------------------------------------------------------------------------
// FontFamily APIs
//----------------------------------------------------------------------------
Function GdipCreateFontFamilyFromName(name:string;fontCollection:pointer;var fontFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFontFamilyFromName";
Function GdipDeleteFontFamily(fontFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteFontFamily";
Function GdipCloneFontFamily(fontFamily:pointer;var clonedFontFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneFontFamily";
Function GdipGetGenericFontFamilySansSerif(var nativeFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetGenericFontFamilySansSerif";
Function GdipGetGenericFontFamilySerif(var nativeFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetGenericFontFamilySerif";
Function GdipGetGenericFontFamilyMonospace(var nativeFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetGenericFontFamilyMonospace";
Function GdipGetFamilyName(family:pointer;name:pointer;language:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetFamilyName";
Function GdipIsStyleAvailable(family:pointer;style:integer;IsStyleAvailable:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsStyleAvailable";
Function GdipFontCollectionEnumerable(fontCollection:pointer;graphics:pointer;var numFound:integer):integer;stdcall;external "gdiplus.dll" name "GdipFontCollectionEnumerable";
Function GdipFontCollectionEnumerate(fontCollection:pointer;numSought:integer;gpfamilies:pointer;var numFound:integer;graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipFontCollectionEnumerate";
Function GdipGetEmHeight(family:pointer;style:integer;EmHeight:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetEmHeight";
Function GdipGetCellAscent(family:pointer;style:integer;CellAscent:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCellAscent";
Function GdipGetCellDescent(family:pointer;style:integer;CellDescent:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCellDescent";
Function GdipGetLineSpacing(family:pointer;style:integer;LineSpacing:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineSpacing";
//----------------------------------------------------------------------------
// Font APIs
//----------------------------------------------------------------------------
Function GdipCreateFontFromDC(hdc:pointer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFontFromDC";
Function GdipCreateFontFromLogfontA(hdc:pointer;logfont:pointer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFontFromLogfontA";
Function GdipCreateFontFromLogfontW(hdc:pointer;logfont:pointer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFontFromLogfontW";
Function GdipCreateFont(fontFamily:pointer;emSize:single;style:integer;unit_:integer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFont";
Function GdipCloneFont(font:pointer;var cloneFont:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneFont";
Function GdipDeleteFont(font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteFont";
Function GdipGetFamily(font:pointer;var family:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetFamily";
Function GdipGetFontStyle(font:pointer;var style:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetFontStyle";
Function GdipGetFontSize(font:pointer;var size:single):integer;stdcall;external "gdiplus.dll" name "GdipGetFontSize";
Function GdipGetFontUnit(font:pointer;unit_:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetFontUnit";
Function GdipGetFontHeight(font:pointer;graphics:pointer;var height:single):integer;stdcall;external "gdiplus.dll" name "GdipGetFontHeight";
Function GdipGetFontHeightGivenDPI(font:pointer;dpi:single;var height:single):integer;stdcall;external "gdiplus.dll" name "GdipGetFontHeightGivenDPI";
Function GdipGetLogFontA(font:pointer;graphics:pointer;logfontA:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLogFontA";
Function GdipGetLogFontW(font:pointer;graphics:pointer;logfontW:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLogFontW";
Function GdipNewInstalledFontCollection(var fontCollection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipNewInstalledFontCollection";
Function GdipNewPrivateFontCollection(var fontCollection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipNewPrivateFontCollection";
Function GdipDeletePrivateFontCollection(var fontCollection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeletePrivateFontCollection";
Function GdipGetFontCollectionFamilyCount(fontCollection:pointer;var numFound:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetFontCollectionFamilyCount";
Function GdipGetFontCollectionFamilyList(fontCollection:pointer;numSought:integer;gpfamilies:pointer;var numFound:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetFontCollectionFamilyList";
Function GdipPrivateAddFontFile(fontCollection:pointer;filename:string):integer;stdcall;external "gdiplus.dll" name "GdipPrivateAddFontFile";
Function GdipPrivateAddMemoryFont(fontCollection:pointer;memory:pointer;length:integer):integer;stdcall;external "gdiplus.dll" name "GdipPrivateAddMemoryFont";
//----------------------------------------------------------------------------
// Text APIs
//----------------------------------------------------------------------------
Function GdipDrawString(graphics:pointer;string:string;length:integer;font:pointer;layoutRect:pointer;stringFormat:pointer;brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawString";
Function GdipMeasureString(graphics:pointer;string:string;length:integer;font:pointer;layoutRect:pointer;stringFormat:pointer;boundingBox:pointer;var codepointsFitted:integer;var linesFilled:integer):integer;stdcall;external "gdiplus.dll" name "GdipMeasureString";
Function GdipMeasureCharacterRanges(graphics:pointer;string:string;length:integer;font:pointer;layoutRect:pointer;stringFormat:pointer;regionCount:integer;var regions:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMeasureCharacterRanges";
Function GdipDrawDriverString(graphics:pointer;text:pointer;length:integer;font:pointer;brush:pointer;positions:pointer;flags:integer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawDriverString";
Function GdipMeasureDriverString(graphics:pointer;text:pointer;length:integer;font:pointer;positions:pointer;flags:integer;matrix:pointer;boundingBox:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMeasureDriverString";
//----------------------------------------------------------------------------
// String format APIs
//----------------------------------------------------------------------------
Function GdipCreateStringFormat(formatAttributes:integer;language:pointer;var format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateStringFormat";
Function GdipStringFormatGetGenericDefault(var format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipStringFormatGetGenericDefault";
Function GdipStringFormatGetGenericTypographic(var format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipStringFormatGetGenericTypographic";
Function GdipDeleteStringFormat(format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteStringFormat";
Function GdipCloneStringFormat(format:pointer;var newFormat:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneStringFormat";
Function GdipSetStringFormatFlags(format:pointer;flags:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatFlags";
Function GdipGetStringFormatFlags(format:pointer;var flags:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatFlags";
Function GdipSetStringFormatAlign(format:pointer;align:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatAlign";
Function GdipGetStringFormatAlign(format:pointer;align:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatAlign";
Function GdipSetStringFormatLineAlign(format:pointer;align:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatLineAlign";
Function GdipGetStringFormatLineAlign(format:pointer;align:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatLineAlign";
Function GdipSetStringFormatTrimming(format:pointer;trimming:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatTrimming";
Function GdipGetStringFormatTrimming(format:pointer;trimming:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatTrimming";
Function GdipSetStringFormatHotkeyPrefix(format:pointer;hotkeyPrefix:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatHotkeyPrefix";
Function GdipGetStringFormatHotkeyPrefix(format:pointer;var hotkeyPrefix:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatHotkeyPrefix";
Function GdipSetStringFormatTabStops(format:pointer;firstTabOffset:single;ct:integer;var tabStops:single):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatTabStops";
Function GdipGetStringFormatTabStops(format:pointer;ct:integer;var firstTabOffset:single;var tabStops:single):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatTabStops";
Function GdipGetStringFormatTabStopCount(format:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatTabStopCount";
Function GdipSetStringFormatDigitSubstitution(format:pointer;language:pointer;substitute:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatDigitSubstitution";
Function GdipGetStringFormatDigitSubstitution(format:pointer;language:pointer;substitute:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatDigitSubstitution";
Function GdipGetStringFormatMeasurableCharacterRangeCount(format:pointer;var ct:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatMeasurableCharacterRangeCount";
Function GdipSetStringFormatMeasurableCharacterRanges(format:pointer;rangeCount:integer;ranges:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatMeasurableCharacterRanges";
//----------------------------------------------------------------------------
// Cached Bitmap APIs
//----------------------------------------------------------------------------
Function GdipCreateCachedBitmap(bitmap:pointer;graphics:pointer;var cachedBitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateCachedBitmap";
Function GdipDeleteCachedBitmap(cachedBitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteCachedBitmap";
Function GdipDrawCachedBitmap(graphics:pointer;cachedBitmap:pointer;x:integer;y:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawCachedBitmap";
Function GdipEmfToWmfBits(hemf:pointer;cbData16:integer;pData16:pointer;iMapMode:integer;eFlags:integer):integer;stdcall;external "gdiplus.dll" name "GdipEmfToWmfBits";
Function GdipSetImageAttributesCachedBackground(imageattr:pointer;enableFlag:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesCachedBackground";
Function GdipTestControl(control:pointer;param:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTestControl";
Function GdiplusNotificationHook(token:pointer):integer;stdcall;external "gdiplus.dll" name "GdiplusNotificationHook";
procedure GdiplusNotificationUnhook(token:pointer);stdcall;external "gdiplus.dll" name "GdiplusNotificationUnhook";
Function GdiplusStartup(var token:pointer;input:pointer;var output:integer){@explan(说明)启动gdi+%%}:integer;stdcall;external "gdiplus.dll" name "GdiplusStartup";
procedure GdiplusShutdown(token:pointer){@explan(说明)关闭gdi+%%};stdcall;external "gdiplus.dll" name "GdiplusShutdown";
function api_init();
begin
uses cstructurelib;
if fisinit then return ;
fisinit := true;
vot := array(
("gdiplusversion","int",1),
("debugeventcallback","int",0),
("suppressbackgroundthread","int",0),
("suppressexternalcodecs","int",0));
og := new ctslctrans(tslarraytocstructcalc(vot));
ftoken :=-1;
ig :=-1;
GdiplusStartup(ftoken,og._getptr_,ig);
end
private
static fisinit;
end

View File

@ -0,0 +1,362 @@
type t_img_op_api=class({$ifdef linux}t_cairo_api{$else}t_gdiplusflat_api{$endif})
{**
@explan(说明)gdi+ 的c接口函数 %%
**}
function create();
begin
api_init();
end
{$ifdef linux}
//20241021 分离出gid+
//20210827 需要添加gdi功能
{
class procedure cairo_pattern_destroy(p:pointer);cdecl;external 'libgtk-3.so';
class function cairo_image_surface_create_from_png(f:string):pointer;cdecl;external 'libgtk-3.so';
class function cairo_pattern_create_for_surface(f:pointer):pointer;cdecl;external 'libgtk-3.so';
class function cairo_image_surface_get_width(sf:pointer):integer;cdecl;external 'libgtk-3.so';
class function cairo_image_surface_get_height(sf:pointer):integer;cdecl;external 'libgtk-3.so';
class function gdk_pixbuf_new_from_file(f:string;er:pointer):pointer;cdecl;external 'libgtk-3.so';
class function gdk_pixbuf_save(pixbuf:pointer;p:string;tp:string;gerr:string;p1:string; p2:string;p3:string;p4:string;p5:string):integer;cdecl;external 'libgtk-3.so';
class procedure gdk_pixbuf_unref(pixbuf);cdecl;external 'libgtk-3.so';
class procedure gdk_pixbuf_ref(pixbuf);cdecl;external 'libgtk-3.so';
class function g_object_ref(g:pointer):pointer;cdecl;external 'libgtk-3.so';
class procedure g_object_unref(g:pointer);cdecl;external 'libgtk-3.so';
}
type TTempFile = class
static fobj_count;
function Create();
begin
fobj_count++;
bp := "/tmp/tinysoft/tslvcl/";
FPath := bp+inttostr(systhreadid())+"_"+tostn(fobj_count);
end
function GetData(buf,f);
begin
if not ifstring(f) then f := FPath;
if fileexists("", f) then
begin
sz := filesize("",f);
return readfile(rwraw(),"",f,0,sz,buf);
end
end
function writedata(buf,f);
begin
if not ifstring(buf) then return 0;
if not ifstring(f) then f := FPath;
if fileexists("",f) then filedelete("",f);
unit(tslvcl).CreateDirWithFileName(f);
return 1=writefile(rwraw(),"",f,0,length(buf),buf);
end
function Destroy();
begin
filedelete("",FPath);
end
property path read FPath ;
private
FPath;
end
function gdk_pixbuf_new_from_file(f:string;er:pointer):pointer;
begin
_f_ := static function(f:string;er:pointer):pointer;cdecl;external get_cairo_func(functionname());
return ##_f_(f,er);
end
function gdk_pixbuf_save(pixbuf:pointer;p:string;tp:string;gerr:string;p1:string; p2:string;p3:string;p4:string;p5:string):integer;
begin
_f_ := static function(pixbuf:pointer;p:string;tp:string;gerr:string;p1:string; p2:string;p3:string;p4:string;p5:string):integer;cdecl;external get_cairo_func(functionname());
return ##_f_(pixbuf,p,tp,gerr,p1,p2,p3,p4,p5);
end
procedure gdk_pixbuf_unref(pixbuf);
begin
_f_ := static procedure(pixbuf);cdecl;external get_cairo_func(functionname());
return ##_f_();
end
procedure gdk_pixbuf_ref(pixbuf);
begin
_f_ := static procedure(pixbuf);cdecl;externalget_cairo_func(functionname());
return ##_f_();
end
function g_object_ref(g:pointer):pointer;
begin
_f_ := static function(g:pointer):pointer;cdecl;external get_cairo_func(functionname());
return ##_f_(g);
end
procedure g_object_unref(g:pointer);
begin
_f_ := static procedure(g:pointer);cdecl;external get_cairo_func(functionname());
return ##_f_(g);
end
function GdipSaveImageToStream(image:pointer;var imgestr:string); //无用到
function GdipLoadImageFromFile(filename:string;var image:pointer); //无用到
begin
r := gdk_pixbuf_new_from_file(filename,0);
if r<>0 then
begin
image := r;
r := 1;
end
return r;
end
function GdipDisposeImage(img); //销毁image
begin
imageunref(img);
end
function GdipSaveImageToFile(image:pointer;filename:string;clsidEncoder:pointer;encoderParams:pointer); //保存
begin
s := unit(cstructurelib).ReadStringFromPtr(clsidEncoder);
//"png","jpeg","bmp","gif","tiff"
case s of
"image/png":
begin
return gdk_pixbuf_save(image,filename,"png",nil,nil,nil,nil,nil,nil)
end
"image/jpeg":
begin
ps := array("quality":"100");
if ifarray(conf) and conf["quality"]>0 and conf["quality"]<=100 then ps["quality"] := inttostr(conf["quality"]);
return gdk_pixbuf_save(image,filename,"jpeg",nil,"quality",ps["quality"],nil,nil,nil);
end
"image/bmp":
begin
return gdk_pixbuf_save(image,filename,"bmp",nil,nil,nil,nil,nil,nil);
end
end
return 0;
end
function GdipCreateHBITMAPFromBitmap(bitmap:pointer;var hbmReturn:pointer;background:integer); //bitmap to hbitmap
begin
hbmReturn := bitmap;
imageref(hbmReturn);
return 1;
end
function GdipCreateBitmapFromHBITMAP(hbm:pointer;hpal:pointer;var bitmap:pointer); // hbitmap to bitmap
begin
bitmap := hbm;
imageref(bitmap);
return 1;
end
function GdipCreateBitmapFromHICON(hicon:pointer;var bitmap:pointer); //bitmap to icon
begin
bitmap := hicon;
imageref(bitmap);
return 1;
end
function GdipCreateHICONFromBitmap(bitmap:pointer;var hbmReturn:pointer); // icon to bitmap
begin
hbmReturn := bitmap;
imageref(hbmReturn);
return 1;
end
function GdipGetbmpSurface(h);
begin
s := GetImageProperty(h,"surface");
if s then return s;
p := GetImageProperty(h,"file");
s := cairo_image_surface_create_from_png(p);
SetImageProperty(h,"surface",s);
return s ;
end
function GdipGetbmppattern(h);
begin
r := GetImageProperty(h,"pattern");
if r then return r;
s := GdipGetbmpSurface(h);
r := cairo_pattern_create_for_surface(s);
SetImageProperty(h,"pattern",r);
return r;
end
function imagetostring(h,vp,conf); //bitamp to str
begin
t := unit(cstructurelib).ReadStringFromPtr(vp._getptr_());
//"png","jpeg","bmp","gif","tiff"
case t of
"image/png":
begin
s := GetImageProperty(h,"pngdata");
if s and ifstring(s) then return s;
tf := new TTempFile();
p := GetImageProperty(h,"file");
tf.GetData(s,p);
SetImageProperty(h,"pngdata",s);
end
"image/jpeg":
begin
s := GetImageProperty(h,"jpegdata");
if s and ifstring(s) then return s;
tf := new TTempFile(p);
p := tf.path;
ps := array("quality":"100");
if ifarray(conf) and conf["quality"]>0 and conf["quality"]<=100 then ps["quality"] := inttostr(conf["quality"]);
if 1<> gdk_pixbuf_save(pixbuf,p,"jpeg",nil,"quality",ps["quality"],nil,nil,nil) then return 0;
tf.GetData(s);
SetImageProperty(h,"jpegdata",s);
end
"image/ico":
begin
s := GetImageProperty(h,"icodata");
if s and ifstring(s) then return s;
tf := new TTempFile(p);
p := tf.path;
ps := array("depth":"32","x_hot":"16","y_hot":"16");
if ifarray(conf) and conf["depth"]>0 and conf["depth"]<=512 then ps["depth"] := inttostr(conf["depth"]);
if ifarray(conf) and conf["x_hot"]>0 and conf["x_hot"]<=128 then ps["x_hot"] := inttostr(conf["x_hot"]);
if ifarray(conf) and conf["y_hot"]>0 and conf["y_hot"]<=128 then ps["y_hot"] := inttostr(conf["y_hot"]);
if 1<> gdk_pixbuf_save(pixbuf,p,"ico","depth",ps["depth"],"x_hot",ps["x_hot"],"y_hot",ps["y_hot"]) then return 0;
tf.GetData(s);
SetImageProperty(h,"icogdata",s);
end
"image/bmp":
begin
s := GetImageProperty(h,"bmpdata");
if s and ifstring(s) then return s;
tf := new TTempFile(p);
p := tf.path;
if 1<> gdk_pixbuf_save(pixbuf,p,"bmp",nil,nil,nil,nil,nil,nil) then return 0;
tf.GetData(s);
SetImageProperty(h,"bmpdata",s);
end
end
return s;
end
function stringtoimage(b,hd); //string to bitmap
begin
tf := new TTempFile(p);
p := tf.path;
if 1<>writefile(rwraw(),"",p,0,length(b),b) then return 0;
hd := gdk_pixbuf_new_from_file(p,0);
if hd then r := 0;
else return -1;
np := getmsgd_Crc32(p);
nnp := "/tmp/tinysoft/tslvcl/"+np[1]+"/"+np[2]+"/"+np+".png";
imageref(hd);
SetImageProperty(hd,"file",nnp);
unit(tslvcl).CreateDirWithFileName(nnp);
gdk_pixbuf_save(hd,nnp,"png",nil,nil,nil,nil,nil,nil);
return r;
end
private
function SetImageProperty(img,p,pv); //保存属性
begin
global g_gtk_images_propertys;
if not ifarray(g_gtk_images_propertys) then g_gtk_images_propertys := array();
return g_gtk_images_propertys[inttostr(img),p] := pv;
end
function GetImageProperty(img,p); //获得属性
begin
global g_gtk_images_propertys;
if not ifarray(g_gtk_images_propertys) then g_gtk_images_propertys := array();
return g_gtk_images_propertys[inttostr(img),p];
end
function imageref(img); // 引用
begin
rf := GetImageProperty(img,"ref");
SetImageProperty(img,"ref",((rf>0)?(rf+1):(1)));
g_object_ref(img);
end
function imageunref(img); //反引用
begin
rf := GetImageProperty(img,"ref");
if ifnil(rf) then return ;
if rf<=1 then
begin
return DeleteImages(img);
end
else SetImageProperty(img,"ref",rf-1);
end
function DeleteImages(img); //删除
begin
global g_gtk_images_propertys;
if not ifarray(g_gtk_images_propertys) then return ;
id := inttostr(img);
idfile := g_gtk_images_propertys[id,"file"];
if not idfile then return ;
if fileexists("",idfile) then //删除文件
begin
filedelete("",idfile);
end
pt := GetImageProperty(img,"pattern");
if pt then
begin
cairo_pattern_destroy(pt); //移除pattern
end
sf := GetImageProperty(img,"surface");
if sf then
begin
//cairo_surface_destroy(sf); //移除surface
end
reindex(g_gtk_images_propertys,array(id:nil));
g_object_unref(img);
end
{$else}
//stream 处理
type inukownvtb = class(tslcstructureobj)
uses cstructurelib;
function create(ptr);
begin
p := get_mem_mgr().readptr(ptr);
struct := MemoryAlignmentCalculate(get_vtb_struct());
inherited create(struct,p);
end
function Release(s);
begin
ptr := _getvalue_("Release");
_f_ := function (s:pointer):integer;stdcall; external ptr;
r := ##_f_(s);
return r;
end
protected
function get_vtb_struct();virtual;
begin
return array(
("QueryInterface","intptr",0),
("AddRef","intptr",0),
("Release","intptr",0)
);
end
end
function imagetostring(h,vp,conf);
begin
CreateStreamOnHGlobal(0,true,st);
r := GdipSaveImageToStream(h,st,vp._getptr_,0);
if r<>0 then exit;
GetHGlobalFromStream(st,memo);
len := GlobalSize(memo);
s := "";
lm := GlobalLock(memo);
setlength(s,len);
memcpy2(s,lm,len);
tuicloseistream(st);
return s;
end
function stringtoimage(b,hd);
begin
len := length(b);
hm := GlobalAlloc(2,len+1);//分配内容
lm := GlobalLock(hm);//枷锁
if lm <> 0 then
begin
memcpy(lm,b,len);//内存拷贝
GlobalUnlock(hm);//解锁
end
CreateStreamOnHGlobal(hm,true,st);
r := GdipLoadImageFromStream(st,hd);
tuicloseistream(st);
return r;
end
function CreateStreamOnHGlobal(hGlobal:pointer;fDeleteOnRelease:integer; var ppstm:pointer):pointer;stdcall;external "Ole32.dll" name "CreateStreamOnHGlobal";
function GetHGlobalFromStream(pstm:pointer; var phglobal:pointer):pointer;stdcall;external "Ole32.dll" name "GetHGlobalFromStream";
function GlobalLock(mem :pointer):pointer;stdcall;external "Kernel32.dll" name "GlobalLock";
function GlobalUnlock(mem :pointer):integer;stdcall;external "Kernel32.dll" name "GlobalUnlock";
function GlobalSize(menm:pointer):integer;stdcall;external "Kernel32.dll" name "GlobalSize";
function memcpy(dst:pointer;src:string;size_t:integer):pointer;cdecl;external "msvcrt.dll" name "memcpy";
function memcpy2(var dst:string;src:pointer;size_t:integer):pointer;cdecl;external "msvcrt.dll" name "memcpy";
function tuicloseistream(sm:pointer);
begin
o := new inukownvtb(sm);
return o.release(sm);
end
function GlobalAlloc(uFlags :integer;dwBytes:integer):pointer;stdcall;external "Kernel32.dll" name "GlobalAlloc";
{$endif}
end

View File

@ -714,14 +714,14 @@ type TGdiplusflat=class()
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Pen APIs // Pen APIs
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
class Function GdipCreatePen1(color:integer;width:single;unit_:pointer;var pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePen1"; class Function GdipCreatePen1(color:integer;width:single;unit_:integer;var pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePen1";
class Function GdipCreatePen2(brush:pointer;width:single;unit_:pointer;var pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePen2"; class Function GdipCreatePen2(brush:pointer;width:single;unit_:integer;var pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePen2";
class Function GdipClonePen(pen:pointer;var clonepen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipClonePen"; class Function GdipClonePen(pen:pointer;var clonepen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipClonePen";
class Function GdipDeletePen(pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeletePen"; class Function GdipDeletePen(pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeletePen";
class Function GdipSetPenWidth(pen:pointer;width:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPenWidth"; class Function GdipSetPenWidth(pen:pointer;width:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPenWidth";
class Function GdipGetPenWidth(pen:pointer;var width:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPenWidth"; class Function GdipGetPenWidth(pen:pointer;var width:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPenWidth";
class Function GdipSetPenUnit(pen:pointer;unit_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenUnit"; class Function GdipSetPenUnit(pen:pointer;unit_:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenUnit";
class Function GdipGetPenUnit(pen:pointer;unit_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenUnit"; class Function GdipGetPenUnit(pen:pointer;unit_:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenUnit";
class Function GdipSetPenLineCap197819(pen:pointer;startCap:pointer;endCap:pointer;dashCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenLineCap197819"; class Function GdipSetPenLineCap197819(pen:pointer;startCap:pointer;endCap:pointer;dashCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenLineCap197819";
class Function GdipSetPenStartCap(pen:pointer;startCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenStartCap"; class Function GdipSetPenStartCap(pen:pointer;startCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenStartCap";
class Function GdipSetPenEndCap(pen:pointer;endCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenEndCap"; class Function GdipSetPenEndCap(pen:pointer;endCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenEndCap";
@ -911,9 +911,9 @@ type TGdiplusflat=class()
class Function GdipRotateWorldTransform(graphics:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotateWorldTransform"; class Function GdipRotateWorldTransform(graphics:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotateWorldTransform";
class Function GdipGetWorldTransform(graphics:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetWorldTransform"; class Function GdipGetWorldTransform(graphics:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetWorldTransform";
class Function GdipResetPageTransform(graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetPageTransform"; class Function GdipResetPageTransform(graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetPageTransform";
class Function GdipGetPageUnit(graphics:pointer;unit_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPageUnit"; class Function GdipGetPageUnit(graphics:pointer;unit_:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPageUnit";
class Function GdipGetPageScale(graphics:pointer;var scale:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPageScale"; class Function GdipGetPageScale(graphics:pointer;var scale:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPageScale";
class Function GdipSetPageUnit(graphics:pointer;unit_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPageUnit"; class Function GdipSetPageUnit(graphics:pointer;unit_:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPageUnit";
class Function GdipSetPageScale(graphics:pointer;scale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPageScale"; class Function GdipSetPageScale(graphics:pointer;scale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPageScale";
class Function GdipGetDpiX(graphics:pointer;var dpi:single):integer;stdcall;external "gdiplus.dll" name "GdipGetDpiX"; class Function GdipGetDpiX(graphics:pointer;var dpi:single):integer;stdcall;external "gdiplus.dll" name "GdipGetDpiX";
class Function GdipGetDpiY(graphics:pointer;var dpi:single):integer;stdcall;external "gdiplus.dll" name "GdipGetDpiY"; class Function GdipGetDpiY(graphics:pointer;var dpi:single):integer;stdcall;external "gdiplus.dll" name "GdipGetDpiY";
@ -1019,8 +1019,8 @@ type TGdiplusflat=class()
class Function GdipIsVisibleRectI(graphics:pointer;x:integer;y:integer;width:integer;height:integer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRectI"; class Function GdipIsVisibleRectI(graphics:pointer;x:integer;y:integer;width:integer;height:integer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRectI";
class Function GdipSaveGraphics(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSaveGraphics"; class Function GdipSaveGraphics(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSaveGraphics";
class Function GdipRestoreGraphics(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRestoreGraphics"; class Function GdipRestoreGraphics(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRestoreGraphics";
class Function GdipBeginContainer(graphics:pointer;dstrect:pointer;srcrect:pointer;unit_:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBeginContainer"; class Function GdipBeginContainer(graphics:pointer;dstrect:pointer;srcrect:pointer;unit_:integer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBeginContainer";
class Function GdipBeginContainerI(graphics:pointer;dstrect:pointer;srcrect:pointer;unit_:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBeginContainerI"; class Function GdipBeginContainerI(graphics:pointer;dstrect:pointer;srcrect:pointer;unit_:integer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBeginContainerI";
class Function GdipBeginContainer2(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBeginContainer2"; class Function GdipBeginContainer2(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBeginContainer2";
class Function GdipEndContainer(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEndContainer"; class Function GdipEndContainer(graphics:pointer;state:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEndContainer";
class Function GdipGetMetafileHeaderFromWmf(hWmf:pointer;wmfPlaceableFileHeader:pointer;header:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileHeaderFromWmf"; class Function GdipGetMetafileHeaderFromWmf(hWmf:pointer;wmfPlaceableFileHeader:pointer;header:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileHeaderFromWmf";
@ -1071,13 +1071,13 @@ type TGdiplusflat=class()
class Function GdipCreateFontFromDC(hdc:pointer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFontFromDC"; class Function GdipCreateFontFromDC(hdc:pointer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFontFromDC";
class Function GdipCreateFontFromLogfontA(hdc:pointer;logfont:pointer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFontFromLogfontA"; class Function GdipCreateFontFromLogfontA(hdc:pointer;logfont:pointer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFontFromLogfontA";
class Function GdipCreateFontFromLogfontW(hdc:pointer;logfont:pointer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFontFromLogfontW"; class Function GdipCreateFontFromLogfontW(hdc:pointer;logfont:pointer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFontFromLogfontW";
class Function GdipCreateFont(fontFamily:pointer;emSize:single;style:integer;unit_:pointer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFont"; class Function GdipCreateFont(fontFamily:pointer;emSize:single;style:integer;unit_:integer;var font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFont";
class Function GdipCloneFont(font:pointer;var cloneFont:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneFont"; class Function GdipCloneFont(font:pointer;var cloneFont:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneFont";
class Function GdipDeleteFont(font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteFont"; class Function GdipDeleteFont(font:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteFont";
class Function GdipGetFamily(font:pointer;var family:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetFamily"; class Function GdipGetFamily(font:pointer;var family:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetFamily";
class Function GdipGetFontStyle(font:pointer;var style:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetFontStyle"; class Function GdipGetFontStyle(font:pointer;var style:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetFontStyle";
class Function GdipGetFontSize(font:pointer;var size:single):integer;stdcall;external "gdiplus.dll" name "GdipGetFontSize"; class Function GdipGetFontSize(font:pointer;var size:single):integer;stdcall;external "gdiplus.dll" name "GdipGetFontSize";
class Function GdipGetFontUnit(font:pointer;unit_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetFontUnit"; class Function GdipGetFontUnit(font:pointer;unit_:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetFontUnit";
class Function GdipGetFontHeight(font:pointer;graphics:pointer;var height:single):integer;stdcall;external "gdiplus.dll" name "GdipGetFontHeight"; class Function GdipGetFontHeight(font:pointer;graphics:pointer;var height:single):integer;stdcall;external "gdiplus.dll" name "GdipGetFontHeight";
class Function GdipGetFontHeightGivenDPI(font:pointer;dpi:single;var height:single):integer;stdcall;external "gdiplus.dll" name "GdipGetFontHeightGivenDPI"; class Function GdipGetFontHeightGivenDPI(font:pointer;dpi:single;var height:single):integer;stdcall;external "gdiplus.dll" name "GdipGetFontHeightGivenDPI";
class Function GdipGetLogFontA(font:pointer;graphics:pointer;logfontA:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLogFontA"; class Function GdipGetLogFontA(font:pointer;graphics:pointer;logfontA:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLogFontA";
@ -1107,10 +1107,10 @@ type TGdiplusflat=class()
class Function GdipCloneStringFormat(format:pointer;var newFormat:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneStringFormat"; class Function GdipCloneStringFormat(format:pointer;var newFormat:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneStringFormat";
class Function GdipSetStringFormatFlags(format:pointer;flags:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatFlags"; class Function GdipSetStringFormatFlags(format:pointer;flags:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatFlags";
class Function GdipGetStringFormatFlags(format:pointer;var flags:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatFlags"; class Function GdipGetStringFormatFlags(format:pointer;var flags:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatFlags";
class Function GdipSetStringFormatAlign(format:pointer;align:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatAlign"; class Function GdipSetStringFormatAlign(format:pointer;align:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatAlign";
class Function GdipGetStringFormatAlign(format:pointer;align:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatAlign"; class Function GdipGetStringFormatAlign(format:pointer;align:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatAlign";
class Function GdipSetStringFormatLineAlign(format:pointer;align:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatLineAlign"; class Function GdipSetStringFormatLineAlign(format:pointer;align:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatLineAlign";
class Function GdipGetStringFormatLineAlign(format:pointer;align:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatLineAlign"; class Function GdipGetStringFormatLineAlign(format:pointer;align:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatLineAlign";
class Function GdipSetStringFormatTrimming(format:pointer;trimming:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatTrimming"; class Function GdipSetStringFormatTrimming(format:pointer;trimming:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatTrimming";
class Function GdipGetStringFormatTrimming(format:pointer;trimming:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatTrimming"; class Function GdipGetStringFormatTrimming(format:pointer;trimming:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatTrimming";
class Function GdipSetStringFormatHotkeyPrefix(format:pointer;hotkeyPrefix:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatHotkeyPrefix"; class Function GdipSetStringFormatHotkeyPrefix(format:pointer;hotkeyPrefix:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatHotkeyPrefix";

View File

@ -1127,12 +1127,13 @@ type tsgtkapi = class(tgtkapis)
begin begin
sy := rec[3]-3-ht; sy := rec[3]-3-ht;
end end
dht := max(ht-20,0)*0.08;//处理字体过大可能被覆盖的问题 20241012
cairo_save(hdc); cairo_save(hdc);
x := gtk_object_get_data(hdc,"viewport.x"); x := gtk_object_get_data(hdc,"viewport.x");
y := gtk_object_get_data(hdc,"viewport.y"); y := gtk_object_get_data(hdc,"viewport.y");
reci := array(rec[0]+x,rec[1]+y,rec[2]+x,rec[3]+y); reci := array(rec[0]+x,rec[1]+y,rec[2]+x,rec[3]+y);
cairo_clip_rec(hdc,reci); cairo_clip_rec(hdc,reci);
r := TextOutexA(hdc,sx,sy,txt,slen); r := TextOutexA(hdc,sx,sy-dht,txt,slen);
cairo_restore(hdc); cairo_restore(hdc);
return r; return r;
end end
@ -1319,7 +1320,7 @@ type tsgtkapi = class(tgtkapis)
function DeleteObject(gdiobj :pointer);//ɾ³ýgdi¶ÔÏó function DeleteObject(gdiobj :pointer);//ɾ³ýgdi¶ÔÏó
begin begin
global gtk_gdi_object_globals; global gtk_gdi_object_globals,g_cairo_api;
gdiindex := inttostr( gdiobj); gdiindex := inttostr( gdiobj);
r := gtk_gdi_object_globals[gdiindex]; r := gtk_gdi_object_globals[gdiindex];
if r then if r then
@ -1328,7 +1329,7 @@ type tsgtkapi = class(tgtkapis)
reindex(gtk_gdi_object_globals,array(inttostr(gdiobj):nil)); reindex(gtk_gdi_object_globals,array(inttostr(gdiobj):nil));
return true; return true;
end end
class(TGdiplusflat).GdipDisposeImage(gdiobj); g_cairo_api.GdipDisposeImage(gdiobj);
return 0; return 0;
end end
function DestroyIcon(icon:pointer):integer; function DestroyIcon(icon:pointer):integer;
@ -2231,10 +2232,11 @@ type tsgtkapi = class(tgtkapis)
end end
function drawbitmaptodc(bm,hdc,x,y,rc,flag,thdc); function drawbitmaptodc(bm,hdc,x,y,rc,flag,thdc);
begin begin
global g_cairo_api;
if not hdc then return ; if not hdc then return ;
xb := gtk_object_get_data(hdc,"viewport.x"); xb := gtk_object_get_data(hdc,"viewport.x");
yb := gtk_object_get_data(hdc,"viewport.y"); yb := gtk_object_get_data(hdc,"viewport.y");
img := class(TGdiplusflat).GdipGetbmpSurface(bm); img := g_cairo_api.GdipGetbmpSurface(bm);
//cairo_set_source(hdc, img); //cairo_set_source(hdc, img);
//cairo_pattern_set_extend(cairo_get_source(hdc),1); //cairo_pattern_set_extend(cairo_get_source(hdc),1);
cairo_set_source_surface(hdc, img, x-rc[0], y-rc[1]); cairo_set_source_surface(hdc, img, x-rc[0], y-rc[1]);
@ -2258,10 +2260,11 @@ type tsgtkapi = class(tgtkapis)
end end
function drawbitmapstretchtodc(bm,hdc,drect,rc,flag,thdc); function drawbitmapstretchtodc(bm,hdc,drect,rc,flag,thdc);
begin begin
global g_cairo_api;
if not hdc then return ; if not hdc then return ;
xb := gtk_object_get_data(hdc,"viewport.x"); xb := gtk_object_get_data(hdc,"viewport.x");
yb := gtk_object_get_data(hdc,"viewport.y"); yb := gtk_object_get_data(hdc,"viewport.y");
img := class(TGdiplusflat).GdipGetbmpSurface(bm); img := g_cairo_api.GdipGetbmpSurface(bm);
if not img then return ; if not img then return ;
x := drect[0]; x := drect[0];
y := drect[1]; y := drect[1];
@ -2289,10 +2292,11 @@ type tsgtkapi = class(tgtkapis)
end end
function DrawIcon(hDC:pointer;X:integer;Y:integer;hIcon:pointer):integer; function DrawIcon(hDC:pointer;X:integer;Y:integer;hIcon:pointer):integer;
begin begin
global g_cairo_api;
if not hdc then return ; if not hdc then return ;
xb := gtk_object_get_data(hdc,"viewport.x"); xb := gtk_object_get_data(hdc,"viewport.x");
yb := gtk_object_get_data(hdc,"viewport.y"); yb := gtk_object_get_data(hdc,"viewport.y");
img := class(TGdiplusflat).GdipGetbmpSurface(hIcon); img := g_cairo_api.GdipGetbmpSurface(hIcon);
if not img then return 0; if not img then return 0;
cairo_set_source_surface(hdc, img, x+xb, y+yb); cairo_set_source_surface(hdc, img, x+xb, y+yb);
cairo_paint(hdc); cairo_paint(hdc);
@ -2301,6 +2305,7 @@ type tsgtkapi = class(tgtkapis)
//////////////////////imagelist///////////////////////////////////////////////////////////////////////// //////////////////////imagelist/////////////////////////////////////////////////////////////////////////
function ImageList_Add(himl:pointer;hbmImage:pointer; hbmMask:pointer):integer; function ImageList_Add(himl:pointer;hbmImage:pointer; hbmMask:pointer):integer;
begin begin
global g_cairo_api;
if not(himl>0 or himl<0) then return 0; if not(himl>0 or himl<0) then return 0;
if not(hbmImage>0 or hbmImage<0) then return 0; if not(hbmImage>0 or hbmImage<0) then return 0;
global g_image_list_caches ; global g_image_list_caches ;
@ -2308,7 +2313,7 @@ type tsgtkapi = class(tgtkapis)
sptr := inttostr(himl); sptr := inttostr(himl);
obj := g_image_list_caches[sptr,"imglist"] ; obj := g_image_list_caches[sptr,"imglist"] ;
if not obj then return ; if not obj then return ;
class(TGdiplusflat).GdipCreateBitmapFromHBITMAP(hbmImage,r1,0); g_cairo_api.GdipCreateBitmapFromHBITMAP(hbmImage,r1,0);
cbmp := class(tUIglobalData).uigetdata("G_T_BITMAP_"); cbmp := class(tUIglobalData).uigetdata("G_T_BITMAP_");
if cbmp then if cbmp then
begin begin
@ -2420,7 +2425,8 @@ type tsgtkapi = class(tgtkapis)
reindex(g_image_list_caches,array(inttostr(himl):nil)); reindex(g_image_list_caches,array(inttostr(himl):nil));
end end
function ImageList_Replace(himl:pointer;id:integer;hbmImage:pointer; hbmMask:pointer):integer; function ImageList_Replace(himl:pointer;id:integer;hbmImage:pointer; hbmMask:pointer):integer;
begin begin
global g_cairo_api;
if not(himl>0 or himl<0) then return 0; if not(himl>0 or himl<0) then return 0;
if not(hbmImage>0 or hbmImage<0) then return 0; if not(hbmImage>0 or hbmImage<0) then return 0;
global g_image_list_caches ; global g_image_list_caches ;
@ -2429,7 +2435,7 @@ type tsgtkapi = class(tgtkapis)
if not obj then return ; if not obj then return ;
cbmp := class(tUIglobalData).uigetdata("G_T_BITMAP_"); cbmp := class(tUIglobalData).uigetdata("G_T_BITMAP_");
if not cbmp then return 0; if not cbmp then return 0;
class(TGdiplusflat).GdipCreateBitmapFromHBITMAP(hbmImage,0,r1); g_cairo_api.GdipCreateBitmapFromHBITMAP(hbmImage,0,r1);
bmp := createobject(cbmp); bmp := createobject(cbmp);
bmp.Handle := r1; bmp.Handle := r1;
if id=-1 then obj.Push(bmp); if id=-1 then obj.Push(bmp);
@ -3253,7 +3259,7 @@ type tmenuitemobject = class(tgtk_ctl_object) //gtk
//echo "\r\nmenu destroyed"; //echo "\r\nmenu destroyed";
end end
end end
type tgtkapis = class() //gtk¶ÔÏóapi½Ó¿Ú type tgtkapis = class(t_cairo_api) //gtk对象api接口
function gtk_object_set_data(h,n,v); //±£´æÊý¾Ý function gtk_object_set_data(h,n,v); //±£´æÊý¾Ý
begin begin
if not(h>0 or h<0) then return 0; if not(h>0 or h<0) then return 0;
@ -3784,6 +3790,12 @@ type tgtkapis = class() //gtk
end end
return r; return r;
end end
/////////////////////cairo gtk//////////////////////////////
function gdk_cairo_create(w:pointer):pointer;
begin
_f_ := static function(w:pointer):pointer;cdecl;external get_cairo_func(functionname());
return ##_f_(w);
end
//////////////////////////clipboard///////////////////// //////////////////////////clipboard/////////////////////
procedure gtk_clipboard_set_text(c:pointer;s:string;len:integer); procedure gtk_clipboard_set_text(c:pointer;s:string;len:integer);
begin begin
@ -4806,219 +4818,7 @@ type tgtkapis = class() //gtk
end end
return r; return r;
end end
////////////////////cairo ext////////////////////////////
///////////////////////////cairo////////////////////////////////
function cairo_create(s:pointer):pointer;
begin
_f_ := static function(s:pointer):pointer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(s);
end
procedure cairo_save(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_restore(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
function gdk_cairo_create(w:pointer):pointer;
begin
_f_ := static function(w:pointer):pointer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(w);
end
function cairo_move_to(cr:pointer;x:double;y:double);
begin
_f_ := static function(cr:pointer;x:double;y:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,x,y);
end
function cairo_line_to(cr:pointer;x:double;y:double);
begin
_f_ := static function(cr:pointer;x:double;y:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,x,y);
end
procedure cairo_set_source(cr:pointer;s:pointer);
begin
_f_ := static procedure(cr:pointer;s:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,s);
end
function cairo_get_source(cr:pointer):pointer;
begin
_f_ := static function(cr:pointer):pointer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr);
end
procedure cairo_curve_to(cr:pointer;x1:double;y1:double;x2:double;y2:double;x3:double;y3:double);
begin
_f_ := static procedure(cr:pointer;x1:double;y1:double;x2:double;y2:double;x3:double;y3:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,x1,y1,x2,y2,x3,y3);
end
procedure cairo_rectangle(c:pointer;x:double;y:double;w:double;h:double);
begin
_f_ := static procedure(c:pointer;x:double;y:double;w:double;h:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,x,y,w,h);
end
procedure cairo_set_source_rgba(c:pointer;red:double;green:double;blue:double;alpha:double);
begin
_f_ := static procedure(c:pointer;red:double;green:double;blue:double;alpha:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,red,green,blue,alpha);
end
procedure cairo_set_source_rgb(c:pointer;r:double;g:double;b:double);
begin
_f_ := static procedure(c:pointer;r:double;g:double;b:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,r,g,b);
end
procedure cairo_set_line_width(c:pointer;w:double);
begin
_f_ := static procedure(c:pointer;w:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,w);
end
function cairo_get_line_width(c:pointer):double;
begin
_f_ := static function(c:pointer):double;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_set_line_cap(c:pointer;cp:integer);
begin
_f_ := static procedure(c:pointer;cp:integer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,cp);
end
function cairo_get_line_cap(c:pointer):integer;
begin
_f_ := static function(c:pointer):integer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_set_line_join(c:pointer;t:integer);
begin
_f_ := static procedure(c:pointer;t:integer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,t);
end
function cairo_get_line_join(c:pointer):integer;
begin
_f_ := static function(c:pointer):integer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
//procedure draw_round_rectangle(c:pointer;x:double;y:double;w:double;h:double;r:double);cdecl;external 'libgtk-3.so';
procedure cairo_arc(cr:pointer; xc:double;yc:double;radius:double;angle1:double;angle2:double);
begin
_f_ := static procedure(cr:pointer; xc:double;yc:double;radius:double;angle1:double;angle2:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,xc,yc,radius,angle1,angle2);
end
procedure cairo_translate(cr:pointer;tx:double;ty:double);
begin
_f_ := static procedure(cr:pointer;tx:double;ty:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,tx,ty);
end
procedure cairo_rotate(cr:pointer;angle:double);
begin
_f_ := static procedure(cr:pointer;angle:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,angle);
end
procedure cairo_scale(cr:pointer;sx:double;sy:double);
begin
_f_ := static procedure(cr:pointer;sx:double;sy:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,sx,sy);
end
procedure cairo_set_operator(c:pointer;op:integer);
begin
_f_ := static procedure(c:pointer;op:integer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,op);
end
function cairo_get_operator(c:pointer):integer;
begin
_f_ := static function(c:pointer):integer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_set_tolerance(c:pointer;tol:double);
begin
_f_ := static procedure(c:pointer;tol:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,tol);
end
function cairo_get_tolerance(c:pointer):double;
begin
_f_ := static function(c:pointer):double;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_destroy(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_close_path(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_set_fill_rule(c:pointer;rul:integer);
begin
_f_ := static procedure(c:pointer;rul:integer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,rul);
end
procedure cairo_clip(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_clip_preserve(c:pointer); //µþ¼Ó²Ã¼ô
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_clip_extents(c:pointer;var x1:double;var y1:double;var x2:double;var y2:double);
begin
_f_ := static procedure(c:pointer;var x1:double;var y1:double;var x2:double;var y2:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,x1,y1,x2,y2);
end
function cairo_in_clip(c:pointer;x:double;y:double):integer;
begin
_f_ := static function(c:pointer;x:double;y:double):integer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,x,y);
end
procedure cairo_reset_clip(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_stroke(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_stroke_preserve(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_set_dash(c:pointer;dash:array of double;num_dash:integer;offset:double);
begin
_f_ := static procedure(c:pointer;dash:array of double;num_dash:integer;offset:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,dash,num_dash,offset);
end
procedure cairo_fill(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_fill_preserve(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
procedure cairo_fill_extents(c:pointer;x1:double;y1:double;x2:double;y2:double);
begin
_f_ := static procedure(c:pointer;x1:double;y1:double;x2:double;y2:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,x1,y1,x2,y2);
end
procedure cairo_paint_with_alpha(c:pointer;alpah:double);
begin
_f_ := static procedure(c:pointer;alpah:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,alpah);
end
procedure cairo_paint(c:pointer);
begin
_f_ := static procedure(c:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c);
end
function cairo_applay_pen_style(dc); function cairo_applay_pen_style(dc);
begin begin
pt := gtk_object_get_data(dc,"pen.style"); pt := gtk_object_get_data(dc,"pen.style");
@ -5064,108 +4864,8 @@ type tgtkapis = class() //gtk
cairo_arc(cr, x + w - r, y + h - r, r, 0, 3.14 / 2); cairo_arc(cr, x + w - r, y + h - r, r, 0, 3.14 / 2);
cairo_arc(cr, x + r, y + h - r, r, 3.14 / 2, 3.14); cairo_arc(cr, x + r, y + h - r, r, 3.14 / 2, 3.14);
end end
//////////////////////text//////// https://developer.gnome.org/cairo/stable/cairo-cairo-font-options-t.html#cairo-font-options-get-hint-metrics
procedure cairo_show_text(c:pointer;t:string);
begin
_f_ := static procedure(c:pointer;t:string);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,t);
end
procedure cairo_select_font_face(cr:pointer;n:string;slat:integer;weight:integer);
begin
_f_ := static procedure(cr:pointer;n:string;slat:integer;weight:integer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,n,slat,weight);
end
procedure cairo_set_font_size(cr:pointer;sz:double);
begin
_f_ := static procedure(cr:pointer;sz:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,sz);
end
procedure cairo_text_extents(cr:pointer;s:string;ext:pointer);
begin
_f_ := static procedure(cr:pointer;s:string;ext:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,s,ext);
end
procedure cairo_font_extents(cr:pointer;ext:pointer);
begin
_f_ := static procedure(cr:pointer;ext:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,ext);
end
procedure cairo_get_font_options(cr:pointer;ft:pointer);
begin
_f_ := static procedure(cr:pointer;ft:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,ft);
end
procedure cairo_set_font_options(cr:pointer;ft:pointer);
begin
_f_ := static procedure(cr:pointer;ft:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,ft);
end
function cairo_font_options_create():pointer;
begin
_f_ := static function():pointer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_();
end
procedure cairo_font_options_destroy(op:pointer);
begin
_f_ := static procedure(op:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(op);
end
////////cairo surface//////2
{
CAIRO_FORMAT_INVALID = -1,
CAIRO_FORMAT_ARGB32 = 0,
CAIRO_FORMAT_RGB24 = 1,
CAIRO_FORMAT_A8 = 2,
CAIRO_FORMAT_A1 = 3,
CAIRO_FORMAT_RGB16_565 = 4,
CAIRO_FORMAT_RGB30 = 5
}
function cairo_image_surface_create(t:integer;w:integer;h:integer):pointer;
begin
_f_ := static function(t:integer;w:integer;h:integer):pointer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(t,w,h);
end
function cairo_image_surface_create_from_png(f:string):pointer;
begin
_f_ := static function(f:string):pointer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(f);
end
function cairo_image_surface_get_width(sf:pointer):integer;
begin
_f_ := static function(sf:pointer):integer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(sf);
end
function cairo_image_surface_get_height(sf:pointer):integer;
begin
_f_ := static function(sf:pointer):integer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(sf);
end
procedure cairo_surface_destroy(sf:pointer);
begin
_f_ := static procedure(sf:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(sf);
end
procedure cairo_set_source_surface(cr:pointer;sf:pointer;x:double;y:double);
begin
_f_ := static procedure(cr:pointer;sf:pointer;x:double;y:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(cr,sf,x,y);
end
procedure cairo_pattern_set_extend(c:pointer;pe:integer);
begin
_f_ := static procedure(c:pointer;pe:integer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,pe);
end
function cairo_pattern_create_linear(x0:double;y0:double;x1:double;y1:double):pointer;
begin
_f_ := static function(x0:double;y0:double;x1:double;y1:double):pointer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(x0,y0,x1,y1);
end
procedure cairo_pattern_add_color_stop_rgb(c:pointer;offset:double;r:double;g:double;b:double;a:double);
begin
_f_ := static procedure(c:pointer;offset:double;r:double;g:double;b:double;a:double);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(c,offset,r,g,b,a);
end
/////////////////////////window////////// /////////////////////////window//////////
procedure gtk_window_set_keep_above(w:pointer;f:integer); procedure gtk_window_set_keep_above(w:pointer;f:integer);
begin begin
@ -10169,7 +9869,8 @@ begin
global g_w_i_datas,g_w_c_width, g_gtk_buttontable,g_gtk_keytable, global g_w_i_datas,g_w_c_width, g_gtk_buttontable,g_gtk_keytable,
g_gtk_call_handler_manager,g_gtk_font_get_size,g_gtk_dragxy, g_gtk_call_handler_manager,g_gtk_font_get_size,g_gtk_dragxy,
g_gtk_shadow_width,g_gtk_shadow_heigt,g_gtk_shadow_size_nset, g_gtk_shadow_width,g_gtk_shadow_heigt,g_gtk_shadow_size_nset,
G_E_ID_Name_1,G_E_ID_Name_2,g_Caret_Blink_Time,g_ansi_unit_cache,gtk_gdi_object_globals; G_E_ID_Name_1,G_E_ID_Name_2,g_Caret_Blink_Time,g_ansi_unit_cache,gtk_gdi_object_globals,g_cairo_api;
g_cairo_api := new t_img_op_api();
g_ansi_unit_cache := array(); g_ansi_unit_cache := array();
gtk_gdi_object_globals := array(); gtk_gdi_object_globals := array();
G_E_ID_Name_2 := array(); G_E_ID_Name_2 := array();

View File

@ -708,7 +708,119 @@ type TFpList=class(tarray1dlk)
return len(); return len();
end end
end end
type tmy_map = class() // map 对象
function create();
begin
clear();
fignorecase := true;
end
function operator[](idx);//get data
begin
k := get_true_key(idx);
return fkvs[k,1];
end
function operator[1](idx,v);//设置数据
begin
k := get_true_key(idx);
fchanged := true;
if ifnil(v) then
begin
reindex(fkvs,array(k:v));
end else
begin
fkvs[k] := array(idx,v);
end
end
function operator length();
begin
return ::length(fkvs);
end
function operator for(idx); //for循环
begin
init := (idx .& 1)=0;
if init then
begin
formatkvs2();
fforpos := -1;
fforcount := ::length(fkvs2);
end
iv := (idx .& 2)=2;
if iv then //
begin
if fforpos<fforcount then
begin
fforpos++;
return array(fkvs2[fforpos,0],fkvs2[fforpos,1]);
end
end else
begin
if fforpos<fforcount then
begin
fforpos++;
return fkvs2[fforpos,0];
end
end
return nil;
end
function operator deleteindex(idx,flg);
begin
k := get_true_key(idx);
if ::deleteindex(fkvs,k,false) then
begin
fchanged := true;
end
end
function operator mrows(flg)
begin
if flg then
begin
formatkvs2();
return fkvs2[:,0];
end
return length(fkvs);
end
function clear(); //清理
begin
fkvs := array();
fkvs2 := array();
fchanged := false;
end
property ignorecase read fignorecase write setignorecase; //忽略大小写
private
function get_true_key(k);
begin
if fignorecase and ifstring(k) then return lowercase(k);
return k;
end
function setignorecase(flg);
begin
nv := flg?true:false;
if nv<>fignorecase then
begin
fchanged := true;
fignorecase := nv;
end
end
function formatkvs2(); //格式化
begin
if fchanged then
begin
fchanged := false;
fkvs2 := array();
ct := 0;
for i,v in fkvs do
begin
fkvs2[ct++] := v;
end
end
end
fignorecase;
fforcount;
fforpos;
fchanged;
fkvs2; //for 处理
fkvs;
end
type tstrindexarray = class() //字符串大小写无关下标数组 type tstrindexarray = class() //字符串大小写无关下标数组
{** {**
@explan(数组类型) 忽略字符串下标的大小写%% @explan(数组类型) 忽略字符串下标的大小写%%
@ -830,7 +942,7 @@ type tstrindexarray = class() //
FData := nil; FData := nil;
FRows := nil; FRows := nil;
end end
private private
function SetData(d); function SetData(d);
begin begin
if not ifarray(d)then return false; if not ifarray(d)then return false;
@ -876,7 +988,7 @@ type tnumindexarray = Class() //ջģ
**} **}
return GetValueByIndex(idx); return GetValueByIndex(idx);
end end
function length(); function operator length();
begin begin
{** {**
@explan(说明) 获得数据长度 %% @explan(说明) 获得数据长度 %%

View File

@ -411,8 +411,8 @@ type TSystemCursor=class
static OCR_APPSTARTING; //126 static OCR_APPSTARTING; //126
static OCR_IBEAM; //152 static OCR_IBEAM; //152
end end
type tmacroconst=class(_commctrldef_,_tvclmsageid_,_shellapi_) type tmacroconst=class(_commctrldef_,_tvclmsageid_,_shellapi_,_gdiflatconst_)
static const tmacroconstinit=0x1; //static const tmacroconstinit=0x1;
end end
type tconstant=class(talign,TAnchorKind,TFormStyle,TComponentState,TComponentStyle,TWinControlFlag,TControlStyleType,TMouseButton,TShiftStateEnum,TControlFlag,TDockOrientation,TDragKind,TDragMode,TDragState,TDragMessage,TCanvasStates,TFPPenMode,TFPPenEndCap,TFPPenJoinStyle,TControlStateType,TFormBorderStyle,TAlignStyle9,TAlignStyleH3,TSysCursor,TActionListState,TToolButtonStyle,TPairSplitterType) type tconstant=class(talign,TAnchorKind,TFormStyle,TComponentState,TComponentStyle,TWinControlFlag,TControlStyleType,TMouseButton,TShiftStateEnum,TControlFlag,TDockOrientation,TDragKind,TDragMode,TDragState,TDragMessage,TCanvasStates,TFPPenMode,TFPPenEndCap,TFPPenJoinStyle,TControlStateType,TFormBorderStyle,TAlignStyle9,TAlignStyleH3,TSysCursor,TActionListState,TToolButtonStyle,TPairSplitterType)
@ -3145,6 +3145,331 @@ type _shellapi_=class()
static const shil_last=0x4;static const wc_netaddress="msctls_netaddress";static const ncm_getaddress=0x401; static const shil_last=0x4;static const wc_netaddress="msctls_netaddress";static const ncm_getaddress=0x401;
static const ncm_setallowtype=0x402;static const ncm_getallowtype=0x403;static const ncm_displayerrortip=0x404; static const ncm_setallowtype=0x402;static const ncm_getallowtype=0x403;static const ncm_displayerrortip=0x404;
end end
type _gdiflatconst_ = class() //gdiplusflat
//FillMode
static const FillModeAlternate = 0;
static const FillModeWinding = 1;
//QualityMode
static const QualityModeInvalid = -1;
static const QualityModeDefault = 0;
static const QualityModeLow = 1;
static const QualityModeHigh = 2;
//CompositingMode
static const CompositingModeSourceOver = 0;
static const CompositingModeSourceCopy = 1;
//CompositingQuality
static const CompositingQualityInvalid = QualityModeInvalid;
static const CompositingQualityDefault = QualityModeDefault;
static const CompositingQualityHighSpeed = QualityModeLow;
static const CompositingQualityHighQuality = QualityModeHigh;
static const CompositingQualityGammaCorrected = 3;
static const CompositingQualityAssumeLinear = 4;
//Unit
static const UnitWorld = 0;
static const UnitDisplay = 1;
static const UnitPixel = 2;
static const UnitPoint = 3;
static const UnitInch = 4;
static const UnitDocument = 5;
static const UnitMillimeter = 6;
//MetafileFrameUnit
static const MetafileFrameUnitPixel = UnitPixel;
static const MetafileFrameUnitPoint = UnitPoint;
static const MetafileFrameUnitInch = UnitInch;
static const MetafileFrameUnitDocument = UnitDocument;
static const MetafileFrameUnitMillimeter = UnitMillimeter;
static const MetafileFrameUnitGdi = 7;
///CoordinateSpace
static const CoordinateSpaceWorld = 0;
static const CoordinateSpacePage = 1;
static const CoordinateSpaceDevice = 2;
//////WrapMode///////
static const WrapModeTile = 0;
static const WrapModeTileFlipX = 1;
static const WrapModeTileFlipY = 2;
static const WrapModeTileFlipXY = 3;
static const WrapModeClamp = 4;
///////HatchStyle//////////////////
static const HatchStyleHorizontal = 0 ;
static const HatchStyleVertical = 1 ;
static const HatchStyleForwardDiagonal = 2 ;
static const HatchStyleBackwardDiagonal = 3 ;
static const HatchStyleCross = 4 ;
static const HatchStyleDiagonalCross = 5 ;
static const HatchStyle05Percent = 6 ;
static const HatchStyle10Percent = 7 ;
static const HatchStyle20Percent = 8 ;
static const HatchStyle25Percent = 9 ;
static const HatchStyle30Percent = 10;
static const HatchStyle40Percent = 11;
static const HatchStyle50Percent = 12;
static const HatchStyle60Percent = 13;
static const HatchStyle70Percent = 14;
static const HatchStyle75Percent = 15;
static const HatchStyle80Percent = 16;
static const HatchStyle90Percent = 17;
static const HatchStyleLightDownwardDiagonal = 18;
static const HatchStyleLightUpwardDiagonal = 19;
static const HatchStyleDarkDownwardDiagonal = 20;
static const HatchStyleDarkUpwardDiagonal = 21;
static const HatchStyleWideDownwardDiagonal = 22;
static const HatchStyleWideUpwardDiagonal = 23;
static const HatchStyleLightVertical = 24;
static const HatchStyleLightHorizontal = 25;
static const HatchStyleNarrowVertical = 26;
static const HatchStyleNarrowHorizontal = 27;
static const HatchStyleDarkVertical = 28;
static const HatchStyleDarkHorizontal = 29;
static const HatchStyleDashedDownwardDiagonal = 30;
static const HatchStyleDashedUpwardDiagonal = 31;
static const HatchStyleDashedHorizontal = 32;
static const HatchStyleDashedVertical = 33;
static const HatchStyleSmallConfetti = 34;
static const HatchStyleLargeConfetti = 35;
static const HatchStyleZigZag = 36;
static const HatchStyleWave = 37;
static const HatchStyleDiagonalBrick = 38;
static const HatchStyleHorizontalBrick = 39;
static const HatchStyleWeave = 40;
static const HatchStylePlaid = 41;
static const HatchStyleDivot = 42;
static const HatchStyleDottedGrid = 43;
static const HatchStyleDottedDiamond = 44;
static const HatchStyleShingle = 45;
static const HatchStyleTrellis = 46;
static const HatchStyleSphere = 47;
static const HatchStyleSmallGrid = 48;
static const HatchStyleSmallCheckerBoard = 49;
static const HatchStyleLargeCheckerBoard = 50;
static const HatchStyleOutlinedDiamond = 51;
static const HatchStyleSolidDiamond = 52;
static const HatchStyleTotal = 53;
static const HatchStyleLargeGrid = HatchStyleCross ;
static const HatchStyleMin = HatchStyleHorizontal ;
static const HatchStyleMax = HatchStyleTotal - 1 ;
//DashStyle
static const DashStyleSolid = 0;
static const DashStyleDash = 1;
static const DashStyleDot = 2;
static const DashStyleDashDot = 3;
static const DashStyleDashDotDot = 4;
static const DashStyleCustom = 5;
//DashCap
static const DashCapFlat = 0;
static const DashCapRound = 2;
static const DashCapTriangle = 3;
//LineCap
static const LineCapFlat = 0;
static const LineCapSquare = 1;
static const LineCapRound = 2;
static const LineCapTriangle = 3;
static const LineCapNoAnchor = 0x10; // corresponds to flat cap
static const LineCapSquareAnchor = 0x11; // corresponds to square cap
static const LineCapRoundAnchor = 0x12; // corresponds to round cap
static const LineCapDiamondAnchor = 0x13; // corresponds to triangle cap
static const LineCapArrowAnchor = 0x14; // no correspondence
static const LineCapCustom = 0xff; // custom cap
static const LineCapAnchorMask = 0xf0; // mask to check for anchor or not.
/////CustomLineCapType/////
static const CustomLineCapTypeDefault = 0;
static const CustomLineCapTypeAdjustableArrow = 1;
////LineJoin
static const LineJoinMiter = 0;
static const LineJoinBevel = 1;
static const LineJoinRound = 2;
static const LineJoinMiterClipped = 3;
////PathPointType//////////
static const PathPointTypeStart = 0; // move
static const PathPointTypeLine = 1; // line
static const PathPointTypeBezier = 3; // default Bezier (= cubic Bezier)
static const PathPointTypePathTypeMask = 0x07; // type mask (lowest 3 bits).
static const PathPointTypeDashMode = 0x10; // currently in dash mode.
static const PathPointTypePathMarker = 0x20; // a marker for the path.
static const PathPointTypeCloseSubpath = 0x80; // closed flag
//Path types used for advanced path.
static const PathPointTypeBezier3 = 3; // cubic Bezier
///////////WarpMode///////
static const WarpModePerspective = 0;
static const WarpModeBilinear = 1;
//LinearGradientMode
static const LinearGradientModeHorizontal = 0;
static const LinearGradientModeVertical = 1;
static const LinearGradientModeForwardDiagonal = 2;
static const LinearGradientModeBackwardDiagonal = 3;
///CombineMode
static const CombineModeReplace = 0 ;
static const CombineModeIntersect = 1 ;
static const CombineModeUnion = 2 ;
static const CombineModeXor = 3 ;
static const CombineModeExclude = 4 ;
static const CombineModeComplement = 5 ;
//ImageType
static const ImageTypeUnknown = 0;
static const ImageTypeBitmap = 1;
static const ImageTypeMetafile = 2;
///InterpolationMode
static const InterpolationModeInvalid = QualityModeInvalid;
static const InterpolationModeDefault = QualityModeDefault;
static const InterpolationModeLowQuality = QualityModeLow;
static const InterpolationModeHighQuality = QualityModeHigh;
static const InterpolationModeBilinear = 3;
static const InterpolationModeBicubic = 4;
static const InterpolationModeNearestNeighbor = 5;
static const InterpolationModeHighQualityBilinear = 6;
static const InterpolationModeHighQualityBicubic = 7;
///////PenAlignment//////////////
static const PenAlignmentCenter = 0;
static const PenAlignmentInset = 1;
//BrushType
static const BrushTypeSolidColor = 0;
static const BrushTypeHatchFill = 1;
static const BrushTypeTextureFill = 2;
static const BrushTypePathGradient = 3;
static const BrushTypeLinearGradient = 4;
//PenType
static const PenTypeSolidColor = 0;
static const PenTypeHatchFill = 1;
static const PenTypeTextureFill = 2;
static const PenTypePathGradient = 3;
static const PenTypeLinearGradient = 4;
static const PenTypeUnknown = -1;
//MatrixOrder
static const MatrixOrderPrepend = 0;
static const MatrixOrderAppend = 1;
//////GenericFontFamily
static const GenericFontFamilySerif = 0;
static const GenericFontFamilySansSerif = 1;
static const GenericFontFamilyMonospace = 2;
////FontStyle
static const FontStyleRegular = 0;
static const FontStyleBold = 1;
static const FontStyleItalic = 2;
static const FontStyleBoldItalic = 3;
static const FontStyleUnderline = 4;
static const FontStyleStrikeout = 8;
////SmoothingMode
static const SmoothingModeInvalid = QualityModeInvalid;
static const SmoothingModeDefault = QualityModeDefault;
static const SmoothingModeHighSpeed = QualityModeLow;
static const SmoothingModeHighQuality = QualityModeHigh;
static const SmoothingModeNone = 3 ;
static const SmoothingModeAntiAlias = 4;
////PixelOffsetMode
static const PixelOffsetModeInvalid = QualityModeInvalid;
static const PixelOffsetModeDefault = QualityModeDefault;
static const PixelOffsetModeHighSpeed = QualityModeLow;
static const PixelOffsetModeHighQuality = QualityModeHigh;
static const PixelOffsetModeNone = 3 ;
static const PixelOffsetModeHalf = 4;
///TextRenderingHint
static const TextRenderingHintSystemDefault = 0; // Glyph with system default rendering hint
static const TextRenderingHintSingleBitPerPixelGridFit = 1; // Glyph bitmap with hinting
static const TextRenderingHintSingleBitPerPixel = 2; // Glyph bitmap without hinting
static const TextRenderingHintAntiAliasGridFit = 3; // Glyph anti-alias bitmap with hinting
static const TextRenderingHintAntiAlias = 4; // Glyph anti-alias bitmap without hinting
static const TextRenderingHintClearTypeGridFit = 5; // Glyph CT bitmap with hinting
//MetafileType
static const MetafileTypeInvalid = 0; // Invalid metafile
static const MetafileTypeWmf = 1; // Standard WMF
static const MetafileTypeWmfPlaceable = 2; // Placeable WMF
static const MetafileTypeEmf = 3; // EMF (not EMF+)
static const MetafileTypeEmfPlusOnly = 4; // EMF+ without dual = ; down-level records
static const MetafileTypeEmfPlusDual = 5; // EMF+ with dual = ; down-level records
//EmfType
static const EmfTypeEmfOnly = MetafileTypeEmf;
static const EmfTypeEmfPlusOnly = MetafileTypeEmfPlusOnly;
static const EmfTypeEmfPlusDual = MetafileTypeEmfPlusDual;
///ObjectType
static const ObjectTypeInvalid = 0 ;
static const ObjectTypeBrush = 1 ;
static const ObjectTypePen = 2 ;
static const ObjectTypePath = 3 ;
static const ObjectTypeRegion = 4 ;
static const ObjectTypeImage = 5 ;
static const ObjectTypeFont = 6 ;
static const ObjectTypeStringFormat = 7 ;
static const ObjectTypeImageAttributes = 8 ;
static const ObjectTypeCustomLineCap = 9 ;
////////////////
///StringFormatFlags/////////////////
static const StringFormatFlagsDirectionRightToLeft = 0x00000001;
static const StringFormatFlagsDirectionVertical = 0x00000002;
static const StringFormatFlagsNoFitBlackBox = 0x00000004;
static const StringFormatFlagsDisplayFormatControl = 0x00000020;
static const StringFormatFlagsNoFontFallback = 0x00000400;
static const StringFormatFlagsMeasureTrailingSpaces = 0x00000800;
static const StringFormatFlagsNoWrap = 0x00001000;
static const StringFormatFlagsLineLimit = 0x00002000;
static const StringFormatFlagsNoClip = 0x00004000;
static const StringFormatFlagsBypassGDI = 0x80000000;
/////StringTrimming////////
static const StringTrimmingNone = 0;
static const StringTrimmingCharacter = 1;
static const StringTrimmingWord = 2;
static const StringTrimmingEllipsisCharacter = 3;
static const StringTrimmingEllipsisWord = 4;
static const StringTrimmingEllipsisPath = 5;
//---------------------------------------------------------------------------
// National language digit substitution
//---------------------------------------------------------------------------
static const StringDigitSubstituteUser = 0; // As NLS setting
static const StringDigitSubstituteNone = 1;
static const StringDigitSubstituteNational = 2;
static const StringDigitSubstituteTraditional = 3;
//---------------------------------------------------------------------------
// Hotkey prefix interpretation
//---------------------------------------------------------------------------
static const HotkeyPrefixNone = 0;
static const HotkeyPrefixShow = 1;
static const HotkeyPrefixHide = 2;
//---------------------------------------------------------------------------
// String alignment flags
//---------------------------------------------------------------------------
// Left edge for left-to-right text;
// right for right-to-left text;
// and top for vertical
static const StringAlignmentNear = 0;
static const StringAlignmentCenter = 1;
static const StringAlignmentFar = 2;
////////////DriverStringOptions/////
static const DriverStringOptionsCmapLookup = 1;
static const DriverStringOptionsVertical = 2;
static const DriverStringOptionsRealizedAdvance = 4;
static const DriverStringOptionsLimitSubpixel = 8;
/////FlushIntention///////
static const FlushIntentionFlush = 0;
static const FlushIntentionSync = 1;
//EncoderParameterValueType
static const EncoderParameterValueTypeByte = 1; // 8-bit unsigned int
static const EncoderParameterValueTypeASCII = 2; // 8-bit byte containing one 7-bit ASCII
// code. NULL terminated.
static const EncoderParameterValueTypeShort = 3; // 16-bit unsigned int
static const EncoderParameterValueTypeLong = 4; // 32-bit unsigned int
static const EncoderParameterValueTypeRational = 5; // Two Longs. The first Long is the
// numerator; the second Long expresses the
// denomintor.
static const EncoderParameterValueTypeLongRange = 6; // Two longs which specify a range of
// integer values. The first Long specifies
// the lower end and the second one
// specifies the higher end. All values
// are inclusive at both ends
static const EncoderParameterValueTypeUndefined = 7; // 8-bit byte that can take any value
// depending on field definition
static const EncoderParameterValueTypeRationalRange = 8; // Two Rationals. The first Rational
// specifies the lower end and the second
// specifies the higher end. All values
// are inclusive at both ends
//----------GpTestControlEnum-----------------------------------------------------------------
static const TestControlForceBilinear = 0;
static const TestControlNoICM = 1;
static const TestControlGetBuildNumber = 2;
//EmfToWmfBitsFlags//
static const EmfToWmfBitsFlagsDefault = 0x00000000;
static const EmfToWmfBitsFlagsEmbedEmf = 0x00000001;
static const EmfToWmfBitsFlagsIncludePlaceable = 0x00000002;
static const EmfToWmfBitsFlagsNoXORClip = 0x00000004;
end
implementation implementation
initialization initialization
end. end.

View File

@ -182,7 +182,6 @@ type Tcustomfont = class(tgdi)
begin begin
if ifnumber(v)and v <> Fwidth and v<>17 then if ifnumber(v)and v <> Fwidth and v<>17 then
begin begin
echo "\r\nset:",v;
Fwidth := v; Fwidth := v;
onchange(); onchange();
end end
@ -936,7 +935,7 @@ type tcustomimage=class(TSLUIBASE)
begin begin
inherited; inherited;
FHandle := 0; FHandle := 0;
FGdi := new TGdiplusflat(); FGdi := new t_img_op_api();
end end
function DestroyHandle(); function DestroyHandle();
begin begin
@ -1093,7 +1092,7 @@ type tcustomimage=class(TSLUIBASE)
property Gdi read FGdi; property Gdi read FGdi;
property Handle Read FHandle; property Handle Read FHandle;
{** {**
@param(gdi)(TGdiplusflat) gdi¶ÔÏó %% @param(gdi)(t_img_op_api) 图像操作对象 %%
@param(handle)(pointer) ¾ä±ú %% @param(handle)(pointer) ¾ä±ú %%
**} **}
end end
@ -3359,16 +3358,7 @@ begin
end end
function sinitgidplus(); function sinitgidplus();
begin begin
FGDI := new TGdiplusflat(); FGDI := new t_img_op_api();
vot := array(
("gdiplusversion","int",1),
("debugeventcallback","int",0),
("suppressbackgroundthread","int",0),
("suppressexternalcodecs","int",0));
og := new ctslctrans(tslarraytocstructcalc(vot));
ftoken :=-1;
ig :=-1;
FGDI.GdiplusStartup(ftoken,og._getptr_,ig);
end end
function GetTextWidthAndHeightWidthFont(s,f,mul); function GetTextWidthAndHeightWidthFont(s,f,mul);
begin begin