tslediter/funcext/tvclib/tgdiplusflat.tsf

1115 lines
117 KiB
Plaintext

type TGdiplusflat=class()
{**
@explan(说明)gdi+ 的c接口函数 %%
**}
(* *************************************************************************\
*
* Copyright (c) 1998-2001, Microsoft Corp. All Rights Reserved.
*
* Module Name:
*
* GdiplusFlat.h
*
* Abstract:
*
* Private GDI+ header file.
*
************************************************************************* *)
//----------------------------------------------------------------------------
// GraphicsPath APIs
//----------------------------------------------------------------------------
{$ifdef linux}
//20210827 需要添加gdi功能
static fsgtkgdi;
class function getgtkgdi();
begin
if not fsgtkgdi then fsgtkgdi := new tgtkgdi();
return fsgtkgdi;
end
type tgtkgdi = class
{
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';
}
procedure cairo_pattern_destroy(p:pointer);
begin
_f_ := static procedure(p:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(p);
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_pattern_create_for_surface(f:pointer):pointer;
begin
_f_ := static function(f:pointer):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
function gdk_pixbuf_new_from_file(f:string;er:pointer):pointer;
begin
_f_ := static function(f:string;er:pointer):pointer;cdecl;external getfuncptrbyname(0,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 getfuncptrbyname(0,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 getfuncptrbyname(0,functionname());
return ##_f_();
end
class procedure gdk_pixbuf_ref(pixbuf);
begin
_f_ := static procedure(pixbuf);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_();
end
function g_object_ref(g:pointer):pointer;
begin
_f_ := static function(g:pointer):pointer;cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(g);
end
procedure g_object_unref(g:pointer);
begin
_f_ := static procedure(g:pointer);cdecl;external getfuncptrbyname(0,functionname());
return ##_f_(g);
end
function getfuncptrbyname(lib,n);
begin
return unit(ugtkinterface).getfuncptrbyname(lib,n);
end
end
type TTempFile = class
function Create();
begin
bp := "/tmp/tinysoft/tslvcl/";
if not _mtool then _mtool := new aefclassobj_();
Fptr := _mtool.tmalloc(8);
FPath := bp+inttostr(systhreadid())+"_"+inttostr(Fptr);
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);
_mtool.tfree(Fptr);
end
property path read FPath ;
private
FPath;
Fptr;
static _mtool;
end
class procedure cairo_pattern_destroy(p:pointer);
begin
return getgtkgdi().cairo_pattern_destroy(p);
end
class function cairo_image_surface_create_from_png(f:string):pointer;
begin
return getgtkgdi().cairo_image_surface_create_from_png(f);
end
class function cairo_pattern_create_for_surface(f:pointer):pointer;
begin
return getgtkgdi().cairo_pattern_create_for_surface(f);
end
class function cairo_image_surface_get_width(sf:pointer):integer;
begin
return getgtkgdi().cairo_image_surface_get_width(sf);
end
class function cairo_image_surface_get_height(sf:pointer):integer;
begin
return getgtkgdi().cairo_image_surface_get_height(sf);
end
class function gdk_pixbuf_new_from_file(f:string;er:pointer):pointer;
begin
return getgtkgdi().gdk_pixbuf_new_from_file(f,er);
end
class function gdk_pixbuf_save(pixbuf:pointer;p:string;tp:string;gerr:string;p1:string; p2:string;p3:string;p4:string;p5:string):integer;
begin
return getgtkgdi().gdk_pixbuf_save(pixbuf,p,tp,gerr,p1,p2,p3,p4,p5);
end
class procedure gdk_pixbuf_unref(pixbuf);
begin
return getgtkgdi().gdk_pixbuf_unref(pixbuf);
end
class procedure gdk_pixbuf_ref(pixbuf);
begin
return getgtkgdi().gdk_pixbuf_ref(pixbuf);
end
class function g_object_ref(g:pointer):pointer;
begin
return getgtkgdi().g_object_ref(g);
end
class procedure g_object_unref(g:pointer);
begin
return getgtkgdi().g_object_unref(g);
end
class function getfuncptrbyname(lib,n);
begin
return unit(ugtkinterface).getfuncptrbyname(lib,n);
end
class function GdipSaveImageToStream(image:pointer;var imgestr:string); //无用到
class 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
class function GdiplusStartup(); //启动gdi+
class function GdipDisposeImage(img); //销毁image
begin
imageunref(img);
end
class 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
class function GdipCreateHBITMAPFromBitmap(bitmap:pointer;var hbmReturn:pointer;background:integer); //bitmap to hbitmap
begin
hbmReturn := bitmap;
imageref(hbmReturn);
return 1;
end
class function GdipCreateBitmapFromHBITMAP(hbm:pointer;hpal:pointer;var bitmap:pointer); // hbitmap to bitmap
begin
bitmap := hbm;
imageref(bitmap);
return 1;
end
class function GdipCreateBitmapFromHICON(hicon:pointer;var bitmap:pointer); //bitmap to icon
begin
bitmap := hicon;
imageref(bitmap);
return 1;
end
class function GdipCreateHICONFromBitmap(bitmap:pointer;var hbmReturn:pointer); // icon to bitmap
begin
hbmReturn := bitmap;
imageref(hbmReturn);
return 1;
end
class 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
class 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
class 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
class 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
class 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
class 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
class function imageref(img); // 引用
begin
rf := GetImageProperty(img,"ref");
SetImageProperty(img,"ref",((rf>0)?(rf+1):(1)));
g_object_ref(img);
end
class 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
class 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 处理
class 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
class 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
class function CreateStreamOnHGlobal(hGlobal:pointer;fDeleteOnRelease:integer; var ppstm:pointer):pointer;stdcall;external "Ole32.dll" name "CreateStreamOnHGlobal";
class function GetHGlobalFromStream(pstm:pointer; var phglobal:pointer):pointer;stdcall;external "Ole32.dll" name "GetHGlobalFromStream";
class function GlobalLock(mem :pointer):pointer;stdcall;external "Kernel32.dll" name "GlobalLock";
class function GlobalUnlock(mem :pointer):integer;stdcall;external "Kernel32.dll" name "GlobalUnlock";
class function GlobalSize(menm:pointer):integer;stdcall;external "Kernel32.dll" name "GlobalSize";
class function memcpy(dst:pointer;src:string;size_t:integer):pointer;cdecl;external "msvcrt.dll" name "memcpy";
class function memcpy2(var dst:string;src:pointer;size_t:integer):pointer;cdecl;external "msvcrt.dll" name "memcpy";
class function tuicloseistream(sm:pointer);
begin
r := tslvclcloseistream(sm);
return r;
end
class function GlobalAlloc(uFlags :integer;dwBytes:integer):pointer;stdcall;external "Kernel32.dll" name "GlobalAlloc";
class Function GdipCreatePath(brushMode:integer;var path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePath";
class Function GdipCreatePath2(pn2:pointer;pn5:pointer;pn7:integer;pn9:integer;var path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePath2";
class Function GdipCreatePath2I(pn2:pointer;pn5:pointer;pn7:integer;pn9:integer;var path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePath2I";
class Function GdipClonePath(path:pointer;var clonePath:pointer):integer;stdcall;external "gdiplus.dll" name "GdipClonePath";
class Function GdipDeletePath(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeletePath";
class Function GdipResetPath(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetPath";
class Function GdipGetPointCount(path:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPointCount";
class Function GdipGetPathTypes(path:pointer;types:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathTypes";
class Function GdipGetPathPoints(pn2:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathPoints";
class Function GdipGetPathPointsI(pn2:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathPointsI";
class Function GdipGetPathFillMode(path:pointer;var fillmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathFillMode";
class Function GdipSetPathFillMode(path:pointer;fillmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathFillMode";
class Function GdipGetPathData(path:pointer;pathData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathData";
class Function GdipStartPathFigure(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipStartPathFigure";
class Function GdipClosePathFigure(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipClosePathFigure";
class Function GdipClosePathFigures(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipClosePathFigures";
class Function GdipSetPathMarker(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathMarker";
class Function GdipClearPathMarkers(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipClearPathMarkers";
class Function GdipReversePath(path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipReversePath";
class Function GdipGetPathLastPoint(path:pointer;lastPoint:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathLastPoint";
class Function GdipAddPathLine(path:pointer;x1:single;y1:single;x2:single;y2:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathLine";
class Function GdipAddPathLine2(path:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathLine2";
class Function GdipAddPathArc(path:pointer;x:single;y:single;width:single;height:single;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathArc";
class 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";
class Function GdipAddPathBeziers(path:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathBeziers";
class Function GdipAddPathCurve(path:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurve";
class Function GdipAddPathCurve2(path:pointer;points:pointer;count:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurve2";
class Function GdipAddPathCurve3(path:pointer;points:pointer;count:integer;offset:integer;numberOfSegments:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurve3";
class Function GdipAddPathClosedCurve(path:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathClosedCurve";
class Function GdipAddPathClosedCurve2(path:pointer;points:pointer;count:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathClosedCurve2";
class Function GdipAddPathRectangle(path:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathRectangle";
class Function GdipAddPathRectangles(path:pointer;rects:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathRectangles";
class Function GdipAddPathEllipse(path:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathEllipse";
class Function GdipAddPathPie(path:pointer;x:single;y:single;width:single;height:single;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathPie";
class Function GdipAddPathPolygon(path:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathPolygon";
class Function GdipAddPathPath(path:pointer;addingPath:pointer;connect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathPath";
class 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";
class 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";
class Function GdipAddPathLineI(path:pointer;x1:integer;y1:integer;x2:integer;y2:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathLineI";
class Function GdipAddPathLine2I(path:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathLine2I";
class Function GdipAddPathArcI(path:pointer;x:integer;y:integer;width:integer;height:integer;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathArcI";
class 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";
class Function GdipAddPathBeziersI(path:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathBeziersI";
class Function GdipAddPathCurveI(path:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurveI";
class Function GdipAddPathCurve2I(path:pointer;points:pointer;count:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurve2I";
class Function GdipAddPathCurve3I(path:pointer;points:pointer;count:integer;offset:integer;numberOfSegments:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathCurve3I";
class Function GdipAddPathClosedCurveI(path:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathClosedCurveI";
class Function GdipAddPathClosedCurve2I(path:pointer;points:pointer;count:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathClosedCurve2I";
class Function GdipAddPathRectangleI(path:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathRectangleI";
class Function GdipAddPathRectanglesI(path:pointer;rects:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathRectanglesI";
class Function GdipAddPathEllipseI(path:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathEllipseI";
class Function GdipAddPathPieI(path:pointer;x:integer;y:integer;width:integer;height:integer;startAngle:single;sweepAngle:single):integer;stdcall;external "gdiplus.dll" name "GdipAddPathPieI";
class Function GdipAddPathPolygonI(path:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipAddPathPolygonI";
class Function GdipFlattenPath(path:pointer;matrix:pointer;flatness:single):integer;stdcall;external "gdiplus.dll" name "GdipFlattenPath";
class Function GdipWindingModeOutline(path:pointer;matrix:pointer;flatness:single):integer;stdcall;external "gdiplus.dll" name "GdipWindingModeOutline";
class Function GdipWidenPath(nativePath:pointer;pen:pointer;matrix:pointer;flatness:single):integer;stdcall;external "gdiplus.dll" name "GdipWidenPath";
class Function GdipWarpPath(path:pointer;matrix:pointer;points:pointer;count:integer;srcx:single;srcy:single;srcwidth:single;srcheight:single;warpMode:pointer;flatness:single):integer;stdcall;external "gdiplus.dll" name "GdipWarpPath";
class Function GdipTransformPath(path:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTransformPath";
class Function GdipGetPathWorldBounds(path:pointer;bounds:pointer;matrix:pointer;pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathWorldBounds";
class Function GdipGetPathWorldBoundsI(path:pointer;bounds:pointer;matrix:pointer;pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathWorldBoundsI";
class Function GdipIsVisiblePathPoint(path:pointer;x:single;y:single;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisiblePathPoint";
class Function GdipIsVisiblePathPointI(path:pointer;x:integer;y:integer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisiblePathPointI";
class Function GdipIsOutlineVisiblePathPoint(path:pointer;x:single;y:single;pen:pointer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsOutlineVisiblePathPoint";
class Function GdipIsOutlineVisiblePathPointI(path:pointer;x:integer;y:integer;pen:pointer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsOutlineVisiblePathPointI";
//----------------------------------------------------------------------------
// PathIterator APIs
//----------------------------------------------------------------------------
class Function GdipCreatePathIter(var iterator:pointer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePathIter";
class Function GdipDeletePathIter(iterator:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeletePathIter";
class Function GdipPathIterNextSubpath(iterator:pointer;var resultCount:integer;var startIndex:integer;var endIndex:integer;isClosed:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterNextSubpath";
class Function GdipPathIterNextSubpathPath(iterator:pointer;var resultCount:integer;path:pointer;isClosed:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterNextSubpathPath";
class Function GdipPathIterNextPathType(iterator:pointer;var resultCount:integer;pathType:pointer;var startIndex:integer;var endIndex:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterNextPathType";
class Function GdipPathIterNextMarker(iterator:pointer;var resultCount:integer;var startIndex:integer;var endIndex:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterNextMarker";
class Function GdipPathIterNextMarkerPath(iterator:pointer;var resultCount:integer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterNextMarkerPath";
class Function GdipPathIterGetCount(iterator:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterGetCount";
class Function GdipPathIterGetSubpathCount(iterator:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterGetSubpathCount";
class Function GdipPathIterIsValid(iterator:pointer;valid:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterIsValid";
class Function GdipPathIterHasCurve(iterator:pointer;hasCurve:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterHasCurve";
class Function GdipPathIterRewind(iterator:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterRewind";
class Function GdipPathIterEnumerate(iterator:pointer;var resultCount:integer;points:pointer;types:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterEnumerate";
class Function GdipPathIterCopyData(iterator:pointer;var resultCount:integer;points:pointer;types:pointer;startIndex:integer;endIndex:integer):integer;stdcall;external "gdiplus.dll" name "GdipPathIterCopyData";
//----------------------------------------------------------------------------
// Matrix APIs
//----------------------------------------------------------------------------
class Function GdipCreateMatrix(var matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMatrix";
class Function GdipCreateMatrix2(m11:single;m12:single;m21:single;m22:single;dx:single;dy:single;var matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMatrix2";
class Function GdipCreateMatrix3(rect:pointer;dstplg:pointer;var matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMatrix3";
class Function GdipCreateMatrix3I(rect:pointer;dstplg:pointer;var matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMatrix3I";
class Function GdipCloneMatrix(matrix:pointer;var cloneMatrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneMatrix";
class Function GdipDeleteMatrix(matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteMatrix";
class Function GdipSetMatrixElements(matrix:pointer;m11:single;m12:single;m21:single;m22:single;dx:single;dy:single):integer;stdcall;external "gdiplus.dll" name "GdipSetMatrixElements";
class Function GdipMultiplyMatrix(matrix:pointer;matrix2:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyMatrix";
class Function GdipTranslateMatrix(matrix:pointer;offsetX:single;offsetY:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateMatrix";
class Function GdipScaleMatrix(matrix:pointer;scaleX:single;scaleY:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScaleMatrix";
class Function GdipRotateMatrix(matrix:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotateMatrix";
class Function GdipShearMatrix(matrix:pointer;shearX:single;shearY:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipShearMatrix";
class Function GdipInvertMatrix(matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipInvertMatrix";
class Function GdipTransformMatrixPoints(matrix:pointer;pts:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipTransformMatrixPoints";
class Function GdipTransformMatrixPointsI(matrix:pointer;pts:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipTransformMatrixPointsI";
class Function GdipVectorTransformMatrixPoints(matrix:pointer;pts:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipVectorTransformMatrixPoints";
class Function GdipVectorTransformMatrixPointsI(matrix:pointer;pts:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipVectorTransformMatrixPointsI";
class Function GdipGetMatrixElements(matrix:pointer;var matrixOut:single):integer;stdcall;external "gdiplus.dll" name "GdipGetMatrixElements";
class Function GdipIsMatrixInvertible(matrix:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsMatrixInvertible";
class Function GdipIsMatrixIdentity(matrix:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsMatrixIdentity";
class Function GdipIsMatrixEqual(matrix:pointer;matrix2:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsMatrixEqual";
//----------------------------------------------------------------------------
// Region APIs
//----------------------------------------------------------------------------
class Function GdipCreateRegion(var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegion";
class Function GdipCreateRegionRect(rect:pointer;var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegionRect";
class Function GdipCreateRegionRectI(rect:pointer;var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegionRectI";
class Function GdipCreateRegionPath(path:pointer;var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegionPath";
class Function GdipCreateRegionRgnData(regionData:pointer;size:integer;var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegionRgnData";
class Function GdipCreateRegionHrgn(hRgn:pointer;var region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateRegionHrgn";
class Function GdipCloneRegion(region:pointer;var cloneRegion:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneRegion";
class Function GdipDeleteRegion(region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteRegion";
class Function GdipSetInfinite(region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetInfinite";
class Function GdipSetEmpty(region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetEmpty";
class Function GdipCombineRegionRect(region:pointer;rect:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCombineRegionRect";
class Function GdipCombineRegionRectI(region:pointer;rect:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCombineRegionRectI";
class Function GdipCombineRegionPath(region:pointer;path:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCombineRegionPath";
class Function GdipCombineRegionRegion(region:pointer;region2:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCombineRegionRegion";
class Function GdipTranslateRegion(region:pointer;dx:single;dy:single):integer;stdcall;external "gdiplus.dll" name "GdipTranslateRegion";
class Function GdipTranslateRegionI(region:pointer;dx:integer;dy:integer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateRegionI";
class Function GdipTransformRegion(region:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTransformRegion";
class Function GdipGetRegionBounds(region:pointer;graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionBounds";
class Function GdipGetRegionBoundsI(region:pointer;graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionBoundsI";
class Function GdipGetRegionHRgn(region:pointer;graphics:pointer;hRgn:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionHRgn";
class Function GdipIsEmptyRegion(region:pointer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsEmptyRegion";
class Function GdipIsInfiniteRegion(region:pointer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsInfiniteRegion";
class Function GdipIsEqualRegion(region:pointer;region2:pointer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsEqualRegion";
class Function GdipGetRegionDataSize(region:pointer;var bufferSize:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionDataSize";
class Function GdipGetRegionData(region:pointer;buffer:pointer;bufferSize:integer;sizeFilled:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionData";
class Function GdipIsVisibleRegionPoint(region:pointer;x:single;y:single;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRegionPoint";
class Function GdipIsVisibleRegionPointI(region:pointer;x:integer;y:integer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRegionPointI";
class Function GdipIsVisibleRegionRect(region:pointer;x:single;y:single;width:single;height:single;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRegionRect";
class Function GdipIsVisibleRegionRectI(region:pointer;x:integer;y:integer;width:integer;height:integer;graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRegionRectI";
class Function GdipGetRegionScansCount(region:pointer;var count:integer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionScansCount";
class Function GdipGetRegionScans(region:pointer;rects:pointer;var count:integer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionScans";
class Function GdipGetRegionScansI(region:pointer;rects:pointer;var count:integer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetRegionScansI";
//----------------------------------------------------------------------------
// Brush APIs
//----------------------------------------------------------------------------
class Function GdipCloneBrush(brush:pointer;var cloneBrush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneBrush";
class Function GdipDeleteBrush(brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteBrush";
class Function GdipGetBrushType(brush:pointer;type:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetBrushType";
//----------------------------------------------------------------------------
// HatchBrush APIs
//----------------------------------------------------------------------------
class Function GdipCreateHatchBrush(hatchstyle:pointer;forecol:integer;backcol:integer;var brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateHatchBrush";
class Function GdipGetHatchStyle(brush:pointer;hatchstyle:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetHatchStyle";
class Function GdipGetHatchForegroundColor(brush:pointer;var forecol:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetHatchForegroundColor";
class Function GdipGetHatchBackgroundColor(brush:pointer;var backcol:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetHatchBackgroundColor";
//----------------------------------------------------------------------------
// TextureBrush APIs
//----------------------------------------------------------------------------
class Function GdipCreateTexture(image:pointer;wrapmode:integer;var texture:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateTexture";
class Function GdipCreateTexture2(image:pointer;wrapmode:integer;x:single;y:single;width:single;height:single;var texture:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateTexture2";
class Function GdipCreateTextureIA(image:pointer;imageAttributes:pointer;x:single;y:single;width:single;height:single;var texture:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateTextureIA";
class Function GdipCreateTexture2I(image:pointer;wrapmode:integer;x:integer;y:integer;width:integer;height:integer;var texture:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateTexture2I";
class Function GdipCreateTextureIAI(image:pointer;imageAttributes:pointer;x:integer;y:integer;width:integer;height:integer;var texture:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateTextureIAI";
class Function GdipGetTextureTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetTextureTransform";
class Function GdipSetTextureTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetTextureTransform";
class Function GdipResetTextureTransform(brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetTextureTransform";
class Function GdipMultiplyTextureTransform(brush:pointer;matrix:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyTextureTransform";
class Function GdipTranslateTextureTransform(brush:pointer;dx:single;dy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateTextureTransform";
class Function GdipScaleTextureTransform(brush:pointer;sx:single;sy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScaleTextureTransform";
class Function GdipRotateTextureTransform(brush:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotateTextureTransform";
class Function GdipSetTextureWrapMode(brush:pointer;wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetTextureWrapMode";
class Function GdipGetTextureWrapMode(brush:pointer;var wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetTextureWrapMode";
class Function GdipGetTextureImage(brush:pointer;var image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetTextureImage";
//----------------------------------------------------------------------------
// SolidBrush APIs
//----------------------------------------------------------------------------
class Function GdipCreateSolidFill(color:integer;var brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateSolidFill";
class Function GdipSetSolidFillColor(brush:pointer;color:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetSolidFillColor";
class Function GdipGetSolidFillColor(brush:pointer;var color:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetSolidFillColor";
//----------------------------------------------------------------------------
// LineBrush APIs
//----------------------------------------------------------------------------
class Function GdipCreateLineBrush(point1:pointer;point2:pointer;color1:integer;color2:integer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrush";
class Function GdipCreateLineBrushI(point1:pointer;point2:pointer;color1:integer;color2:integer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrushI";
class Function GdipCreateLineBrushFromRect(rect:pointer;color1:integer;color2:integer;mode:pointer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrushFromRect";
class Function GdipCreateLineBrushFromRectI(rect:pointer;color1:integer;color2:integer;mode:pointer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrushFromRectI";
class Function GdipCreateLineBrushFromRectWithAngle(rect:pointer;color1:integer;color2:integer;angle:single;isAngleScalable:pointer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrushFromRectWithAngle";
class Function GdipCreateLineBrushFromRectWithAngleI(rect:pointer;color1:integer;color2:integer;angle:single;isAngleScalable:pointer;wrapMode:integer;var lineGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateLineBrushFromRectWithAngleI";
class Function GdipSetLineColors(brush:pointer;color1:integer;color2:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetLineColors";
class Function GdipGetLineColors(brush:pointer;var colors:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineColors";
class Function GdipGetLineRect(brush:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineRect";
class Function GdipGetLineRectI(brush:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineRectI";
class Function GdipSetLineGammaCorrection(brush:pointer;useGammaCorrection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetLineGammaCorrection";
class Function GdipGetLineGammaCorrection(brush:pointer;useGammaCorrection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineGammaCorrection";
class Function GdipGetLineBlendCount(brush:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineBlendCount";
class Function GdipGetLineBlend(brush:pointer;var blend:single;var positions:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineBlend";
class Function GdipSetLineBlend(brush:pointer;var blend:single;var positions:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetLineBlend";
class Function GdipGetLinePresetBlendCount(brush:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLinePresetBlendCount";
class Function GdipGetLinePresetBlend(brush:pointer;var blend:integer;var positions:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLinePresetBlend";
class Function GdipSetLinePresetBlend(brush:pointer;var blend:integer;var positions:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetLinePresetBlend";
class Function GdipSetLineSigmaBlend(brush:pointer;focus:single;scale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetLineSigmaBlend";
class Function GdipSetLineLinearBlend(brush:pointer;focus:single;scale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetLineLinearBlend";
class Function GdipSetLineWrapMode(brush:pointer;wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetLineWrapMode";
class Function GdipGetLineWrapMode(brush:pointer;var wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineWrapMode";
class Function GdipGetLineTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineTransform";
class Function GdipSetLineTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetLineTransform";
class Function GdipResetLineTransform(brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetLineTransform";
class Function GdipMultiplyLineTransform(brush:pointer;matrix:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyLineTransform";
class Function GdipTranslateLineTransform(brush:pointer;dx:single;dy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateLineTransform";
class Function GdipScaleLineTransform(brush:pointer;sx:single;sy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScaleLineTransform";
class Function GdipRotateLineTransform(brush:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotateLineTransform";
//----------------------------------------------------------------------------
// PathGradientBrush APIs
//----------------------------------------------------------------------------
class Function GdipCreatePathGradient(points:pointer;count:integer;wrapMode:integer;var polyGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePathGradient";
class Function GdipCreatePathGradientI(points:pointer;count:integer;wrapMode:integer;var polyGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePathGradientI";
class Function GdipCreatePathGradientFromPath(path:pointer;var polyGradient:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreatePathGradientFromPath";
class Function GdipGetPathGradientCenterColor(brush:pointer;var colors:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientCenterColor";
class Function GdipSetPathGradientCenterColor(brush:pointer;colors:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientCenterColor";
class Function GdipGetPathGradientSurroundColorsWithCount(brush:pointer;var color:integer;count:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientSurroundColorsWithCount";
class Function GdipSetPathGradientSurroundColorsWithCount(brush:pointer;var color:integer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientSurroundColorsWithCount";
class Function GdipGetPathGradientPath(brush:pointer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientPath";
class Function GdipSetPathGradientPath(brush:pointer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientPath";
class Function GdipGetPathGradientCenterPoint(brush:pointer;points:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientCenterPoint";
class Function GdipGetPathGradientCenterPointI(brush:pointer;points:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientCenterPointI";
class Function GdipSetPathGradientCenterPoint(brush:pointer;points:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientCenterPoint";
class Function GdipSetPathGradientCenterPointI(brush:pointer;points:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientCenterPointI";
class Function GdipGetPathGradientRect(brush:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientRect";
class Function GdipGetPathGradientRectI(brush:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientRectI";
class Function GdipGetPathGradientPointCount(brush:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientPointCount";
class Function GdipGetPathGradientSurroundColorCount(brush:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientSurroundColorCount";
class Function GdipSetPathGradientGammaCorrection(brush:pointer;useGammaCorrection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientGammaCorrection";
class Function GdipGetPathGradientGammaCorrection(brush:pointer;useGammaCorrection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientGammaCorrection";
class Function GdipGetPathGradientBlendCount(brush:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientBlendCount";
class Function GdipGetPathGradientBlend(brush:pointer;var blend:single;var positions:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientBlend";
class Function GdipSetPathGradientBlend(brush:pointer;var blend:single;var positions:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientBlend";
class Function GdipGetPathGradientPresetBlendCount(brush:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientPresetBlendCount";
class Function GdipGetPathGradientPresetBlend(brush:pointer;var blend:integer;var positions:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientPresetBlend";
class Function GdipSetPathGradientPresetBlend(brush:pointer;var blend:integer;var positions:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientPresetBlend";
class Function GdipSetPathGradientSigmaBlend(brush:pointer;focus:single;scale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientSigmaBlend";
class Function GdipSetPathGradientLinearBlend(brush:pointer;focus:single;scale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientLinearBlend";
class Function GdipGetPathGradientWrapMode(brush:pointer;var wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientWrapMode";
class Function GdipSetPathGradientWrapMode(brush:pointer;wrapmode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientWrapMode";
class Function GdipGetPathGradientTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientTransform";
class Function GdipSetPathGradientTransform(brush:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientTransform";
class Function GdipResetPathGradientTransform(brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetPathGradientTransform";
class Function GdipMultiplyPathGradientTransform(brush:pointer;matrix:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyPathGradientTransform";
class Function GdipTranslatePathGradientTransform(brush:pointer;dx:single;dy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslatePathGradientTransform";
class Function GdipScalePathGradientTransform(brush:pointer;sx:single;sy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScalePathGradientTransform";
class Function GdipRotatePathGradientTransform(brush:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotatePathGradientTransform";
class Function GdipGetPathGradientFocusScales(brush:pointer;var xScale:single;var yScale:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPathGradientFocusScales";
class Function GdipSetPathGradientFocusScales(brush:pointer;xScale:single;yScale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPathGradientFocusScales";
//----------------------------------------------------------------------------
// Pen APIs
//----------------------------------------------------------------------------
class Function GdipCreatePen1(color:integer;width:single;unit_:pointer;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 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 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 GdipSetPenUnit(pen:pointer;unit_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenUnit";
class Function GdipGetPenUnit(pen:pointer;unit_:pointer):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 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 GdipSetPenDashCap197819(pen:pointer;dashCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenDashCap197819";
class Function GdipGetPenStartCap(pen:pointer;startCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenStartCap";
class Function GdipGetPenEndCap(pen:pointer;endCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenEndCap";
class Function GdipGetPenDashCap197819(pen:pointer;dashCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenDashCap197819";
class Function GdipSetPenLineJoin(pen:pointer;lineJoin:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenLineJoin";
class Function GdipGetPenLineJoin(pen:pointer;lineJoin:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenLineJoin";
class Function GdipSetPenCustomStartCap(pen:pointer;customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenCustomStartCap";
class Function GdipGetPenCustomStartCap(pen:pointer;var customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenCustomStartCap";
class Function GdipSetPenCustomEndCap(pen:pointer;customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenCustomEndCap";
class Function GdipGetPenCustomEndCap(pen:pointer;var customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenCustomEndCap";
class Function GdipSetPenMiterLimit(pen:pointer;miterLimit:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPenMiterLimit";
class Function GdipGetPenMiterLimit(pen:pointer;var miterLimit:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPenMiterLimit";
class Function GdipSetPenMode(pen:pointer;penMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenMode";
class Function GdipGetPenMode(pen:pointer;penMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenMode";
class Function GdipSetPenTransform(pen:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenTransform";
class Function GdipGetPenTransform(pen:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenTransform";
class Function GdipResetPenTransform(pen:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetPenTransform";
class Function GdipMultiplyPenTransform(pen:pointer;matrix:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyPenTransform";
class Function GdipTranslatePenTransform(pen:pointer;dx:single;dy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslatePenTransform";
class Function GdipScalePenTransform(pen:pointer;sx:single;sy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScalePenTransform";
class Function GdipRotatePenTransform(pen:pointer;angle:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRotatePenTransform";
class Function GdipSetPenColor(pen:pointer;argb:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenColor";
class Function GdipGetPenColor(pen:pointer;var argb:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenColor";
class Function GdipSetPenBrushFill(pen:pointer;brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenBrushFill";
class Function GdipGetPenBrushFill(pen:pointer;var brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenBrushFill";
class Function GdipGetPenFillType(pen:pointer;type:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenFillType";
class Function GdipGetPenDashStyle(pen:pointer;dashstyle:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenDashStyle";
class Function GdipSetPenDashStyle(pen:pointer;dashstyle:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenDashStyle";
class Function GdipGetPenDashOffset(pen:pointer;var offset:single):integer;stdcall;external "gdiplus.dll" name "GdipGetPenDashOffset";
class Function GdipSetPenDashOffset(pen:pointer;offset:single):integer;stdcall;external "gdiplus.dll" name "GdipSetPenDashOffset";
class Function GdipGetPenDashCount(pen:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenDashCount";
class Function GdipSetPenDashArray(pen:pointer;var dash:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenDashArray";
class Function GdipGetPenDashArray(pen:pointer;var dash:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenDashArray";
class Function GdipGetPenCompoundCount(pen:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenCompoundCount";
class Function GdipSetPenCompoundArray(pen:pointer;var dash:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetPenCompoundArray";
class Function GdipGetPenCompoundArray(pen:pointer;var dash:single;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPenCompoundArray";
//----------------------------------------------------------------------------
// CustomLineCap APIs
//----------------------------------------------------------------------------
class Function GdipCreateCustomLineCap(fillPath:pointer;strokePath:pointer;baseCap:pointer;baseInset:single;var customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateCustomLineCap";
class Function GdipDeleteCustomLineCap(customCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteCustomLineCap";
class Function GdipCloneCustomLineCap(customCap:pointer;var clonedCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneCustomLineCap";
class Function GdipGetCustomLineCapType(customCap:pointer;capType:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapType";
class Function GdipSetCustomLineCapStrokeCaps(customCap:pointer;startCap:pointer;endCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetCustomLineCapStrokeCaps";
class Function GdipGetCustomLineCapStrokeCaps(customCap:pointer;startCap:pointer;endCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapStrokeCaps";
class Function GdipSetCustomLineCapStrokeJoin(customCap:pointer;lineJoin:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetCustomLineCapStrokeJoin";
class Function GdipGetCustomLineCapStrokeJoin(customCap:pointer;lineJoin:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapStrokeJoin";
class Function GdipSetCustomLineCapBaseCap(customCap:pointer;baseCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetCustomLineCapBaseCap";
class Function GdipGetCustomLineCapBaseCap(customCap:pointer;baseCap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapBaseCap";
class Function GdipSetCustomLineCapBaseInset(customCap:pointer;inset:single):integer;stdcall;external "gdiplus.dll" name "GdipSetCustomLineCapBaseInset";
class Function GdipGetCustomLineCapBaseInset(customCap:pointer;var inset:single):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapBaseInset";
class Function GdipSetCustomLineCapWidthScale(customCap:pointer;widthScale:single):integer;stdcall;external "gdiplus.dll" name "GdipSetCustomLineCapWidthScale";
class Function GdipGetCustomLineCapWidthScale(customCap:pointer;var widthScale:single):integer;stdcall;external "gdiplus.dll" name "GdipGetCustomLineCapWidthScale";
//----------------------------------------------------------------------------
// AdjustableArrowCap APIs
//----------------------------------------------------------------------------
class Function GdipCreateAdjustableArrowCap(height:single;width:single;isFilled:pointer;var cap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateAdjustableArrowCap";
class Function GdipSetAdjustableArrowCapHeight(cap:pointer;height:single):integer;stdcall;external "gdiplus.dll" name "GdipSetAdjustableArrowCapHeight";
class Function GdipGetAdjustableArrowCapHeight(cap:pointer;var height:single):integer;stdcall;external "gdiplus.dll" name "GdipGetAdjustableArrowCapHeight";
class Function GdipSetAdjustableArrowCapWidth(cap:pointer;width:single):integer;stdcall;external "gdiplus.dll" name "GdipSetAdjustableArrowCapWidth";
class Function GdipGetAdjustableArrowCapWidth(cap:pointer;var width:single):integer;stdcall;external "gdiplus.dll" name "GdipGetAdjustableArrowCapWidth";
class Function GdipSetAdjustableArrowCapMiddleInset(cap:pointer;middleInset:single):integer;stdcall;external "gdiplus.dll" name "GdipSetAdjustableArrowCapMiddleInset";
class Function GdipGetAdjustableArrowCapMiddleInset(cap:pointer;var middleInset:single):integer;stdcall;external "gdiplus.dll" name "GdipGetAdjustableArrowCapMiddleInset";
class Function GdipSetAdjustableArrowCapFillState(cap:pointer;fillState:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetAdjustableArrowCapFillState";
class Function GdipGetAdjustableArrowCapFillState(cap:pointer;fillState:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetAdjustableArrowCapFillState";
//----------------------------------------------------------------------------
// Image APIs
//----------------------------------------------------------------------------
class Function GdipLoadImageFromStream(stream:pointer;var image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipLoadImageFromStream";
class Function GdipLoadImageFromFile(filename:string;var image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipLoadImageFromFile";
class Function GdipLoadImageFromStreamICM(stream:pointer;var image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipLoadImageFromStreamICM";
class Function GdipLoadImageFromFileICM(filename:string;var image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipLoadImageFromFileICM";
class Function GdipCloneImage(image:pointer;var cloneImage:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneImage";
class Function GdipDisposeImage(image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDisposeImage";
class Function GdipSaveImageToFile(image:pointer;filename:string;clsidEncoder:pointer;encoderParams:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSaveImageToFile";
class Function GdipSaveImageToStream(image:pointer;stream:pointer;clsidEncoder:pointer;encoderParams:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSaveImageToStream";
class Function GdipSaveAdd(image:pointer;encoderParams:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSaveAdd";
class Function GdipSaveAddImage(image:pointer;newImage:pointer;encoderParams:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSaveAddImage";
class Function GdipGetImageGraphicsContext(image:pointer;var graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageGraphicsContext";
class Function GdipGetImageBounds(image:pointer;srcRect:pointer;srcUnit:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageBounds";
class Function GdipGetImageDimension(image:pointer;var width:single;var height:single):integer;stdcall;external "gdiplus.dll" name "GdipGetImageDimension";
class Function GdipGetImageType(image:pointer;type:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageType";
class Function GdipGetImageWidth(image:pointer;var width:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageWidth";
class Function GdipGetImageHeight(image:pointer;var height:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageHeight";
class Function GdipGetImageHorizontalResolution(image:pointer;var resolution:single):integer;stdcall;external "gdiplus.dll" name "GdipGetImageHorizontalResolution";
class Function GdipGetImageVerticalResolution(image:pointer;var resolution:single):integer;stdcall;external "gdiplus.dll" name "GdipGetImageVerticalResolution";
class Function GdipGetImageFlags(image:pointer;var flags:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageFlags";
class Function GdipGetImageRawFormat(image:pointer;format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageRawFormat";
class Function GdipGetImagePixelFormat(image:pointer;format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImagePixelFormat";
class Function GdipGetImageThumbnail(image:pointer;thumbWidth:integer;thumbHeight:integer;var thumbImage:pointer;callback:pointer;callbackData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageThumbnail";
class Function GdipGetEncoderParameterListSize(image:pointer;clsidEncoder:pointer;var size:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetEncoderParameterListSize";
class Function GdipGetEncoderParameterList(image:pointer;clsidEncoder:pointer;size:integer;buffer:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetEncoderParameterList";
class Function GdipImageGetFrameDimensionsCount(image:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipImageGetFrameDimensionsCount";
class Function GdipImageGetFrameDimensionsList(image:pointer;dimensionIDs:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipImageGetFrameDimensionsList";
class Function GdipImageGetFrameCount(image:pointer;dimensionID:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipImageGetFrameCount";
class Function GdipImageSelectActiveFrame(image:pointer;dimensionID:pointer;frameIndex:integer):integer;stdcall;external "gdiplus.dll" name "GdipImageSelectActiveFrame";
class Function GdipImageRotateFlip(image:pointer;rfType:pointer):integer;stdcall;external "gdiplus.dll" name "GdipImageRotateFlip";
class Function GdipGetImagePalette(image:pointer;palette:pointer;size:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetImagePalette";
class Function GdipSetImagePalette(image:pointer;palette:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImagePalette";
class Function GdipGetImagePaletteSize(image:pointer;var size:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetImagePaletteSize";
class Function GdipGetPropertyCount(image:pointer;var numOfProperty:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPropertyCount";
class Function GdipGetPropertyIdList(image:pointer;numOfProperty:integer;list:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPropertyIdList";
class Function GdipGetPropertyItemSize(image:pointer;propId:pointer;var size:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPropertyItemSize";
class Function GdipGetPropertyItem(image:pointer;propId:pointer;propSize:integer;buffer:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPropertyItem";
class Function GdipGetPropertySize(image:pointer;var totalBufferSize:integer;var numProperties:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetPropertySize";
class Function GdipGetAllPropertyItems(image:pointer;totalBufferSize:integer;numProperties:integer;allItems:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetAllPropertyItems";
class Function GdipRemovePropertyItem(image:pointer;propId:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRemovePropertyItem";
class Function GdipSetPropertyItem(image:pointer;item:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPropertyItem";
class Function GdipImageForceValidation(image:pointer):integer;stdcall;external "gdiplus.dll" name "GdipImageForceValidation";
//----------------------------------------------------------------------------
// Bitmap APIs
//----------------------------------------------------------------------------
class Function GdipCreateBitmapFromStream(stream:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromStream";
class Function GdipCreateBitmapFromFile(filename:string;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromFile";
class Function GdipCreateBitmapFromStreamICM(stream:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromStreamICM";
class Function GdipCreateBitmapFromFileICM(filename:string;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromFileICM";
class Function GdipCreateBitmapFromScan0(width:integer;height:integer;stride:integer;format:pointer;):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromScan0";
class Function GdipCreateBitmapFromGraphics(width:integer;height:integer;target:pointer;var bitmap:pointer):pointer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromGraphics";
class Function GdipCreateBitmapFromDirectDrawSurface(surface:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromDirectDrawSurface";
class Function GdipCreateBitmapFromGdiDib(gdiBitmapInfo:pointer;gdiBitmapData:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromGdiDib";
class Function GdipCreateBitmapFromHBITMAP(hbm:pointer;hpal:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromHBITMAP";
class Function GdipCreateHBITMAPFromBitmap(bitmap:pointer;var hbmReturn:pointer;background:integer):integer;stdcall;external "gdiplus.dll" name "GdipCreateHBITMAPFromBitmap";
class Function GdipCreateBitmapFromHICON(hicon:pointer;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromHICON";
class Function GdipCreateHICONFromBitmap(bitmap:pointer;var hbmReturn:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateHICONFromBitmap";
class Function GdipCreateBitmapFromResource(hInstance:pointer;lpBitmapName:string;var bitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateBitmapFromResource";
class Function GdipCloneBitmapArea(x:single;y:single;width:single;height:single;format:pointer;srcBitmap:pointer;var dstBitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneBitmapArea";
class Function GdipCloneBitmapAreaI(x:integer;y:integer;width:integer;height:integer;format:pointer;srcBitmap:pointer;var dstBitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneBitmapAreaI";
class Function GdipBitmapLockBits(bitmap:pointer;rect:pointer;flags:integer;format:pointer;lockedBitmapData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBitmapLockBits";
class Function GdipBitmapUnlockBits(bitmap:pointer;lockedBitmapData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipBitmapUnlockBits";
class Function GdipBitmapGetPixel(bitmap:pointer;x:integer;y:integer;var color:integer):integer;stdcall;external "gdiplus.dll" name "GdipBitmapGetPixel";
class Function GdipBitmapSetPixel(bitmap:pointer;x:integer;y:integer;color:integer):integer;stdcall;external "gdiplus.dll" name "GdipBitmapSetPixel";
class Function GdipBitmapSetResolution(bitmap:pointer;xdpi:single;ydpi:single):integer;stdcall;external "gdiplus.dll" name "GdipBitmapSetResolution";
//----------------------------------------------------------------------------
// ImageAttributes APIs
//----------------------------------------------------------------------------
class Function GdipCreateImageAttributes(var imageattr:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateImageAttributes";
class Function GdipCloneImageAttributes(imageattr:pointer;var cloneImageattr:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneImageAttributes";
class Function GdipDisposeImageAttributes(imageattr:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDisposeImageAttributes";
class Function GdipSetImageAttributesToIdentity(imageattr:pointer;type:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesToIdentity";
class Function GdipResetImageAttributes(imageattr:pointer;type:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetImageAttributes";
class Function GdipSetImageAttributesColorMatrix(imageattr:pointer;type:pointer;enableFlag:pointer;colorMatrix:pointer;grayMatrix:pointer;flags:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesColorMatrix";
class Function GdipSetImageAttributesThreshold(imageattr:pointer;type:pointer;enableFlag:pointer;threshold:single):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesThreshold";
class Function GdipSetImageAttributesGamma(imageattr:pointer;type:pointer;enableFlag:pointer;gamma:single):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesGamma";
class Function GdipSetImageAttributesNoOp(imageattr:pointer;type:pointer;enableFlag:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesNoOp";
class Function GdipSetImageAttributesColorKeys(imageattr:pointer;type:pointer;enableFlag:pointer;colorLow:integer;colorHigh:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesColorKeys";
class Function GdipSetImageAttributesOutputChannel(imageattr:pointer;type:pointer;enableFlag:pointer;channelFlags:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesOutputChannel";
class Function GdipSetImageAttributesOutputChannelColorProfile(imageattr:pointer;type:pointer;enableFlag:pointer;colorProfileFilename:string):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesOutputChannelColorProfile";
class Function GdipSetImageAttributesRemapTable(imageattr:pointer;type:pointer;enableFlag:pointer;mapSize:integer;map:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesRemapTable";
class Function GdipSetImageAttributesWrapMode(imageAttr:pointer;wrap:pointer;argb:integer;clamp:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesWrapMode";
class Function GdipSetImageAttributesICMMode(imageAttr:pointer;on_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesICMMode";
class Function GdipGetImageAttributesAdjustedPalette(imageAttr:pointer;colorPalette:pointer;colorAdjustType:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageAttributesAdjustedPalette";
//----------------------------------------------------------------------------
// Graphics APIs
//----------------------------------------------------------------------------
class Function GdipFlush(graphics:pointer;intention:pointer):integer;stdcall;external "gdiplus.dll" name "GdipFlush";
class Function GdipCreateFromHDC(hdc:pointer;var graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFromHDC";
class Function GdipCreateFromHDC2(hdc:pointer;hDevice:pointer;var graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFromHDC2";
class Function GdipCreateFromHWND(hwnd:pointer;var graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFromHWND";
class Function GdipCreateFromHWNDICM(hwnd:pointer;var graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFromHWNDICM";
class Function GdipDeleteGraphics(graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteGraphics";
class Function GdipGetDC(graphics:pointer;hdc:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetDC";
class Function GdipReleaseDC(graphics:pointer;hdc:pointer):integer;stdcall;external "gdiplus.dll" name "GdipReleaseDC";
class Function GdipSetCompositingMode(graphics:pointer;compositingMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetCompositingMode";
class Function GdipGetCompositingMode(graphics:pointer;compositingMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCompositingMode";
class Function GdipSetRenderingOrigin(graphics:pointer;x:integer;y:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetRenderingOrigin";
class Function GdipGetRenderingOrigin(graphics:pointer;var x:integer;var y:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetRenderingOrigin";
class Function GdipSetCompositingQuality(graphics:pointer;compositingQuality:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetCompositingQuality";
class Function GdipGetCompositingQuality(graphics:pointer;compositingQuality:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCompositingQuality";
class Function GdipSetSmoothingMode(graphics:pointer;smoothingMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetSmoothingMode";
class Function GdipGetSmoothingMode(graphics:pointer;var smoothingMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetSmoothingMode";
class Function GdipSetPixelOffsetMode(graphics:pointer;pixelOffsetMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetPixelOffsetMode";
class Function GdipGetPixelOffsetMode(graphics:pointer;pixelOffsetMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetPixelOffsetMode";
class Function GdipSetTextRenderingHint(graphics:pointer;mode:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetTextRenderingHint";
class Function GdipGetTextRenderingHint(graphics:pointer;var mode:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetTextRenderingHint";
class Function GdipSetTextContrast(graphics:pointer;contrast:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetTextContrast";
class Function GdipGetTextContrast(graphics:pointer;var contrast:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetTextContrast";
class Function GdipSetInterpolationMode(graphics:pointer;interpolationMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetInterpolationMode";
class Function GdipGetInterpolationMode(graphics:pointer;interpolationMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetInterpolationMode";
class Function GdipSetWorldTransform(graphics:pointer;matrix:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetWorldTransform";
class Function GdipResetWorldTransform(graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetWorldTransform";
class Function GdipMultiplyWorldTransform(graphics:pointer;matrix:pointer;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipMultiplyWorldTransform";
class Function GdipTranslateWorldTransform(graphics:pointer;dx:single;dy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateWorldTransform";
class Function GdipScaleWorldTransform(graphics:pointer;sx:single;sy:single;order_:pointer):integer;stdcall;external "gdiplus.dll" name "GdipScaleWorldTransform";
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 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 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 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 GdipGetDpiY(graphics:pointer;var dpi:single):integer;stdcall;external "gdiplus.dll" name "GdipGetDpiY";
class Function GdipTransformPoints(graphics:pointer;destSpace:pointer;srcSpace:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipTransformPoints";
class Function GdipTransformPointsI(graphics:pointer;destSpace:pointer;srcSpace:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipTransformPointsI";
class 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
class Function GdipCreateHalftonePalette():pointer;stdcall;external "gdiplus.dll" name "GdipCreateHalftonePalette";
class Function GdipDrawLine(graphics:pointer;pen:pointer;x1:single;y1:single;x2:single;y2:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawLine";
class Function GdipDrawLineI(graphics:pointer;pen:pointer;x1:integer;y1:integer;x2:integer;y2:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawLineI";
class Function GdipDrawLines(graphics:pointer;pen:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawLines";
class Function GdipDrawLinesI(graphics:pointer;pen:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawLinesI";
class 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";
class 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";
class 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";
class 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";
class Function GdipDrawBeziers(graphics:pointer;pen:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawBeziers";
class Function GdipDrawBeziersI(graphics:pointer;pen:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawBeziersI";
class Function GdipDrawRectangle(graphics:pointer;pen:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawRectangle";
class Function GdipDrawRectangleI(graphics:pointer;pen:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawRectangleI";
class Function GdipDrawRectangles(graphics:pointer;pen:pointer;rects:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawRectangles";
class Function GdipDrawRectanglesI(graphics:pointer;pen:pointer;rects:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawRectanglesI";
class Function GdipDrawEllipse(graphics:pointer;pen:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawEllipse";
class Function GdipDrawEllipseI(graphics:pointer;pen:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawEllipseI";
class 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";
class 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";
class Function GdipDrawPolygon(graphics:pointer;pen:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawPolygon";
class Function GdipDrawPolygonI(graphics:pointer;pen:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawPolygonI";
class Function GdipDrawPath(graphics:pointer;pen:pointer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawPath";
class Function GdipDrawCurve(graphics:pointer;pen:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurve";
class Function GdipDrawCurveI(graphics:pointer;pen:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurveI";
class Function GdipDrawCurve2(graphics:pointer;pen:pointer;points:pointer;count:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurve2";
class Function GdipDrawCurve2I(graphics:pointer;pen:pointer;points:pointer;count:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurve2I";
class Function GdipDrawCurve3(graphics:pointer;pen:pointer;points:pointer;count:integer;offset:integer;numberOfSegments:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurve3";
class Function GdipDrawCurve3I(graphics:pointer;pen:pointer;points:pointer;count:integer;offset:integer;numberOfSegments:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawCurve3I";
class Function GdipDrawClosedCurve(graphics:pointer;pen:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawClosedCurve";
class Function GdipDrawClosedCurveI(graphics:pointer;pen:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawClosedCurveI";
class Function GdipDrawClosedCurve2(graphics:pointer;pen:pointer;points:pointer;count:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawClosedCurve2";
class Function GdipDrawClosedCurve2I(graphics:pointer;pen:pointer;points:pointer;count:integer;tension:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawClosedCurve2I";
class Function GdipGraphicsClear(graphics:pointer;color:integer):integer;stdcall;external "gdiplus.dll" name "GdipGraphicsClear";
class Function GdipFillRectangle(graphics:pointer;brush:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipFillRectangle";
class Function GdipFillRectangleI(graphics:pointer;brush:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillRectangleI";
class Function GdipFillRectangles(graphics:pointer;brush:pointer;rects:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillRectangles";
class Function GdipFillRectanglesI(graphics:pointer;brush:pointer;rects:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillRectanglesI";
class Function GdipFillPolygon(graphics:pointer;brush:pointer;points:pointer;count:integer;fillMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillPolygon";
class Function GdipFillPolygonI(graphics:pointer;brush:pointer;points:pointer;count:integer;fillMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillPolygonI";
class Function GdipFillPolygon2(graphics:pointer;brush:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillPolygon2";
class Function GdipFillPolygon2I(graphics:pointer;brush:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillPolygon2I";
class Function GdipFillEllipse(graphics:pointer;brush:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipFillEllipse";
class Function GdipFillEllipseI(graphics:pointer;brush:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillEllipseI";
class 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";
class 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";
class Function GdipFillPath(graphics:pointer;brush:pointer;path:pointer):integer;stdcall;external "gdiplus.dll" name "GdipFillPath";
class Function GdipFillClosedCurve(graphics:pointer;brush:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillClosedCurve";
class Function GdipFillClosedCurveI(graphics:pointer;brush:pointer;points:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillClosedCurveI";
class Function GdipFillClosedCurve2(graphics:pointer;brush:pointer;points:pointer;count:integer;tension:single;fillMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillClosedCurve2";
class Function GdipFillClosedCurve2I(graphics:pointer;brush:pointer;points:pointer;count:integer;tension:single;fillMode:integer):integer;stdcall;external "gdiplus.dll" name "GdipFillClosedCurve2I";
class Function GdipFillRegion(graphics:pointer;brush:pointer;region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipFillRegion";
class Function GdipDrawImage(graphics:pointer;image:pointer;x:single;y:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawImage";
class Function GdipDrawImageI(graphics:pointer;image:pointer;x:integer;y:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImageI";
class Function GdipDrawImageRect(graphics:pointer;image:pointer;x:single;y:single;width:single;height:single):integer;stdcall;external "gdiplus.dll" name "GdipDrawImageRect";
class Function GdipDrawImageRectI(graphics:pointer;image:pointer;x:integer;y:integer;width:integer;height:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImageRectI";
class Function GdipDrawImagePoints(graphics:pointer;image:pointer;dstpoints:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImagePoints";
class Function GdipDrawImagePointsI(graphics:pointer;image:pointer;dstpoints:pointer;count:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImagePointsI";
class 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";
class 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";
class 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";
class 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";
class Function GdipDrawImagePointsRect(graphics:pointer;image:pointer;points:pointer;count:integer;srcx:single;srcy:single;srcwidth:single;srcheight:single;srcUnit:pointer;imageAttributes:pointer;callback:pointer;callbackData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImagePointsRect";
class Function GdipDrawImagePointsRectI(graphics:pointer;image:pointer;points:pointer;count:integer;srcx:integer;srcy:integer;srcwidth:integer;srcheight:integer;srcUnit:pointer;imageAttributes:pointer;callback:pointer;callbackData:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawImagePointsRectI";
class Function GdipEnumerateMetafileDestPoint(graphics:pointer;metafile:pointer;destPoint:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestPoint";
class Function GdipEnumerateMetafileDestPointI(graphics:pointer;metafile:pointer;destPoint:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestPointI";
class Function GdipEnumerateMetafileDestRect(graphics:pointer;metafile:pointer;destRect:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestRect";
class Function GdipEnumerateMetafileDestRectI(graphics:pointer;metafile:pointer;destRect:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestRectI";
class Function GdipEnumerateMetafileDestPoints(graphics:pointer;metafile:pointer;destPoints:pointer;count:integer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestPoints";
class Function GdipEnumerateMetafileDestPointsI(graphics:pointer;metafile:pointer;destPoints:pointer;count:integer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileDestPointsI";
class 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";
class 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";
class 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";
class 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";
class Function GdipEnumerateMetafileSrcRectDestPoints(graphics:pointer;metafile:pointer;destPoints:pointer;count:integer;srcRect:pointer;srcUnit:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileSrcRectDestPoints";
class Function GdipEnumerateMetafileSrcRectDestPointsI(graphics:pointer;metafile:pointer;destPoints:pointer;count:integer;srcRect:pointer;srcUnit:pointer;callback:pointer;callbackData:pointer;imageAttributes:pointer):integer;stdcall;external "gdiplus.dll" name "GdipEnumerateMetafileSrcRectDestPointsI";
class Function GdipPlayMetafileRecord(metafile:pointer;recordType:pointer;flags:integer;dataSize:integer;data:pointer):integer;stdcall;external "gdiplus.dll" name "GdipPlayMetafileRecord";
class Function GdipSetClipGraphics(graphics:pointer;srcgraphics:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipGraphics";
class Function GdipSetClipRect(graphics:pointer;x:single;y:single;width:single;height:single;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipRect";
class Function GdipSetClipRectI(graphics:pointer;x:integer;y:integer;width:integer;height:integer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipRectI";
class Function GdipSetClipPath(graphics:pointer;path:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipPath";
class Function GdipSetClipRegion(graphics:pointer;region:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipRegion";
class Function GdipSetClipHrgn(graphics:pointer;hRgn:pointer;combineMode:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetClipHrgn";
class Function GdipResetClip(graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipResetClip";
class Function GdipTranslateClip(graphics:pointer;dx:single;dy:single):integer;stdcall;external "gdiplus.dll" name "GdipTranslateClip";
class Function GdipTranslateClipI(graphics:pointer;dx:integer;dy:integer):integer;stdcall;external "gdiplus.dll" name "GdipTranslateClipI";
class Function GdipGetClip(graphics:pointer;region:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetClip";
class Function GdipGetClipBounds(graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetClipBounds";
class Function GdipGetClipBoundsI(graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetClipBoundsI";
class Function GdipIsClipEmpty(graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsClipEmpty";
class Function GdipGetVisibleClipBounds(graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetVisibleClipBounds";
class Function GdipGetVisibleClipBoundsI(graphics:pointer;rect:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetVisibleClipBoundsI";
class Function GdipIsVisibleClipEmpty(graphics:pointer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleClipEmpty";
class Function GdipIsVisiblePoint(graphics:pointer;x:single;y:single;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisiblePoint";
class Function GdipIsVisiblePointI(graphics:pointer;x:integer;y:integer;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisiblePointI";
class Function GdipIsVisibleRect(graphics:pointer;x:single;y:single;width:single;height:single;result:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsVisibleRect";
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 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 GdipBeginContainerI(graphics:pointer;dstrect:pointer;srcrect:pointer;unit_:pointer;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 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 GdipGetMetafileHeaderFromEmf(hEmf:pointer;header:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileHeaderFromEmf";
class Function GdipGetMetafileHeaderFromFile(filename:string;header:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileHeaderFromFile";
class Function GdipGetMetafileHeaderFromStream(stream:pointer;header:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileHeaderFromStream";
class Function GdipGetMetafileHeaderFromMetafile(metafile:pointer;header:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileHeaderFromMetafile";
class Function GdipGetHemfFromMetafile(metafile:pointer;hEmf:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetHemfFromMetafile";
class Function GdipCreateStreamOnFile(filename:string;access:integer;var stream:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateStreamOnFile";
class Function GdipCreateMetafileFromWmf(hWmf:pointer;deleteWmf:pointer;wmfPlaceableFileHeader:pointer;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMetafileFromWmf";
class Function GdipCreateMetafileFromEmf(hEmf:pointer;deleteEmf:pointer;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMetafileFromEmf";
class Function GdipCreateMetafileFromFile(file:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMetafileFromFile";
class Function GdipCreateMetafileFromWmfFile(file:string;wmfPlaceableFileHeader:pointer;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMetafileFromWmfFile";
class Function GdipCreateMetafileFromStream(stream:pointer;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateMetafileFromStream";
class Function GdipRecordMetafile(referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafile";
class Function GdipRecordMetafileI(referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafileI";
class Function GdipRecordMetafileFileName(fileName:string;referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafileFileName";
class Function GdipRecordMetafileFileNameI(fileName:string;referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafileFileNameI";
class Function GdipRecordMetafileStream(stream:pointer;referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafileStream";
class Function GdipRecordMetafileStreamI(stream:pointer;referenceHdc:pointer;type:pointer;frameRect:pointer;frameUnit:pointer;description:string;var metafile:pointer):integer;stdcall;external "gdiplus.dll" name "GdipRecordMetafileStreamI";
class Function GdipSetMetafileDownLevelRasterizationLimit(metafile:pointer;metafileRasterizationLimitDpi:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetMetafileDownLevelRasterizationLimit";
class Function GdipGetMetafileDownLevelRasterizationLimit(metafile:pointer;var metafileRasterizationLimitDpi:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetMetafileDownLevelRasterizationLimit";
class Function GdipGetImageDecodersSize(var numDecoders:integer;pn4:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageDecodersSize";
class Function GdipGetImageDecoders(numDecoders:integer;size:integer;decoders:pointer):pointer;stdcall;external "gdiplus.dll" name "GdipGetImageDecoders";
class Function GdipGetImageEncodersSize(var numEncoders:integer;pn4:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetImageEncodersSize";
class Function GdipGetImageEncoders(numEncoders:integer;size:integer;encoders:pointer):pointer;stdcall;external "gdiplus.dll" name "GdipGetImageEncoders";
class Function GdipComment(graphics:pointer;sizeData:integer;data:pointer):integer;stdcall;external "gdiplus.dll" name "GdipComment";
//----------------------------------------------------------------------------
// FontFamily APIs
//----------------------------------------------------------------------------
class Function GdipCreateFontFamilyFromName(name:string;fontCollection:pointer;var fontFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateFontFamilyFromName";
class Function GdipDeleteFontFamily(fontFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteFontFamily";
class Function GdipCloneFontFamily(fontFamily:pointer;var clonedFontFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCloneFontFamily";
class Function GdipGetGenericFontFamilySansSerif(var nativeFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetGenericFontFamilySansSerif";
class Function GdipGetGenericFontFamilySerif(var nativeFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetGenericFontFamilySerif";
class Function GdipGetGenericFontFamilyMonospace(var nativeFamily:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetGenericFontFamilyMonospace";
class Function GdipGetFamilyName(family:pointer;name:pointer;language:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetFamilyName";
class Function GdipIsStyleAvailable(family:pointer;style:integer;IsStyleAvailable:pointer):integer;stdcall;external "gdiplus.dll" name "GdipIsStyleAvailable";
class Function GdipFontCollectionEnumerable(fontCollection:pointer;graphics:pointer;var numFound:integer):integer;stdcall;external "gdiplus.dll" name "GdipFontCollectionEnumerable";
class Function GdipFontCollectionEnumerate(fontCollection:pointer;numSought:integer;gpfamilies:pointer;var numFound:integer;graphics:pointer):integer;stdcall;external "gdiplus.dll" name "GdipFontCollectionEnumerate";
class Function GdipGetEmHeight(family:pointer;style:integer;EmHeight:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetEmHeight";
class Function GdipGetCellAscent(family:pointer;style:integer;CellAscent:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCellAscent";
class Function GdipGetCellDescent(family:pointer;style:integer;CellDescent:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetCellDescent";
class Function GdipGetLineSpacing(family:pointer;style:integer;LineSpacing:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLineSpacing";
//----------------------------------------------------------------------------
// Font APIs
//----------------------------------------------------------------------------
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 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 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 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 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 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 GdipGetLogFontA(font:pointer;graphics:pointer;logfontA:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLogFontA";
class Function GdipGetLogFontW(font:pointer;graphics:pointer;logfontW:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetLogFontW";
class Function GdipNewInstalledFontCollection(var fontCollection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipNewInstalledFontCollection";
class Function GdipNewPrivateFontCollection(var fontCollection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipNewPrivateFontCollection";
class Function GdipDeletePrivateFontCollection(var fontCollection:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeletePrivateFontCollection";
class Function GdipGetFontCollectionFamilyCount(fontCollection:pointer;var numFound:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetFontCollectionFamilyCount";
class Function GdipGetFontCollectionFamilyList(fontCollection:pointer;numSought:integer;gpfamilies:pointer;var numFound:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetFontCollectionFamilyList";
class Function GdipPrivateAddFontFile(fontCollection:pointer;filename:string):integer;stdcall;external "gdiplus.dll" name "GdipPrivateAddFontFile";
class Function GdipPrivateAddMemoryFont(fontCollection:pointer;memory:pointer;length:integer):integer;stdcall;external "gdiplus.dll" name "GdipPrivateAddMemoryFont";
//----------------------------------------------------------------------------
// Text APIs
//----------------------------------------------------------------------------
class Function GdipDrawString(graphics:pointer;string:string;length:integer;font:pointer;layoutRect:pointer;stringFormat:pointer;brush:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDrawString";
class 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";
class 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";
class 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";
class 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
//----------------------------------------------------------------------------
class Function GdipCreateStringFormat(formatAttributes:integer;language:pointer;var format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateStringFormat";
class Function GdipStringFormatGetGenericDefault(var format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipStringFormatGetGenericDefault";
class Function GdipStringFormatGetGenericTypographic(var format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipStringFormatGetGenericTypographic";
class Function GdipDeleteStringFormat(format:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteStringFormat";
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 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 GdipGetStringFormatAlign(format:pointer;align:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatAlign";
class Function GdipSetStringFormatLineAlign(format:pointer;align:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatLineAlign";
class Function GdipGetStringFormatLineAlign(format:pointer;align:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatLineAlign";
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 GdipSetStringFormatHotkeyPrefix(format:pointer;hotkeyPrefix:integer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatHotkeyPrefix";
class Function GdipGetStringFormatHotkeyPrefix(format:pointer;var hotkeyPrefix:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatHotkeyPrefix";
class Function GdipSetStringFormatTabStops(format:pointer;firstTabOffset:single;count:integer;var tabStops:single):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatTabStops";
class Function GdipGetStringFormatTabStops(format:pointer;count:integer;var firstTabOffset:single;var tabStops:single):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatTabStops";
class Function GdipGetStringFormatTabStopCount(format:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatTabStopCount";
class Function GdipSetStringFormatDigitSubstitution(format:pointer;language:pointer;substitute:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatDigitSubstitution";
class Function GdipGetStringFormatDigitSubstitution(format:pointer;language:pointer;substitute:pointer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatDigitSubstitution";
class Function GdipGetStringFormatMeasurableCharacterRangeCount(format:pointer;var count:integer):integer;stdcall;external "gdiplus.dll" name "GdipGetStringFormatMeasurableCharacterRangeCount";
class Function GdipSetStringFormatMeasurableCharacterRanges(format:pointer;rangeCount:integer;ranges:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetStringFormatMeasurableCharacterRanges";
//----------------------------------------------------------------------------
// Cached Bitmap APIs
//----------------------------------------------------------------------------
class Function GdipCreateCachedBitmap(bitmap:pointer;graphics:pointer;var cachedBitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipCreateCachedBitmap";
class Function GdipDeleteCachedBitmap(cachedBitmap:pointer):integer;stdcall;external "gdiplus.dll" name "GdipDeleteCachedBitmap";
class Function GdipDrawCachedBitmap(graphics:pointer;cachedBitmap:pointer;x:integer;y:integer):integer;stdcall;external "gdiplus.dll" name "GdipDrawCachedBitmap";
class Function GdipEmfToWmfBits(hemf:pointer;cbData16:integer;pData16:pointer;iMapMode:integer;eFlags:integer):integer;stdcall;external "gdiplus.dll" name "GdipEmfToWmfBits";
class Function GdipSetImageAttributesCachedBackground(imageattr:pointer;enableFlag:pointer):integer;stdcall;external "gdiplus.dll" name "GdipSetImageAttributesCachedBackground";
class Function GdipTestControl(control:pointer;param:pointer):integer;stdcall;external "gdiplus.dll" name "GdipTestControl";
class Function GdiplusNotificationHook(token:pointer):integer;stdcall;external "gdiplus.dll" name "GdiplusNotificationHook";
class procedure GdiplusNotificationUnhook(token:pointer);stdcall;external "gdiplus.dll" name "GdiplusNotificationUnhook";
class Function GdiplusStartup(var token:pointer;input:pointer;var output:integer){@explan(说明)启动gdi+%%}:integer;stdcall;external "gdiplus.dll" name "GdiplusStartup";
class procedure GdiplusShutdown(token:pointer){@explan(说明)关闭gdi+%%};stdcall;external "gdiplus.dll" name "GdiplusShutdown";
{$endif}
end