From 5d46cfbe3549a158f7915ee514f5411619779b62 Mon Sep 17 00:00:00 2001 From: spopova Date: Wed, 16 Oct 2019 14:01:47 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D1=8F=D0=BC=D0=BE=D1=83=D0=B3?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Pramougolnik/Arrow.cfg | 38 + Pramougolnik/Arrow.dof | 136 + Pramougolnik/Arrow_Icon.ico | Bin 0 -> 4286 bytes Pramougolnik/DirectDraw.pas | 7161 +++++++++++++++++++ Pramougolnik/DirectX.inc | 29 + Pramougolnik/GDIPAPI.dcu | Bin 0 -> 191354 bytes Pramougolnik/GDIPAPI.pas | 7009 +++++++++++++++++++ Pramougolnik/GDIPOBJ.dcu | Bin 0 -> 344360 bytes Pramougolnik/GDIPOBJ.pas | 7975 ++++++++++++++++++++++ Pramougolnik/GDIPUTIL.pas | 378 + Pramougolnik/Jedix.inc | 628 ++ Pramougolnik/Rectangle.dpr | 13 + Pramougolnik/Rectangle.dproj | 872 +++ Pramougolnik/Rectangle.dproj.local | 6 + Pramougolnik/Rectangle.identcache | Bin 0 -> 138 bytes Pramougolnik/Rectangle.res | Bin 0 -> 6840 bytes Pramougolnik/Unit1.dcu | Bin 0 -> 15333 bytes Pramougolnik/Unit1.ddp | Bin 0 -> 51 bytes Pramougolnik/Unit1.dfm | 40 + Pramougolnik/Unit1.pas | 292 + Pramougolnik/__history/Rectangle.dpr.~1~ | 13 + Pramougolnik/__history/Unit1.dfm.~1~ | 40 + Pramougolnik/__history/Unit1.dfm.~2~ | 40 + Pramougolnik/__history/Unit1.pas.~1~ | 320 + 24 files changed, 24990 insertions(+) create mode 100644 Pramougolnik/Arrow.cfg create mode 100644 Pramougolnik/Arrow.dof create mode 100644 Pramougolnik/Arrow_Icon.ico create mode 100644 Pramougolnik/DirectDraw.pas create mode 100644 Pramougolnik/DirectX.inc create mode 100644 Pramougolnik/GDIPAPI.dcu create mode 100644 Pramougolnik/GDIPAPI.pas create mode 100644 Pramougolnik/GDIPOBJ.dcu create mode 100644 Pramougolnik/GDIPOBJ.pas create mode 100644 Pramougolnik/GDIPUTIL.pas create mode 100644 Pramougolnik/Jedix.inc create mode 100644 Pramougolnik/Rectangle.dpr create mode 100644 Pramougolnik/Rectangle.dproj create mode 100644 Pramougolnik/Rectangle.dproj.local create mode 100644 Pramougolnik/Rectangle.identcache create mode 100644 Pramougolnik/Rectangle.res create mode 100644 Pramougolnik/Unit1.dcu create mode 100644 Pramougolnik/Unit1.ddp create mode 100644 Pramougolnik/Unit1.dfm create mode 100644 Pramougolnik/Unit1.pas create mode 100644 Pramougolnik/__history/Rectangle.dpr.~1~ create mode 100644 Pramougolnik/__history/Unit1.dfm.~1~ create mode 100644 Pramougolnik/__history/Unit1.dfm.~2~ create mode 100644 Pramougolnik/__history/Unit1.pas.~1~ diff --git a/Pramougolnik/Arrow.cfg b/Pramougolnik/Arrow.cfg new file mode 100644 index 0000000..e9c1cc1 --- /dev/null +++ b/Pramougolnik/Arrow.cfg @@ -0,0 +1,38 @@ +-$A8 +-$B- +-$C+ +-$D+ +-$E- +-$F- +-$G+ +-$H+ +-$I+ +-$J- +-$K- +-$L+ +-$M- +-$N+ +-$O+ +-$P+ +-$Q- +-$R- +-$S- +-$T- +-$U- +-$V+ +-$W- +-$X+ +-$YD +-$Z1 +-cg +-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +-H+ +-W+ +-M +-$M16384,1048576 +-K$00400000 +-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" +-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" +-w-UNSAFE_TYPE +-w-UNSAFE_CODE +-w-UNSAFE_CAST diff --git a/Pramougolnik/Arrow.dof b/Pramougolnik/Arrow.dof new file mode 100644 index 0000000..5f45ffa --- /dev/null +++ b/Pramougolnik/Arrow.dof @@ -0,0 +1,136 @@ +[FileVersion] +Version=7.0 +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=0 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +NamespacePrefix= +SymbolDeprecated=1 +SymbolLibrary=1 +SymbolPlatform=1 +UnitLibrary=1 +UnitPlatform=1 +UnitDeprecated=1 +HResultCompat=1 +HidingMember=1 +HiddenVirtual=1 +Garbage=1 +BoundsError=1 +ZeroNilCompat=1 +StringConstTruncated=1 +ForLoopVarVarPar=1 +TypedConstVarPar=1 +AsgToTypedConst=1 +CaseLabelRange=1 +ForVariable=1 +ConstructingAbstract=1 +ComparisonFalse=1 +ComparisonTrue=1 +ComparingSignedUnsigned=1 +CombiningSignedUnsigned=1 +UnsupportedConstruct=1 +FileOpen=1 +FileOpenUnitSrc=1 +BadGlobalSymbol=1 +DuplicateConstructorDestructor=1 +InvalidDirective=1 +PackageNoLink=1 +PackageThreadVar=1 +ImplicitImport=1 +HPPEMITIgnored=1 +NoRetVal=1 +UseBeforeDef=1 +ForLoopVarUndef=1 +UnitNameMismatch=1 +NoCFGFileFound=1 +MessageDirective=1 +ImplicitVariants=1 +UnicodeToLocale=1 +LocaleToUnicode=1 +ImagebaseMultiple=1 +SuspiciousTypecast=1 +PrivatePropAccessor=1 +UnsafeType=0 +UnsafeCode=0 +UnsafeCast=0 +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP +Conditionals= +DebugSourceDirs= +UsePackages=0 +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= +[Language] +ActiveLang= +ProjectLang= +RootDir= +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1049 +CodePage=1251 +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= diff --git a/Pramougolnik/Arrow_Icon.ico b/Pramougolnik/Arrow_Icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..63b510b60d8bf9f871afabc9fb3ffd96f685b13d GIT binary patch literal 4286 zcmZQzU<5)11qLu!A;7>O24rafu>ue~05MP&NCE*+?g}piLj;B#$pmyU2M}`;z??vN zW+0{}U<4Yb4aC_%Tm;0$I50>q2#EQC7^H_ch?d@!{-a{r`dXca7RV8vdi{Z#4e_(*U&q;{caGOeESb3iLRsk1kszYE{AZ%;(6MSVaNDf;5_5k(CBk6^i0iyYU7*vO1xQ$msN|=e4BbJGa ztsYp0H=*OeH6->Z^xujX2Wx-2vFCA~7rL06*jHJkCW<6K(fv(MsR~M1& zhOS#H|GO^EdMIM6Y6mou1<6>Fm}xW9SQGbkEUF_S?ZM)^_4=~^4s%nl@f*n*11+Px z9a>+{l(es-ukykig5l73Wzm1@X>q4{n{}dc;!0L;0 z|C{zl?q%m^SD?1tFsCH$Zci&bHRaEg2b)mB0^}}(wxD&uoGl4di&3`0^izXQ+Se7F zb9};&$xt`sotX4ryVhqe&}?B^+YNJn+P+Tb%%gpu(hhb1)hKoC28x5qcAEMdW;cw^ z-rr|pJ}Ei|$R}8)!SsyMgDV97gTMpE|Njp#kc=My(;E~se*o4kKY(fQ53t?wkAcDd hKLbPk{|2C$AhSO(|NsAk{r~?z{Qv*|vj _di_IDirectDraw;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDraw2;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDraw4;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDraw7;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDrawSurface;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDrawSurface2;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDrawSurface3;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDrawSurface4;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDrawSurface7;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDrawPalette;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDrawClipper;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDrawColorControl;'} + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDrawGammaControl;'} + IDirectDraw = interface; + {$EXTERNALSYM IDirectDraw} + IDirectDraw2 = interface; + {$EXTERNALSYM IDirectDraw2} + IDirectDraw4 = interface; + {$EXTERNALSYM IDirectDraw4} + IDirectDraw7 = interface; + {$EXTERNALSYM IDirectDraw7} + IDirectDrawSurface = interface; + {$EXTERNALSYM IDirectDrawSurface} + IDirectDrawSurface2 = interface; + {$EXTERNALSYM IDirectDrawSurface2} + IDirectDrawSurface3 = interface; + {$EXTERNALSYM IDirectDrawSurface3} + IDirectDrawSurface4 = interface; + {$EXTERNALSYM IDirectDrawSurface4} + IDirectDrawSurface7 = interface; + {$EXTERNALSYM IDirectDrawSurface7} + + IDirectDrawPalette = interface; + {$EXTERNALSYM IDirectDrawPalette} + IDirectDrawClipper = interface; + {$EXTERNALSYM IDirectDrawClipper} + IDirectDrawColorControl = interface; + {$EXTERNALSYM IDirectDrawColorControl} + IDirectDrawGammaControl = interface; + {$EXTERNALSYM IDirectDrawGammaControl} + +(* + * Generic pixel format with 8-bit RGB and alpha components + *) + PDDARGB = ^TDDARGB; + _DDARGB = packed record + blue: Byte; + green: Byte; + red: Byte; + alpha: Byte; + end; + {$EXTERNALSYM _DDARGB} + DDARGB = _DDARGB; + {$EXTERNALSYM DDARGB} + TDDARGB = _DDARGB; + +(* + * This version of the structure remains for backwards source compatibility. + * The DDARGB structure is the one that should be used for all DirectDraw APIs. + *) + PDDRGBA = ^TDDRGBA; + _DDRGBA = packed record + red : Byte; + green : Byte; + blue : Byte; + alpha : Byte; + end; + {$EXTERNALSYM _DDRGBA} + DDRGBA = _DDRGBA; + {$EXTERNALSYM DDRGBA} + TDDRGBA = _DDRGBA; + +(* + * TDDColorKey + *) + PDDColorKey = ^TDDColorKey; + _DDCOLORKEY = packed record + dwColorSpaceLowValue: DWORD; // low boundary of color space that is to + // be treated as Color Key, inclusive + dwColorSpaceHighValue: DWORD; // high boundary of color space that is + // to be treated as Color Key, inclusive + end; + {$EXTERNALSYM _DDCOLORKEY} + DDCOLORKEY = _DDCOLORKEY; + {$EXTERNALSYM DDCOLORKEY} + TDDColorKey = _DDCOLORKEY; + +// Delphi 5 and up don't allow interfaces in variant records +// so we have to use pointers instead (which can be type-casted into interfaces): + +{$IFDEF COMPILER5_UP} + PDirectDrawSurface = Pointer; +{$ELSE} + PDirectDrawSurface = IDirectDrawSurface; +{$ENDIF} + +(* + * TDDBltFX + * Used to pass override information to the DIRECTDRAWSURFACE callback Blt. + *) + PDDBltFX = ^TDDBltFX; + _DDBLTFX = packed record + dwSize : DWORD; // size of structure + dwDDFX : DWORD; // FX operations + dwROP : DWORD; // Win32 raster operations + dwDDROP : DWORD; // Raster operations new for DirectDraw + dwRotationAngle : DWORD; // Rotation angle for blt + dwZBufferOpCode : DWORD; // ZBuffer compares + dwZBufferLow : DWORD; // Low limit of Z buffer + dwZBufferHigh : DWORD; // High limit of Z buffer + dwZBufferBaseDest : DWORD; // Destination base value + dwZDestConstBitDepth : DWORD; // Bit depth used to specify Z constant for destination + case Integer of + 0: ( + dwZDestConst : DWORD // Constant to use as Z buffer for dest + ); + 1: ( + lpDDSZBufferDest : PDirectDrawSurface; // Surface to use as Z buffer for dest + dwZSrcConstBitDepth : DWORD; // Bit depth used to specify Z constant for source + case integer of + 0: ( + dwZSrcConst : DWORD; // Constant to use as Z buffer for src + ); + 1: ( + lpDDSZBufferSrc : PDirectDrawSurface; // Surface to use as Z buffer for src + dwAlphaEdgeBlendBitDepth : DWORD; // Bit depth used to specify constant for alpha edge blend + dwAlphaEdgeBlend : DWORD; // Alpha for edge blending + dwReserved : DWORD; + dwAlphaDestConstBitDepth : DWORD; // Bit depth used to specify alpha constant for destination + case integer of + 0: ( + dwAlphaDestConst : DWORD; // Constant to use as Alpha Channel + ); + 1: ( + lpDDSAlphaDest : PDirectDrawSurface; // Surface to use as Alpha Channel + dwAlphaSrcConstBitDepth : DWORD; // Bit depth used to specify alpha constant for source + case integer of + 0: ( + dwAlphaSrcConst : DWORD; // Constant to use as Alpha Channel + ); + 1: ( + lpDDSAlphaSrc : PDirectDrawSurface; // Surface to use as Alpha Channel + case integer of + 0: ( + dwFillColor : DWORD; // color in RGB or Palettized + ); + 1: ( + dwFillDepth : DWORD; // depth value for z-buffer + ); + 2: ( + dwFillPixel : DWORD; // pixel value + ); + 3: ( + lpDDSPattern : PDirectDrawSurface; // Surface to use as pattern + ddckDestColorkey : TDDColorKey; // DestColorkey override + ddckSrcColorkey : TDDColorKey; // SrcColorkey override + ) + ) + ) + ) + ) + end; + {$EXTERNALSYM _DDBLTFX} + DDBLTFX = _DDBLTFX; + {$EXTERNALSYM DDBLTFX} + TDDBltFX = _DDBLTFX; + +(* + * TDDSCaps + *) + PDDSCaps = ^TDDSCaps; + _DDSCAPS = packed record + dwCaps: DWORD; // capabilities of surface wanted + end; + {$EXTERNALSYM _DDSCAPS} + DDSCAPS = _DDSCAPS; + {$EXTERNALSYM DDSCAPS} + TDDSCaps = _DDSCAPS; + +(* + * TDDOSCaps + *) + PDDOSCaps = ^TDDOSCaps; + _DDOSCAPS = packed record + dwCaps: DWORD; // capabilities of surface wanted + end; + {$EXTERNALSYM _DDOSCAPS} + DDOSCAPS = _DDOSCAPS; + {$EXTERNALSYM DDOSCAPS} + TDDOSCaps = _DDOSCAPS; + +(* + * This structure is used internally by DirectDraw. + *) + PDDSCapsEx = ^TDDSCapsEx; + _DDSCAPSEX = packed record + dwCaps2 : DWORD; + dwCaps3 : DWORD; + dwCaps4 : DWORD; + end; + {$EXTERNALSYM _DDSCAPSEX} + DDSCAPSEX = _DDSCAPSEX; + {$EXTERNALSYM DDSCAPSEX} + TDDSCapsEx = _DDSCAPSEX; + +(* + * TDDSCaps2 + *) + PDDSCaps2 = ^TDDSCaps2; + _DDSCAPS2 = packed record + dwCaps: DWORD; // capabilities of surface wanted + dwCaps2 : DWORD; + dwCaps3 : DWORD; + dwCaps4 : DWORD; + end; + {$EXTERNALSYM _DDSCAPS2} + DDSCAPS2 = _DDSCAPS2; + {$EXTERNALSYM DDSCAPS2} + TDDSCaps2 = _DDSCAPS2; + +(* + * NOTE: Our choosen structure number scheme is to append a single digit to + * the end of the structure giving the version that structure is associated + * with. + *) + +(* + * This structure represents the DDCAPS structure released in DirectDraw 1.0. It is used internally + * by DirectDraw to interpret caps passed into ddraw by drivers written prior to the release of DirectDraw 2.0. + * New applications should use the DDCAPS structure defined below. + *) + PDDCaps_DX1 = ^TDDCaps_DX1; + _DDCAPS_DX1 = packed record + dwSize: DWORD; // size of the DDDRIVERCAPS structure + dwCaps: DWORD; // driver specific capabilities + dwCaps2: DWORD; // more driver specific capabilites + dwCKeyCaps: DWORD; // color key capabilities of the surface + dwFXCaps: DWORD; // driver specific stretching and effects capabilites + dwFXAlphaCaps: DWORD; // alpha driver specific capabilities + dwPalCaps: DWORD; // palette capabilities + dwSVCaps: DWORD; // stereo vision capabilities + dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 + dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 + dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 + dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 + dwVidMemTotal: DWORD; // total amount of video memory + dwVidMemFree: DWORD; // amount of free video memory + dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays + dwCurrVisibleOverlays: DWORD; // current number of visible overlays + dwNumFourCCCodes: DWORD; // number of four cc codes + dwAlignBoundarySrc: DWORD; // source rectangle alignment + dwAlignSizeSrc: DWORD; // source rectangle byte size + dwAlignBoundaryDest: DWORD; // dest rectangle alignment + dwAlignSizeDest: DWORD; // dest rectangle byte size + dwAlignStrideAlign: DWORD; // stride alignment + dwRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported + ddsCaps: TDDSCaps; // TDDSCaps structure has all the general capabilities + dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwReserved1: DWORD; // reserved + dwReserved2: DWORD; // reserved + dwReserved3: DWORD; // reserved + end; + {$EXTERNALSYM _DDCAPS_DX1} + DDCAPS_DX1 = _DDCAPS_DX1; + {$EXTERNALSYM DDCAPS_DX1} + TDDCaps_DX1 = _DDCAPS_DX1; + +(* + * This structure is the TDDCaps structure as it was in version 2 and 3 of Direct X. + * It is present for back compatability. + *) + PDDCaps_DX3 = ^TDDCaps_DX3; + _DDCAPS_DX3 = packed record + dwSize: DWORD; // size of the DDDRIVERCAPS structure + dwCaps: DWORD; // driver specific capabilities + dwCaps2: DWORD; // more driver specific capabilites + dwCKeyCaps: DWORD; // color key capabilities of the surface + dwFXCaps: DWORD; // driver specific stretching and effects capabilites + dwFXAlphaCaps: DWORD; // alpha driver specific capabilities + dwPalCaps: DWORD; // palette capabilities + dwSVCaps: DWORD; // stereo vision capabilities + dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 + dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 + dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 + dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 + dwVidMemTotal: DWORD; // total amount of video memory + dwVidMemFree: DWORD; // amount of free video memory + dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays + dwCurrVisibleOverlays: DWORD; // current number of visible overlays + dwNumFourCCCodes: DWORD; // number of four cc codes + dwAlignBoundarySrc: DWORD; // source rectangle alignment + dwAlignSizeSrc: DWORD; // source rectangle byte size + dwAlignBoundaryDest: DWORD; // dest rectangle alignment + dwAlignSizeDest: DWORD; // dest rectangle byte size + dwAlignStrideAlign: DWORD; // stride alignment + dwRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported + ddsCaps: TDDSCaps; // TDDSCaps structure has all the general capabilities + dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwReserved1: DWORD; // reserved + dwReserved2: DWORD; // reserved + dwReserved3: DWORD; // reserved + dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts + dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts + dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts + dwSVBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts + dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts + dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts + dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts + dwVSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts + dwSSBCaps: DWORD; // driver specific capabilities for System->System blts + dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts + dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts + dwSSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts + dwReserved4 : DWORD; + dwReserved5 : DWORD; + dwReserved6 : DWORD; + end; + {$EXTERNALSYM _DDCAPS_DX3} + DDCAPS_DX3 = _DDCAPS_DX3; + {$EXTERNALSYM DDCAPS_DX3} + TDDCaps_DX3 = _DDCAPS_DX3; + +(* + * This structure is the TDDCaps structure as it was in version 5 of Direct X. + * It is present for back compatability. + *) + PDDCaps_DX5 = ^TDDCaps_DX5; + _DDCAPS_DX5 = packed record + dwSize: DWORD; // size of the DDDRIVERCAPS structure + dwCaps: DWORD; // driver specific capabilities + dwCaps2: DWORD; // more driver specific capabilites + dwCKeyCaps: DWORD; // color key capabilities of the surface + dwFXCaps: DWORD; // driver specific stretching and effects capabilites + dwFXAlphaCaps: DWORD; // alpha driver specific capabilities + dwPalCaps: DWORD; // palette capabilities + dwSVCaps: DWORD; // stereo vision capabilities + dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 + dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 + dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 + dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 + dwVidMemTotal: DWORD; // total amount of video memory + dwVidMemFree: DWORD; // amount of free video memory + dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays + dwCurrVisibleOverlays: DWORD; // current number of visible overlays + dwNumFourCCCodes: DWORD; // number of four cc codes + dwAlignBoundarySrc: DWORD; // source rectangle alignment + dwAlignSizeSrc: DWORD; // source rectangle byte size + dwAlignBoundaryDest: DWORD; // dest rectangle alignment + dwAlignSizeDest: DWORD; // dest rectangle byte size + dwAlignStrideAlign: DWORD; // stride alignment + dwRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported + ddsCaps: TDDSCaps; // TDDSCaps structure has all the general capabilities + dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwReserved1: DWORD; // reserved + dwReserved2: DWORD; // reserved + dwReserved3: DWORD; // reserved + dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts + dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts + dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts + dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts + dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts + dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts + dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts + dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts + dwSSBCaps: DWORD; // driver specific capabilities for System->System blts + dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts + dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts + dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts + // Members added for DX5: + dwMaxVideoPorts: DWORD; // maximum number of usable video ports + dwCurrVideoPorts: DWORD; // current number of video ports used + dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts + dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts + dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts + dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts + dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts + dwNLVBRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts + end; + {$EXTERNALSYM _DDCAPS_DX5} + DDCAPS_DX5 = _DDCAPS_DX5; + {$EXTERNALSYM DDCAPS_DX5} + TDDCaps_DX5 = _DDCAPS_DX5; + + PDDCaps_DX6 = ^TDDCaps_DX6; + _DDCAPS_DX6 = packed record + dwSize: DWORD; // size of the DDDRIVERCAPS structure + dwCaps: DWORD; // driver specific capabilities + dwCaps2: DWORD; // more driver specific capabilites + dwCKeyCaps: DWORD; // color key capabilities of the surface + dwFXCaps: DWORD; // driver specific stretching and effects capabilites + dwFXAlphaCaps: DWORD; // alpha driver specific capabilities + dwPalCaps: DWORD; // palette capabilities + dwSVCaps: DWORD; // stereo vision capabilities + dwAlphaBltConstBitDepths: DWORD; // DDBD_2,4,8 + dwAlphaBltPixelBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaBltSurfaceBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaOverlayConstBitDepths: DWORD; // DDBD_2,4,8 + dwAlphaOverlayPixelBitDepths: DWORD; // DDBD_1,2,4,8 + dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8 + dwZBufferBitDepths: DWORD; // DDBD_8,16,24,32 + dwVidMemTotal: DWORD; // total amount of video memory + dwVidMemFree: DWORD; // amount of free video memory + dwMaxVisibleOverlays: DWORD; // maximum number of visible overlays + dwCurrVisibleOverlays: DWORD; // current number of visible overlays + dwNumFourCCCodes: DWORD; // number of four cc codes + dwAlignBoundarySrc: DWORD; // source rectangle alignment + dwAlignSizeSrc: DWORD; // source rectangle byte size + dwAlignBoundaryDest: DWORD; // dest rectangle alignment + dwAlignSizeDest: DWORD; // dest rectangle byte size + dwAlignStrideAlign: DWORD; // stride alignment + dwRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported + ddsOldCaps: TDDSCaps; // Was dssCaps: TDDSCaps. ddsCaps is of type TDDScaps2 for DX6 + dwMinOverlayStretch: DWORD; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxOverlayStretch: DWORD; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMinLiveVideoStretch: DWORD; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxLiveVideoStretch: DWORD; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMinHwCodecStretch: DWORD; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwMaxHwCodecStretch: DWORD; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + dwReserved1: DWORD; // reserved + dwReserved2: DWORD; // reserved + dwReserved3: DWORD; // reserved + dwSVBCaps: DWORD; // driver specific capabilities for System->Vmem blts + dwSVBCKeyCaps: DWORD; // driver color key capabilities for System->Vmem blts + dwSVBFXCaps: DWORD; // driver FX capabilities for System->Vmem blts + dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts + dwVSBCaps: DWORD; // driver specific capabilities for Vmem->System blts + dwVSBCKeyCaps: DWORD; // driver color key capabilities for Vmem->System blts + dwVSBFXCaps: DWORD; // driver FX capabilities for Vmem->System blts + dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts + dwSSBCaps: DWORD; // driver specific capabilities for System->System blts + dwSSBCKeyCaps: DWORD; // driver color key capabilities for System->System blts + dwSSBFXCaps: DWORD; // driver FX capabilities for System->System blts + dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts + // Members added for DX5: + dwMaxVideoPorts: DWORD; // maximum number of usable video ports + dwCurrVideoPorts: DWORD; // current number of video ports used + dwSVBCaps2: DWORD; // more driver specific capabilities for System->Vmem blts + dwNLVBCaps: DWORD; // driver specific capabilities for non-local->local vidmem blts + dwNLVBCaps2: DWORD; // more driver specific capabilities non-local->local vidmem blts + dwNLVBCKeyCaps: DWORD; // driver color key capabilities for non-local->local vidmem blts + dwNLVBFXCaps: DWORD; // driver FX capabilities for non-local->local blts + dwNLVBRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts + // Members added for DX6 release + ddsCaps : TDDSCaps2 ; // Surface Caps + end; + {$EXTERNALSYM _DDCAPS_DX6} + DDCAPS_DX6 = _DDCAPS_DX6; + {$EXTERNALSYM DDCAPS_DX6} + TDDCaps_DX6 = _DDCAPS_DX6; + + _DDCAPS_DX7 = TDDCaps_DX6; + {$EXTERNALSYM _DDCAPS_DX7} + DDCAPS_DX7 = _DDCAPS_DX7; + {$EXTERNALSYM DDCAPS_DX7} + PDDCaps_DX7 = ^TDDCaps_DX7; + TDDCaps_DX7 = TDDCaps_DX6; + +{$IFDEF DIRECTDRAW_VERSION_7} + PDDCaps = PDDCaps_DX7; + TDDCaps = TDDCaps_DX7; +{$ELSE} +{$IFDEF DIRECTDRAW_VERSION_6} + PDDCaps = PDDCaps_DX6; + TDDCaps = TDDCaps_DX6; +{$ELSE} +{$IFDEF DIRECTDRAW_VERSION_5} + PDDCaps = PDDCaps_DX5; + TDDCaps = TDDCaps_DX5; +{$ELSE} +{$IFDEF DIRECTDRAW_VERSION_3} + PDDCaps = PDDCaps_DX3; + TDDCaps = TDDCaps_DX3; +{$ELSE} + PDDCaps = PDDCaps_DX1; + TDDCaps = TDDCaps_DX1; +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} + + + +(* + * TDDPixelFormat + *) + PDDPixelFormat = ^TDDPixelFormat; + _DDPIXELFORMAT = packed record + dwSize: DWORD; // size of structure + dwFlags: DWORD; // pixel format flags + dwFourCC: DWORD; // (FOURCC code) + case Integer of + 1: ( + dwRGBBitCount : DWORD; // how many bits per pixel + dwRBitMask : DWORD; // mask for red bit + dwGBitMask : DWORD; // mask for green bits + dwBBitMask : DWORD; // mask for blue bits + dwRGBAlphaBitMask : DWORD; // mask for alpha channel + ); + 2: ( + dwYUVBitCount : DWORD; // how many bits per pixel + dwYBitMask : DWORD; // mask for Y bits + dwUBitMask : DWORD; // mask for U bits + dwVBitMask : DWORD; // mask for V bits + dwYUVAlphaBitMask : DWORD; // mask for alpha channel + ); + 3: ( + dwZBufferBitDepth : DWORD; // how many total bits/pixel in z buffer (including any stencil bits) + dwStencilBitDepth : DWORD; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits) + dwZBitMask : DWORD; // mask for Z bits + dwStencilBitMask : DWORD; // mask for stencil bits + dwLuminanceAlphaBitMask : DWORD; // mask for alpha channel + ); + 4: ( + dwAlphaBitDepth : DWORD; // how many bits for alpha channels + dwLuminanceBitMask : DWORD; // mask for luminance bits + dwBumpDvBitMask : DWORD; // mask for bump map V delta bits + dwBumpLuminanceBitMask : DWORD; // mask for luminance in bump map + dwRGBZBitMask : DWORD; // mask for Z channel + ); + 5: ( + dwLuminanceBitCount : DWORD; // how many bits per pixel + dwBumpDuBitMask : DWORD; // mask for bump map U delta bits + Fill1, Fill2 : DWORD; + dwYUVZBitMask : DWORD; // mask for Z channel + ); + 6: ( dwBumpBitCount : DWORD; // how many bits per "buxel", total + ); + end; + {$EXTERNALSYM _DDPIXELFORMAT} + DDPIXELFORMAT = _DDPIXELFORMAT; + {$EXTERNALSYM DDPIXELFORMAT} + TDDPixelFormat = _DDPIXELFORMAT; + + // These definitions are for compatibility with Erik Unger original conversion + PDDPixelFormat_DX3 = PDDPixelFormat; + TDDPixelFormat_DX3 = TDDPixelFormat; + + PDDPixelFormat_DX5 = PDDPixelFormat; + TDDPixelFormat_DX5 = TDDPixelFormat; + + PDDPixelFormat_DX6 = PDDPixelFormat; + TDDPixelFormat_DX6 = TDDPixelFormat; + + PDDPixelFormat_DX7 = PDDPixelFormat; + TDDPixelFormat_DX7 = TDDPixelFormat; + + + +(* + * TDDOverlayFX + *) + PDDOverlayFX = ^TDDOverlayFX; + _DDOVERLAYFX = packed record + dwSize: DWORD; // size of structure + dwAlphaEdgeBlendBitDepth: DWORD; // Bit depth used to specify constant for alpha edge blend + dwAlphaEdgeBlend: DWORD; // Constant to use as alpha for edge blend + dwReserved: DWORD; + dwAlphaDestConstBitDepth: DWORD; // Bit depth used to specify alpha constant for destination + case Integer of + 0: ( + dwAlphaDestConst: DWORD; // Constant to use as alpha channel for dest + dwAlphaSrcConstBitDepth: DWORD; // Bit depth used to specify alpha constant for source + dwAlphaSrcConst: DWORD; // Constant to use as alpha channel for src + dckDestColorkey: TDDColorKey; // DestColorkey override + dckSrcColorkey: TDDColorKey; // DestColorkey override + dwDDFX: DWORD; // Overlay FX + dwFlags: DWORD; // flags + ); + 1: ( + lpDDSAlphaDest: PDirectDrawSurface; // Surface to use as alpha channel for dest + filler: DWORD; + lpDDSAlphaSrc: PDirectDrawSurface; // Surface to use as alpha channel for src + ); + end; + {$EXTERNALSYM _DDOVERLAYFX} + DDOVERLAYFX = _DDOVERLAYFX; + {$EXTERNALSYM DDOVERLAYFX} + TDDOverlayFX = _DDOVERLAYFX; + +(* + * TDDBltBatch: BltBatch entry structure + *) + PDDBltBatch = ^TDDBltBatch; + _DDBLTBATCH = packed record + lprDest: PRect; + lpDDSSrc: IDirectDrawSurface; + lprSrc: PRect; + dwFlags: DWORD; + lpDDBltFx: TDDBltFX; + end; + {$EXTERNALSYM _DDBLTBATCH} + DDBLTBATCH = _DDBLTBATCH; + {$EXTERNALSYM DDBLTBATCH} + TDDBltBatch = _DDBLTBATCH; + +(* + * TDDGammaRamp + *) + PDDGammaRamp = ^TDDGammaRamp; + _DDGAMMARAMP = packed record + red : array[0..255] of WORD; + green : array[0..255] of WORD; + blue : array[0..255] of WORD; + end; + {$EXTERNALSYM _DDGAMMARAMP} + DDGAMMARAMP = _DDGAMMARAMP; + {$EXTERNALSYM DDGAMMARAMP} + TDDGammaRamp = _DDGAMMARAMP; + +(* + * This is the structure within which DirectDraw returns data about the current graphics driver and chipset + *) + + PDDDeviceIdentifier = ^TDDDeviceIdentifier; + tagDDDEVICEIDENTIFIER = packed record + // + // These elements are for presentation to the user only. They should not be used to identify particular + // drivers, since this is unreliable and many different strings may be associated with the same + // device, and the same driver from different vendors. + // + szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char; + szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char; + + // + // This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons + // on the whole 64 bits. Caution should be exercised if you use this element to identify problematic + // drivers. It is recommended that guidDeviceIdentifier is used for this purpose. + // + // This version has the form: + // wProduct = HIWORD(liDriverVersion.HighPart) + // wVersion = LOWORD(liDriverVersion.HighPart) + // wSubVersion = HIWORD(liDriverVersion.LowPart) + // wBuild = LOWORD(liDriverVersion.LowPart) + // + liDriverVersion: TLargeInteger; // Defined for applications and other 32 bit components + + // + // These elements can be used to identify particular chipsets. Use with extreme caution. + // dwVendorId Identifies the manufacturer. May be zero if unknown. + // dwDeviceId Identifies the type of chipset. May be zero if unknown. + // dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown. + // dwRevision Identifies the revision level of the chipset. May be zero if unknown. + // + dwVendorId: DWORD; + dwDeviceId: DWORD; + dwSubSysId: DWORD; + dwRevision: DWORD; + + // + // This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the + // driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to + // reprofile the graphics subsystem. + // This element can also be used to identify particular problematic drivers. + // + guidDeviceIdentifier: TGUID; + end; + {$EXTERNALSYM tagDDDEVICEIDENTIFIER} + DDDEVICEIDENTIFIER = tagDDDEVICEIDENTIFIER; + {$EXTERNALSYM DDDEVICEIDENTIFIER} + TDDDeviceIdentifier = tagDDDEVICEIDENTIFIER; + + PDDDeviceIdentifier2 = ^TDDDeviceIdentifier2; + tagDDDEVICEIDENTIFIER2 = packed record + // + // These elements are for presentation to the user only. They should not be used to identify particular + // drivers, since this is unreliable and many different strings may be associated with the same + // device, and the same driver from different vendors. + // + szDriver: array[0..MAX_DDDEVICEID_STRING-1] of Char; + szDescription: array[0..MAX_DDDEVICEID_STRING-1] of Char; + + // + // This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons + // on the whole 64 bits. Caution should be exercised if you use this element to identify problematic + // drivers. It is recommended that guidDeviceIdentifier is used for this purpose. + // + // This version has the form: + // wProduct = HIWORD(liDriverVersion.HighPart) + // wVersion = LOWORD(liDriverVersion.HighPart) + // wSubVersion = HIWORD(liDriverVersion.LowPart) + // wBuild = LOWORD(liDriverVersion.LowPart) + // + liDriverVersion: TLargeInteger; // Defined for applications and other 32 bit components + + // + // These elements can be used to identify particular chipsets. Use with extreme caution. + // dwVendorId Identifies the manufacturer. May be zero if unknown. + // dwDeviceId Identifies the type of chipset. May be zero if unknown. + // dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown. + // dwRevision Identifies the revision level of the chipset. May be zero if unknown. + // + dwVendorId: DWORD; + dwDeviceId: DWORD; + dwSubSysId: DWORD; + dwRevision: DWORD; + + // + // This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the + // driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to + // reprofile the graphics subsystem. + // This element can also be used to identify particular problematic drivers. + // + guidDeviceIdentifier: TGUID; + + (* + * This element is used to determine the Windows Hardware Quality Lab (WHQL) + * certification level for this driver/device pair. + *) + dwWHQLLevel: DWORD; + end; + {$EXTERNALSYM tagDDDEVICEIDENTIFIER2} + DDDEVICEIDENTIFIER2 = tagDDDEVICEIDENTIFIER2; + {$EXTERNALSYM DDDEVICEIDENTIFIER2} + TDDDeviceIdentifier2 = tagDDDEVICEIDENTIFIER2; + +(* + * callbacks + *) + TClipperCallback = function(lpDDClipper: IDirectDrawClipper; hWnd: HWND; + Code: DWORD; lpContext: Pointer): HResult; stdcall; + {$NODEFINE TClipperCallback} + {$HPPEMIT 'typedef LPCLIPPERCALLBACK TClipperCallback;'} + TSurfacesStreamingCallback = function(arg: DWORD): HResult; stdcall; + {$NODEFINE TSurfacesStreamingCallback} + +(* + * TDDSurfaceDesc + *) + PDDSurfaceDesc = ^TDDSurfaceDesc; + _DDSURFACEDESC = packed record + dwSize: DWORD; // size of the TDDSurfaceDesc structure + dwFlags: DWORD; // determines what fields are valid + dwHeight: DWORD; // height of surface to be created + dwWidth: DWORD; // width of input surface + case Integer of + 0: ( + dwLinearSize: DWORD; // unused at the moment + ); + 1: ( + lPitch: Longint; // distance to start of next line (return value only) + dwBackBufferCount: DWORD; // number of back buffers requested + case Integer of + 0: ( + dwMipMapCount: DWORD; // number of mip-map levels requested + dwAlphaBitDepth: DWORD; // depth of alpha buffer requested + dwReserved: DWORD; // reserved + lpSurface: Pointer; // pointer to the associated surface memory + ddckCKDestOverlay: TDDColorKey; // color key for destination overlay use + ddckCKDestBlt: TDDColorKey; // color key for destination blt use + ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use + ddckCKSrcBlt: TDDColorKey; // color key for source blt use + ddpfPixelFormat: TDDPixelFormat; // pixel format description of the surface + ddsCaps: TDDSCaps; // direct draw surface capabilities + ); + 1: ( + dwZBufferBitDepth: DWORD; // depth of Z buffer requested + ); + 2: ( + dwRefreshRate: DWORD; // refresh rate (used when display mode is described) + ); + ); + end; + {$EXTERNALSYM _DDSURFACEDESC} + DDSURFACEDESC = _DDSURFACEDESC; + {$EXTERNALSYM DDSURFACEDESC} + TDDSurfaceDesc = _DDSURFACEDESC; + + // These definitions are for compatibility with Erik Unger original conversion + PDDSurfaceDesc_DX5 = PDDSurfaceDesc; + TDDSurfaceDesc_DX5 = TDDSurfaceDesc; + + PDDSurfaceDesc_DX6 = PDDSurfaceDesc; + TDDSurfaceDesc_DX6 = TDDSurfaceDesc; + + +(* + * TDDSurfaceDesc2 + *) + PDDSurfaceDesc2 = ^TDDSurfaceDesc2; + _DDSURFACEDESC2 = packed record + dwSize: DWORD; // size of the TDDSurfaceDesc structure + dwFlags: DWORD; // determines what fields are valid + dwHeight: DWORD; // height of surface to be created + dwWidth: DWORD; // width of input surface + case Integer of + 0: ( + lPitch : Longint; // distance to start of next line (return value only) + ); + 1: ( + dwLinearSize : DWORD; // Formless late-allocated optimized surface size + dwBackBufferCount: DWORD; // number of back buffers requested + case Integer of + 0: ( + dwMipMapCount: DWORD; // number of mip-map levels requested + dwAlphaBitDepth: DWORD; // depth of alpha buffer requested + dwReserved: DWORD; // reserved + lpSurface: Pointer; // pointer to the associated surface memory + ddckCKDestOverlay: TDDColorKey; // color key for destination overlay use + ddckCKDestBlt: TDDColorKey; // color key for destination blt use + ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use + ddckCKSrcBlt: TDDColorKey; // color key for source blt use + ddpfPixelFormat: TDDPixelFormat; // pixel format description of the surface + ddsCaps: TDDSCaps2; // direct draw surface capabilities + dwTextureStage: DWORD; // stage in multitexture cascade + ); + 1: ( + dwRefreshRate: DWORD; // refresh rate (used when display mode is described) + ); + ); + end; + {$EXTERNALSYM _DDSURFACEDESC2} + DDSURFACEDESC2 = _DDSURFACEDESC2; + {$EXTERNALSYM DDSURFACEDESC2} + TDDSurfaceDesc2 = _DDSURFACEDESC2; + +(* + * TDDOptSurfaceDesc + *) + + PDDOptSurfaceDesc = ^TDDOptSurfaceDesc; + _DDOPTSURFACEDESC = packed record + dwSize : DWORD; // size of the DDOPTSURFACEDESC structure + dwFlags : DWORD; // determines what fields are valid + ddSCaps : TDDSCaps2; // Common caps like: Memory type + ddOSCaps : TDDOSCaps; // Common caps like: Memory type + guid : TGUID; // Compression technique GUID + dwCompressionRatio : DWORD; // Compression ratio + end; + {$EXTERNALSYM _DDOPTSURFACEDESC} + DDOPTSURFACEDESC = _DDOPTSURFACEDESC; + {$EXTERNALSYM DDOPTSURFACEDESC} + TDDOptSurfaceDesc = _DDOPTSURFACEDESC; + +(* + * DDCOLORCONTROL + *) + PDDColorControl = ^TDDColorControl; + _DDCOLORCONTROL = packed record + dwSize: DWORD; + dwFlags: DWORD; + lBrightness: Longint; + lContrast: Longint; + lHue: Longint; + lSaturation: Longint; + lSharpness: Longint; + lGamma: Longint; + lColorEnable: Longint; + dwReserved1: DWORD; + end; + {$EXTERNALSYM _DDCOLORCONTROL} + DDCOLORCONTROL = _DDCOLORCONTROL; + {$EXTERNALSYM DDCOLORCONTROL} + TDDColorControl = _DDCOLORCONTROL; + +(* + * callbacks + *) + +//{$IFNDEF WINNT} + TDDEnumModesCallback = function (const lpDDSurfaceDesc: TDDSurfaceDesc; + lpContext: Pointer): HResult; stdcall; + {$NODEFINE TDDEnumModesCallback} + {$HPPEMIT 'typedef LPCLIPPERCALLBACK TDDEnumModesCallback;'} + TDDEnumModesCallback2 = function (const lpDDSurfaceDesc: TDDSurfaceDesc2; + lpContext: Pointer): HResult; stdcall; + {$NODEFINE TDDEnumModesCallback2} + {$HPPEMIT 'typedef LPDDENUMMODESCALLBACK2 TDDEnumModesCallback2;'} + TDDEnumSurfacesCallback = function (lpDDSurface: IDirectDrawSurface; + const lpDDSurfaceDesc: TDDSurfaceDesc; lpContext: Pointer): HResult; stdcall; + {$NODEFINE TDDEnumSurfacesCallback} + {$HPPEMIT 'typedef LPDDENUMSURFACESCALLBACK TDDEnumSurfacesCallback;'} + TDDEnumSurfacesCallback2 = function (lpDDSurface: IDirectDrawSurface4; + const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer): HResult; stdcall; + {$NODEFINE TDDEnumSurfacesCallback2} + {$HPPEMIT 'typedef LPDDENUMSURFACESCALLBACK2 TDDEnumSurfacesCallback2;'} + TDDEnumSurfacesCallback7 = function (lpDDSurface: IDirectDrawSurface7; + const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer): HResult; stdcall; + {$NODEFINE TDDEnumSurfacesCallback7} + {$HPPEMIT 'typedef LPDDENUMSURFACESCALLBACK7 TDDEnumSurfacesCallback7;'} +//{$ENDIF} + +(* + * INTERACES FOLLOW: + * IDirectDraw + * IDirectDrawClipper + * IDirectDrawPalette + * IDirectDrawSurface + *) + +(* + * IDirectDraw + *) + + IDirectDraw = interface(IUnknown) + ['{6C14DB80-A733-11CE-A521-0020AF0BE560}'] + (*** IDirectDraw methods ***) + function Compact: HResult; stdcall; + function CreateClipper(dwFlags: DWORD; + out lplpDDClipper: IDirectDrawClipper; + pUnkOuter: IUnknown): HResult; stdcall; + function CreatePalette(dwFlags: DWORD; lpColorTable: Pointer; + out lplpDDPalette: IDirectDrawPalette; + pUnkOuter: IUnknown): HResult; stdcall; + function CreateSurface(var lpDDSurfaceDesc: TDDSurfaceDesc; + out lplpDDSurface: IDirectDrawSurface; + pUnkOuter: IUnknown): HResult; stdcall; + function DuplicateSurface(lpDDSurface: IDirectDrawSurface; + out lplpDupDDSurface: IDirectDrawSurface): HResult; stdcall; + function EnumDisplayModes(dwFlags: DWORD; + lpDDSurfaceDesc: PDDSurfaceDesc; lpContext: Pointer; + lpEnumModesCallback: TDDEnumModesCallback): HResult; stdcall; + function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc; + lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback) : + HResult; stdcall; + function FlipToGDISurface: HResult; stdcall; + function GetCaps(lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps): HResult; stdcall; + function GetDisplayMode(out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall; + function GetFourCCCodes(var lpNumCodes: DWORD; lpCodes: PDWORD): HResult; stdcall; + function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface): HResult; stdcall; + function GetMonitorFrequency(out lpdwFrequency: DWORD): HResult; stdcall; + function GetScanLine(out lpdwScanLine: DWORD): HResult; stdcall; + function GetVerticalBlankStatus(out lpbIsInVB: BOOL): HResult; stdcall; + function Initialize(lpGUID: PGUID): HResult; stdcall; + function RestoreDisplayMode: HResult; stdcall; + function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall; + (*** Warning! SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***) + function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; + dwBpp: DWORD): HResult; stdcall; + function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall; + end; + + IDirectDraw2 = interface(IUnknown) + ['{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}'] + (*** IDirectDraw methods ***) + function Compact: HResult; stdcall; + function CreateClipper(dwFlags: DWORD; + out lplpDDClipper: IDirectDrawClipper; + pUnkOuter: IUnknown): HResult; stdcall; + function CreatePalette(dwFlags: DWORD; lpColorTable: Pointer; + out lplpDDPalette: IDirectDrawPalette; + pUnkOuter: IUnknown): HResult; stdcall; + function CreateSurface(var lpDDSurfaceDesc: TDDSurfaceDesc; + out lplpDDSurface: IDirectDrawSurface; + pUnkOuter: IUnknown): HResult; stdcall; + function DuplicateSurface(lpDDSurface: IDirectDrawSurface; + out lplpDupDDSurface: IDirectDrawSurface): HResult; stdcall; + function EnumDisplayModes(dwFlags: DWORD; + lpDDSurfaceDesc: PDDSurfaceDesc; lpContext: Pointer; + lpEnumModesCallback: TDDEnumModesCallback): HResult; stdcall; + function EnumSurfaces(dwFlags: DWORD; var lpDDSD: TDDSurfaceDesc; + lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback): HResult; stdcall; + function FlipToGDISurface: HResult; stdcall; + function GetCaps(lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps): HResult; stdcall; + function GetDisplayMode(out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall; + function GetFourCCCodes(var lpNumCodes: DWORD; lpCodes: PDWORD): HResult; stdcall; + function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface): HResult; stdcall; + function GetMonitorFrequency(out lpdwFrequency: DWORD): HResult; stdcall; + function GetScanLine(out lpdwScanLine: DWORD): HResult; stdcall; + function GetVerticalBlankStatus(out lpbIsInVB: BOOL): HResult; stdcall; + function Initialize(lpGUID: PGUID): HResult; stdcall; + function RestoreDisplayMode: HResult; stdcall; + function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall; + function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD; + dwRefreshRate: DWORD; dwFlags: DWORD): HResult; stdcall; + function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall; + (*** Added in the v2 interface ***) + function GetAvailableVidMem(var lpDDSCaps: TDDSCaps; + out lpdwTotal, lpdwFree: DWORD): HResult; stdcall; + end; + + IDirectDraw4 = interface(IUnknown) + ['{9c59509a-39bd-11d1-8c4a-00c04fd930c5}'] + (*** IDirectDraw methods ***) + function Compact: HResult; stdcall; + function CreateClipper(dwFlags: DWORD; + out lplpDDClipper: IDirectDrawClipper; + pUnkOuter: IUnknown): HResult; stdcall; + function CreatePalette(dwFlags: DWORD; lpColorTable: Pointer; + out lplpDDPalette: IDirectDrawPalette; + pUnkOuter: IUnknown): HResult; stdcall; + function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc2; + out lplpDDSurface: IDirectDrawSurface4; + pUnkOuter: IUnknown): HResult; stdcall; + function DuplicateSurface(lpDDSurface: IDirectDrawSurface4; + out lplpDupDDSurface: IDirectDrawSurface4): HResult; stdcall; + function EnumDisplayModes(dwFlags: DWORD; + lpDDSurfaceDesc: PDDSurfaceDesc2; lpContext: Pointer; + lpEnumModesCallback: TDDEnumModesCallback2): HResult; stdcall; + function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2; + lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback2): + HResult; stdcall; + function FlipToGDISurface: HResult; stdcall; + function GetCaps(lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps): HResult; stdcall; + function GetDisplayMode(out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall; + function GetFourCCCodes(var lpNumCodes: DWORD; lpCodes: PDWORD): HResult; stdcall; + function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface4): HResult; stdcall; + function GetMonitorFrequency(out lpdwFrequency: DWORD): HResult; stdcall; + function GetScanLine(out lpdwScanLine: DWORD): HResult; stdcall; + function GetVerticalBlankStatus(out lpbIsInVB: BOOL): HResult; stdcall; + function Initialize(lpGUID: PGUID): HResult; stdcall; + function RestoreDisplayMode: HResult; stdcall; + function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall; + function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD; + dwRefreshRate: DWORD; dwFlags: DWORD): HResult; stdcall; + function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall; + (*** Added in the v2 interface ***) + function GetAvailableVidMem(const lpDDSCaps: TDDSCaps2; + out lpdwTotal, lpdwFree: DWORD): HResult; stdcall; + (*** Added in the V4 Interface ***) + function GetSurfaceFromDC(hdc: Windows.HDC; + out lpDDS4: IDirectDrawSurface4): HResult; stdcall; + function RestoreAllSurfaces: HResult; stdcall; + function TestCooperativeLevel: HResult; stdcall; + function GetDeviceIdentifier(out lpdddi: TDDDeviceIdentifier; + dwFlags: DWORD): HResult; stdcall; + end; + + IDirectDraw7 = interface(IUnknown) + ['{15e65ec0-3b9c-11d2-b92f-00609797ea5b}'] + (*** IDirectDraw methods ***) + function Compact: HResult; stdcall; + function CreateClipper(dwFlags: DWORD; + out lplpDDClipper: IDirectDrawClipper; + pUnkOuter: IUnknown): HResult; stdcall; + function CreatePalette(dwFlags: DWORD; lpColorTable: Pointer; + out lplpDDPalette: IDirectDrawPalette; + pUnkOuter: IUnknown): HResult; stdcall; + function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc2; + out lplpDDSurface: IDirectDrawSurface7; + pUnkOuter: IUnknown): HResult; stdcall; + function DuplicateSurface(lpDDSurface: IDirectDrawSurface7; + out lplpDupDDSurface: IDirectDrawSurface7): HResult; stdcall; + function EnumDisplayModes(dwFlags: DWORD; + lpDDSurfaceDesc: PDDSurfaceDesc2; lpContext: Pointer; + lpEnumModesCallback: TDDEnumModesCallback2): HResult; stdcall; + function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2; + lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback7) : + HResult; stdcall; + function FlipToGDISurface: HResult; stdcall; + function GetCaps(lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps): HResult; stdcall; + function GetDisplayMode(out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall; + function GetFourCCCodes(var lpNumCodes: DWORD; lpCodes: PDWORD): HResult; stdcall; + function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface7) : + HResult; stdcall; + function GetMonitorFrequency(out lpdwFrequency: DWORD): HResult; stdcall; + function GetScanLine(out lpdwScanLine: DWORD): HResult; stdcall; + function GetVerticalBlankStatus(out lpbIsInVB: BOOL): HResult; stdcall; + function Initialize(lpGUID: PGUID): HResult; stdcall; + function RestoreDisplayMode: HResult; stdcall; + function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall; + function SetDisplayMode(dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD; + dwRefreshRate: DWORD; dwFlags: DWORD): HResult; stdcall; + function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle) : + HResult; stdcall; + (*** Added in the v2 interface ***) + function GetAvailableVidMem(const lpDDSCaps: TDDSCaps2; + out lpdwTotal, lpdwFree: DWORD): HResult; stdcall; + (*** Added in the V4 Interface ***) + function GetSurfaceFromDC(hdc: Windows.HDC; + out lpDDS: IDirectDrawSurface7): HResult; stdcall; + function RestoreAllSurfaces: HResult; stdcall; + function TestCooperativeLevel: HResult; stdcall; + function GetDeviceIdentifier(out lpdddi: TDDDeviceIdentifier2; + dwFlags: DWORD): HResult; stdcall; + function StartModeTest(const lpModesToTest; dwNumEntries, dwFlags: DWORD): HResult; stdcall; + function EvaluateMode(dwFlags: DWORD; out pSecondsUntilTimeout: DWORD): HResult; stdcall; + end; + + + +(* + * IDirectDrawPalette + *) + + IDirectDrawPalette = interface(IUnknown) + ['{6C14DB84-A733-11CE-A521-0020AF0BE560}'] + (*** IDirectDrawPalette methods ***) + function GetCaps(out lpdwCaps: DWORD): HResult; stdcall; + function GetEntries(dwFlags: DWORD; dwBase: DWORD; dwNumEntries: DWORD; + lpEntries: Pointer): HResult; stdcall; + function Initialize(lpDD: IDirectDraw; dwFlags: DWORD; + lpDDColorTable: Pointer): HResult; stdcall; + function SetEntries(dwFlags: DWORD; dwStartingEntry: DWORD; + dwCount: DWORD; lpEntries: Pointer): HResult; stdcall; + end; + +(* + * IDirectDrawClipper + *) + + IDirectDrawClipper = interface(IUnknown) + ['{6C14DB85-A733-11CE-A521-0020AF0BE560}'] + (*** IDirectDrawClipper methods ***) + function GetClipList(lpRect: PRect; lpClipList: PRgnData; + var lpdwSize: DWORD): HResult; stdcall; + function GetHWnd(out lphWnd: HWND): HResult; stdcall; + function Initialize(lpDD: IDirectDraw; dwFlags: DWORD): HResult; stdcall; + function IsClipListChanged(out lpbChanged: BOOL): HResult; stdcall; + function SetClipList(lpClipList: PRgnData; dwFlags: DWORD): HResult; stdcall; + function SetHWnd(dwFlags: DWORD; hWnd: HWND): HResult; stdcall; + end; + +(* + * IDirectDrawSurface and related interfaces + *) + + IDirectDrawSurface = interface(IUnknown) + ['{6C14DB81-A733-11CE-A521-0020AF0BE560}'] + (*** IDirectDrawSurface methods ***) + function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface) : + HResult; stdcall; + function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall; + function Blt(lpDestRect: PRect; + lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRect; + dwFlags: DWORD; lpDDBltFx: PDDBltFX): HResult; stdcall; + function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD; + dwFlags: DWORD): HResult; stdcall; + function BltFast(dwX: DWORD; dwY: DWORD; + lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRect; + dwTrans: DWORD): HResult; stdcall; + function DeleteAttachedSurface(dwFlags: DWORD; + lpDDSAttachedSurface: IDirectDrawSurface): HResult; stdcall; + function EnumAttachedSurfaces(lpContext: Pointer; + lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall; + function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer; + lpfnCallback: TDDEnumSurfacesCallback): HResult; stdcall; + function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface; + dwFlags: DWORD): HResult; stdcall; + function GetAttachedSurface(var lpDDSCaps: TDDSCaps; + (*out*)var lplpDDAttachedSurface: IDirectDrawSurface): HResult; stdcall; + function GetBltStatus(dwFlags: DWORD): HResult; stdcall; + function GetCaps(out lpDDSCaps: TDDSCaps): HResult; stdcall; + function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall; + function GetColorKey(dwFlags: DWORD; out lpDDColorKey: TDDColorKey) : + HResult; stdcall; + function GetDC(out lphDC: HDC): HResult; stdcall; + function GetFlipStatus(dwFlags: DWORD): HResult; stdcall; + function GetOverlayPosition(out lplX, lplY: Longint): HResult; stdcall; + function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall; + function GetPixelFormat(out lpDDPixelFormat: TDDPixelFormat): HResult; stdcall; + function GetSurfaceDesc(out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall; + function Initialize(lpDD: IDirectDraw; + out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall; + function IsLost: HResult; stdcall; + function Lock(lpDestRect: PRect; out lpDDSurfaceDesc: + TDDSurfaceDesc; dwFlags: DWORD; hEvent: THandle): HResult; stdcall; + function ReleaseDC(hDC: Windows.HDC): HResult; stdcall; + function _Restore: HResult; stdcall; + function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall; + function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDColorKey) : + HResult; stdcall; + function SetOverlayPosition(lX, lY: Longint): HResult; stdcall; + function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall; + function Unlock(lpSurfaceData: Pointer): HResult; stdcall; + function UpdateOverlay(lpSrcRect: PRect; + lpDDDestSurface: IDirectDrawSurface; lpDestRect: PRect; + dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX): HResult; stdcall; + function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall; + function UpdateOverlayZOrder(dwFlags: DWORD; + lpDDSReference: IDirectDrawSurface): HResult; stdcall; + end; + +(* + * IDirectDrawSurface2 and related interfaces + *) + + IDirectDrawSurface2 = interface(IUnknown) + ['{57805885-6eec-11cf-9441-a82303c10e27}'] + (*** IDirectDrawSurface methods ***) + function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface2) : + HResult; stdcall; + function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall; + function Blt(lpDestRect: PRect; + lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRect; + dwFlags: DWORD; lpDDBltFx: PDDBltFX): HResult; stdcall; + function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD; + dwFlags: DWORD): HResult; stdcall; + function BltFast(dwX: DWORD; dwY: DWORD; + lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRect; + dwTrans: DWORD): HResult; stdcall; + function DeleteAttachedSurface(dwFlags: DWORD; + lpDDSAttachedSurface: IDirectDrawSurface2): HResult; stdcall; + function EnumAttachedSurfaces(lpContext: Pointer; + lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall; + function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer; + lpfnCallback: TDDEnumSurfacesCallback): HResult; stdcall; + function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface2; + dwFlags: DWORD): HResult; stdcall; + function GetAttachedSurface(var lpDDSCaps: TDDSCaps; + out lplpDDAttachedSurface: IDirectDrawSurface2): HResult; stdcall; + function GetBltStatus(dwFlags: DWORD): HResult; stdcall; + function GetCaps(out lpDDSCaps: TDDSCaps): HResult; stdcall; + function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall; + function GetColorKey(dwFlags: DWORD; out lpDDColorKey: TDDColorKey) : + HResult; stdcall; + function GetDC(out lphDC: HDC): HResult; stdcall; + function GetFlipStatus(dwFlags: DWORD): HResult; stdcall; + function GetOverlayPosition(out lplX, lplY: Longint): HResult; stdcall; + function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall; + function GetPixelFormat(out lpDDPixelFormat: TDDPixelFormat): HResult; stdcall; + function GetSurfaceDesc(out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall; + function Initialize(lpDD: IDirectDraw; + out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall; + function IsLost: HResult; stdcall; + function Lock(lpDestRect: PRect; + out lpDDSurfaceDesc: TDDSurfaceDesc; dwFlags: DWORD; + hEvent: THandle): HResult; stdcall; + function ReleaseDC(hDC: Windows.HDC): HResult; stdcall; + function _Restore: HResult; stdcall; + function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall; + function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDColorKey) : + HResult; stdcall; + function SetOverlayPosition(lX, lY: Longint): HResult; stdcall; + function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall; + function Unlock(lpSurfaceData: Pointer): HResult; stdcall; + function UpdateOverlay(lpSrcRect: PRect; + lpDDDestSurface: IDirectDrawSurface2; lpDestRect: PRect; + dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX): HResult; stdcall; + function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall; + function UpdateOverlayZOrder(dwFlags: DWORD; + lpDDSReference: IDirectDrawSurface2): HResult; stdcall; + (*** Added in the v2 interface ***) + function GetDDInterface(var lplpDD: IDirectDraw): HResult; stdcall; + function PageLock(dwFlags: DWORD): HResult; stdcall; + function PageUnlock(dwFlags: DWORD): HResult; stdcall; + end; + + IDirectDrawSurface3 = interface(IUnknown) + ['{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}'] + (*** IDirectDrawSurface methods ***) + function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface3) : + HResult; stdcall; + function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall; + function Blt(lpDestRect: PRect; + lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRect; + dwFlags: DWORD; lpDDBltFx: PDDBltFX): HResult; stdcall; + function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD; + dwFlags: DWORD): HResult; stdcall; + function BltFast(dwX: DWORD; dwY: DWORD; + lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRect; + dwTrans: DWORD): HResult; stdcall; + function DeleteAttachedSurface(dwFlags: DWORD; + lpDDSAttachedSurface: IDirectDrawSurface3): HResult; stdcall; + function EnumAttachedSurfaces(lpContext: Pointer; + lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall; + function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer; + lpfnCallback: TDDEnumSurfacesCallback): HResult; stdcall; + function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface3; + dwFlags: DWORD): HResult; stdcall; + function GetAttachedSurface(var lpDDSCaps: TDDSCaps; + out lplpDDAttachedSurface: IDirectDrawSurface3): HResult; stdcall; + function GetBltStatus(dwFlags: DWORD): HResult; stdcall; + function GetCaps(out lpDDSCaps: TDDSCaps): HResult; stdcall; + function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall; + function GetColorKey(dwFlags: DWORD; out lpDDColorKey: TDDColorKey) : + HResult; stdcall; + function GetDC(out lphDC: HDC): HResult; stdcall; + function GetFlipStatus(dwFlags: DWORD): HResult; stdcall; + function GetOverlayPosition(out lplX, lplY: Longint): HResult; stdcall; + function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall; + function GetPixelFormat(out lpDDPixelFormat: TDDPixelFormat): HResult; stdcall; + function GetSurfaceDesc(out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall; + function Initialize(lpDD: IDirectDraw; + out lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall; + function IsLost: HResult; stdcall; + function Lock(lpDestRect: PRect; + out lpDDSurfaceDesc: TDDSurfaceDesc; dwFlags: DWORD; + hEvent: THandle): HResult; stdcall; + function ReleaseDC(hDC: Windows.HDC): HResult; stdcall; + function _Restore: HResult; stdcall; + function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall; + function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDColorKey) : + HResult; stdcall; + function SetOverlayPosition(lX, lY: Longint): HResult; stdcall; + function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall; + function Unlock(lpSurfaceData: Pointer): HResult; stdcall; + function UpdateOverlay(lpSrcRect: PRect; + lpDDDestSurface: IDirectDrawSurface3; lpDestRect: PRect; + dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX): HResult; stdcall; + function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall; + function UpdateOverlayZOrder(dwFlags: DWORD; + lpDDSReference: IDirectDrawSurface3): HResult; stdcall; + (*** Added in the v2 interface ***) + function GetDDInterface(out lplpDD: IDirectDraw): HResult; stdcall; + function PageLock(dwFlags: DWORD): HResult; stdcall; + function PageUnlock(dwFlags: DWORD): HResult; stdcall; + (*** Added in the V3 interface ***) + function SetSurfaceDesc(const lpddsd: TDDSurfaceDesc; dwFlags: DWORD): HResult; stdcall; + end; + +(* + * IDirectDrawSurface4 and related interfaces + *) + IDirectDrawSurface4 = interface(IUnknown) + ['{0B2B8630-AD35-11D0-8EA6-00609797EA5B}'] + (*** IDirectDrawSurface methods ***) + function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface4) : + HResult; stdcall; + function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall; + function Blt(lpDestRect: PRect; + lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRect; + dwFlags: DWORD; lpDDBltFx: PDDBltFX): HResult; stdcall; + function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD; + dwFlags: DWORD): HResult; stdcall; + function BltFast(dwX: DWORD; dwY: DWORD; + lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRect; + dwTrans: DWORD): HResult; stdcall; + function DeleteAttachedSurface(dwFlags: DWORD; + lpDDSAttachedSurface: IDirectDrawSurface4): HResult; stdcall; + function EnumAttachedSurfaces(lpContext: Pointer; + lpEnumSurfacesCallback: TDDEnumSurfacesCallback2): HResult; stdcall; + function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer; + lpfnCallback: TDDEnumSurfacesCallback2): HResult; stdcall; + function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface4; + dwFlags: DWORD): HResult; stdcall; + function GetAttachedSurface(const lpDDSCaps: TDDSCaps2; + out lplpDDAttachedSurface: IDirectDrawSurface4): HResult; stdcall; + function GetBltStatus(dwFlags: DWORD): HResult; stdcall; + function GetCaps(out lpDDSCaps: TDDSCaps2): HResult; stdcall; + function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall; + function GetColorKey(dwFlags: DWORD; out lpDDColorKey: TDDColorKey) : + HResult; stdcall; + function GetDC(out lphDC: HDC): HResult; stdcall; + function GetFlipStatus(dwFlags: DWORD): HResult; stdcall; + function GetOverlayPosition(out lplX, lplY: Longint): HResult; stdcall; + function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall; + function GetPixelFormat(out lpDDPixelFormat: TDDPixelFormat): HResult; stdcall; + function GetSurfaceDesc(out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall; + function Initialize(lpDD: IDirectDraw; + out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall; + function IsLost: HResult; stdcall; + function Lock(lpDestRect: PRect; + out lpDDSurfaceDesc: TDDSurfaceDesc2; dwFlags: DWORD; + hEvent: THandle): HResult; stdcall; + function ReleaseDC(hDC: Windows.HDC): HResult; stdcall; + function _Restore: HResult; stdcall; + function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall; + function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDColorKey) : + HResult; stdcall; + function SetOverlayPosition(lX, lY: Longint): HResult; stdcall; + function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall; + function Unlock(lpRect: PRect): HResult; stdcall; + function UpdateOverlay(lpSrcRect: PRect; + lpDDDestSurface: IDirectDrawSurface4; lpDestRect: PRect; + dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX): HResult; stdcall; + function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall; + function UpdateOverlayZOrder(dwFlags: DWORD; + lpDDSReference: IDirectDrawSurface4): HResult; stdcall; + (*** Added in the v2 interface ***) + function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall; + function PageLock(dwFlags: DWORD): HResult; stdcall; + function PageUnlock(dwFlags: DWORD): HResult; stdcall; + (*** Added in the V3 interface ***) + function SetSurfaceDesc(const lpddsd2: TDDSurfaceDesc2; dwFlags: DWORD): HResult; stdcall; + (*** Added in the v4 interface ***) + function SetPrivateData(const guidTag: TGUID; lpData: Pointer; + cbSize: DWORD; dwFlags: DWORD): HResult; stdcall; + function GetPrivateData(const guidTag: TGUID; lpBuffer: Pointer; + var lpcbBufferSize: DWORD): HResult; stdcall; + function FreePrivateData(const guidTag: TGUID): HResult; stdcall; + function GetUniquenessValue(out lpValue: DWORD): HResult; stdcall; + function ChangeUniquenessValue: HResult; stdcall; + end; + + IDirectDrawSurface7 = interface(IUnknown) + ['{06675a80-3b9b-11d2-b92f-00609797ea5b}'] + (*** IDirectDrawSurface methods ***) + function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface7) : + HResult; stdcall; + function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall; + function Blt(lpDestRect: PRect; + lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRect; + dwFlags: DWORD; lpDDBltFx: PDDBltFX): HResult; stdcall; + function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD; + dwFlags: DWORD): HResult; stdcall; + function BltFast(dwX: DWORD; dwY: DWORD; + lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRect; + dwTrans: DWORD): HResult; stdcall; + function DeleteAttachedSurface(dwFlags: DWORD; + lpDDSAttachedSurface: IDirectDrawSurface7): HResult; stdcall; + function EnumAttachedSurfaces(lpContext: Pointer; + lpEnumSurfacesCallback: TDDEnumSurfacesCallback7): HResult; stdcall; + function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer; + lpfnCallback: TDDEnumSurfacesCallback7): HResult; stdcall; + function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface7; + dwFlags: DWORD): HResult; stdcall; + function GetAttachedSurface(const lpDDSCaps: TDDSCaps2; + out lplpDDAttachedSurface: IDirectDrawSurface7): HResult; stdcall; + function GetBltStatus(dwFlags: DWORD): HResult; stdcall; + function GetCaps(out lpDDSCaps: TDDSCaps2): HResult; stdcall; + function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall; + function GetColorKey(dwFlags: DWORD; out lpDDColorKey: TDDColorKey) : + HResult; stdcall; + function GetDC(out lphDC: HDC): HResult; stdcall; + function GetFlipStatus(dwFlags: DWORD): HResult; stdcall; + function GetOverlayPosition(out lplX, lplY: Longint): HResult; stdcall; + function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall; + function GetPixelFormat(out lpDDPixelFormat: TDDPixelFormat): HResult; stdcall; + function GetSurfaceDesc(out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall; + function Initialize(lpDD: IDirectDraw; + out lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall; + function IsLost: HResult; stdcall; + function Lock(lpDestRect: PRect; + out lpDDSurfaceDesc: TDDSurfaceDesc2; dwFlags: DWORD; + hEvent: THandle): HResult; stdcall; + function ReleaseDC(hDC: Windows.HDC): HResult; stdcall; + function _Restore: HResult; stdcall; + function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall; + function SetColorKey(dwFlags: DWORD; lpDDColorKey: PDDColorKey) : + HResult; stdcall; + function SetOverlayPosition(lX, lY: Longint): HResult; stdcall; + function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall; + function Unlock(lpRect: PRect): HResult; stdcall; + function UpdateOverlay(lpSrcRect: PRect; + lpDDDestSurface: IDirectDrawSurface7; lpDestRect: PRect; + dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX): HResult; stdcall; + function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall; + function UpdateOverlayZOrder(dwFlags: DWORD; + lpDDSReference: IDirectDrawSurface7): HResult; stdcall; + (*** Added in the v2 interface ***) + function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall; + function PageLock(dwFlags: DWORD): HResult; stdcall; + function PageUnlock(dwFlags: DWORD): HResult; stdcall; + (*** Added in the V3 interface ***) + function SetSurfaceDesc(const lpddsd2: TDDSurfaceDesc2; dwFlags: DWORD): HResult; stdcall; + (*** Added in the v4 interface ***) + function SetPrivateData(const guidTag: TGUID; lpData: Pointer; + cbSize: DWORD; dwFlags: DWORD): HResult; stdcall; + function GetPrivateData(const guidTag: TGUID; lpBuffer: Pointer; + var lpcbBufferSize: DWORD): HResult; stdcall; + function FreePrivateData(const guidTag: TGUID): HResult; stdcall; + function GetUniquenessValue(out lpValue: DWORD): HResult; stdcall; + function ChangeUniquenessValue: HResult; stdcall; + (*** Moved Texture7 methods here ***) + function SetPriority(dwPriority: DWORD): HResult; stdcall; + function GetPriority(out lpdwPriority: DWORD): HResult; stdcall; + function SetLOD(dwMaxLOD: DWORD): HResult; stdcall; + function GetLOD(out lpdwMaxLOD: DWORD): HResult; stdcall; + end; + + IDirectDrawColorControl = interface(IUnknown) + ['{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}'] + function GetColorControls(out lpColorControl: TDDColorControl): HResult; stdcall; + function SetColorControls(const lpColorControl: TDDColorControl): HResult; stdcall; + end; + +(* + * IDirectDrawGammaControl + *) + IDirectDrawGammaControl = interface(IUnknown) + ['{69C11C3E-B46B-11D1-AD7A-00C04FC29B4E}'] + function GetGammaRamp(dwFlags: DWORD; out lpRampData: TDDGammaRamp): HResult; stdcall; + function SetGammaRamp(dwFlags: DWORD; const lpRampData: TDDGammaRamp): HResult; stdcall; + end; + +type + IID_IDirectDraw = IDirectDraw; + {$EXTERNALSYM IID_IDirectDraw} + IID_IDirectDraw2 = IDirectDraw2; + {$EXTERNALSYM IID_IDirectDraw2} + IID_IDirectDraw4 = IDirectDraw4; + {$EXTERNALSYM IID_IDirectDraw4} + IID_IDirectDraw7 = IDirectDraw7; + {$EXTERNALSYM IID_IDirectDraw7} + IID_IDirectDrawSurface = IDirectDrawSurface; + {$EXTERNALSYM IID_IDirectDrawSurface} + IID_IDirectDrawSurface2 = IDirectDrawSurface2; + {$EXTERNALSYM IID_IDirectDrawSurface2} + IID_IDirectDrawSurface3 = IDirectDrawSurface3; + {$EXTERNALSYM IID_IDirectDrawSurface3} + IID_IDirectDrawSurface4 = IDirectDrawSurface4; + {$EXTERNALSYM IID_IDirectDrawSurface4} + IID_IDirectDrawSurface7 = IDirectDrawSurface7; + {$EXTERNALSYM IID_IDirectDrawSurface7} + + IID_IDirectDrawPalette = IDirectDrawPalette; + {$EXTERNALSYM IID_IDirectDrawPalette} + IID_IDirectDrawClipper = IDirectDrawClipper; + {$EXTERNALSYM IID_IDirectDrawClipper} + IID_IDirectDrawColorControl = IDirectDrawColorControl; + {$EXTERNALSYM IID_IDirectDrawColorControl} + IID_IDirectDrawGammaControl = IDirectDrawGammaControl; + {$EXTERNALSYM IID_IDirectDrawGammaControl} + +const +(* + * ddsCaps field is valid. + *) + DDSD_CAPS = $00000001; // default + {$EXTERNALSYM DDSD_CAPS} + +(* + * dwHeight field is valid. + *) + DDSD_HEIGHT = $00000002; + {$EXTERNALSYM DDSD_HEIGHT} + +(* + * dwWidth field is valid. + *) + DDSD_WIDTH = $00000004; + {$EXTERNALSYM DDSD_WIDTH} + +(* + * lPitch is valid. + *) + DDSD_PITCH = $00000008; + {$EXTERNALSYM DDSD_PITCH} + +(* + * dwBackBufferCount is valid. + *) + DDSD_BACKBUFFERCOUNT = $00000020; + {$EXTERNALSYM DDSD_BACKBUFFERCOUNT} + +(* + * dwZBufferBitDepth is valid. (shouldnt be used in DDSURFACEDESC2) + *) + DDSD_ZBUFFERBITDEPTH = $00000040; + {$EXTERNALSYM DDSD_ZBUFFERBITDEPTH} + +(* + * dwAlphaBitDepth is valid. + *) + DDSD_ALPHABITDEPTH = $00000080; + {$EXTERNALSYM DDSD_ALPHABITDEPTH} + +(* + * lpSurface is valid. + *) + DDSD_LPSURFACE = $00000800; + {$EXTERNALSYM DDSD_LPSURFACE} + +(* + * ddpfPixelFormat is valid. + *) + DDSD_PIXELFORMAT = $00001000; + {$EXTERNALSYM DDSD_PIXELFORMAT} + +(* + * ddckCKDestOverlay is valid. + *) + DDSD_CKDESTOVERLAY = $00002000; + {$EXTERNALSYM DDSD_CKDESTOVERLAY} + +(* + * ddckCKDestBlt is valid. + *) + DDSD_CKDESTBLT = $00004000; + {$EXTERNALSYM DDSD_CKDESTBLT} + +(* + * ddckCKSrcOverlay is valid. + *) + DDSD_CKSRCOVERLAY = $00008000; + {$EXTERNALSYM DDSD_CKSRCOVERLAY} + +(* + * ddckCKSrcBlt is valid. + *) + DDSD_CKSRCBLT = $00010000; + {$EXTERNALSYM DDSD_CKSRCBLT} + +(* + * dwMipMapCount is valid. + *) + DDSD_MIPMAPCOUNT = $00020000; + {$EXTERNALSYM DDSD_MIPMAPCOUNT} + + (* + * dwRefreshRate is valid + *) + DDSD_REFRESHRATE = $00040000; + {$EXTERNALSYM DDSD_REFRESHRATE} + +(* + * dwLinearSize is valid + *) + DDSD_LINEARSIZE = $00080000; + {$EXTERNALSYM DDSD_LINEARSIZE} + +(* + * dwTextureStage is valid + *) + DDSD_TEXTURESTAGE = $00100000; + {$EXTERNALSYM DDSD_TEXTURESTAGE} + +(* + * dwFVF is valid + *) + DDSD_FVF = $00200000; + {$EXTERNALSYM DDSD_FVF} + +(* + * dwSrcVBHandle is valid + *) + DDSD_SRCVBHANDLE = $00400000; + {$EXTERNALSYM DDSD_SRCVBHANDLE} + +(* + * dwDepth is valid + *) + DDSD_DEPTH = $00800000; + {$EXTERNALSYM DDSD_DEPTH} + +(* + * All input fields are valid. + *) + DDSD_ALL = $00fff9ee; + {$EXTERNALSYM DDSD_ALL} + + +(* + * guid field is valid. + *) + DDOSD_GUID = $00000001; + {$EXTERNALSYM DDOSD_GUID} + +(* + * dwCompressionRatio field is valid. + *) + DDOSD_COMPRESSION_RATIO = $00000002; + {$EXTERNALSYM DDOSD_COMPRESSION_RATIO} + +(* + * ddSCaps field is valid. + *) + DDOSD_SCAPS = $00000004; + {$EXTERNALSYM DDOSD_SCAPS} + +(* + * ddOSCaps field is valid. + *) + DDOSD_OSCAPS = $00000008; + {$EXTERNALSYM DDOSD_OSCAPS} + +(* + * All input fields are valid. + *) + DDOSD_ALL = $0000000f; + {$EXTERNALSYM DDOSD_ALL} + +(* + * The surface's optimized pixelformat is compressed + *) + DDOSDCAPS_OPTCOMPRESSED = $00000001; + {$EXTERNALSYM DDOSDCAPS_OPTCOMPRESSED} + +(* + * The surface's optimized pixelformat is reordered + *) + DDOSDCAPS_OPTREORDERED = $00000002; + {$EXTERNALSYM DDOSDCAPS_OPTREORDERED} + +(* + * The opt surface is a monolithic mipmap + *) + DDOSDCAPS_MONOLITHICMIPMAP = $00000004; + {$EXTERNALSYM DDOSDCAPS_MONOLITHICMIPMAP} + +(* + * The valid Surf caps: + * DDSCAPS_SYSTEMMEMORY = $00000800; + * DDSCAPS_VIDEOMEMORY = $00004000; + * DDSCAPS_LOCALVIDMEM = $10000000; + * DDSCAPS_NONLOCALVIDMEM = $20000000; + *) + DDOSDCAPS_VALIDSCAPS = $30004800; + {$EXTERNALSYM DDOSDCAPS_VALIDSCAPS} + +(* + * The valid OptSurf caps + *) + DDOSDCAPS_VALIDOSCAPS = $00000007; + {$EXTERNALSYM DDOSDCAPS_VALIDOSCAPS} + + +(* + * DDCOLORCONTROL + *) + +(* + * lBrightness field is valid. + *) + DDCOLOR_BRIGHTNESS = $00000001; + {$EXTERNALSYM DDCOLOR_BRIGHTNESS} + +(* + * lContrast field is valid. + *) + DDCOLOR_CONTRAST = $00000002; + {$EXTERNALSYM DDCOLOR_CONTRAST} + +(* + * lHue field is valid. + *) + DDCOLOR_HUE = $00000004; + {$EXTERNALSYM DDCOLOR_HUE} + +(* + * lSaturation field is valid. + *) + DDCOLOR_SATURATION = $00000008; + {$EXTERNALSYM DDCOLOR_SATURATION} + +(* + * lSharpness field is valid. + *) + DDCOLOR_SHARPNESS = $00000010; + {$EXTERNALSYM DDCOLOR_SHARPNESS} + +(* + * lGamma field is valid. + *) + DDCOLOR_GAMMA = $00000020; + {$EXTERNALSYM DDCOLOR_GAMMA} + +(* + * lColorEnable field is valid. + *) + DDCOLOR_COLORENABLE = $00000040; + {$EXTERNALSYM DDCOLOR_COLORENABLE} + + + +(*============================================================================ + * + * Direct Draw Capability Flags + * + * These flags are used to describe the capabilities of a given Surface. + * All flags are bit flags. + * + *==========================================================================*) + +(**************************************************************************** + * + * DIRECTDRAWSURFACE CAPABILITY FLAGS + * + ****************************************************************************) +(* + * This bit currently has no meaning. + *) + DDSCAPS_RESERVED1 = $00000001; + {$EXTERNALSYM DDSCAPS_RESERVED1} + +(* + * Indicates that this surface contains alpha-only information. + * (To determine if a surface is RGBA/YUVA, the pixel format must be + * interrogated.) + *) + DDSCAPS_ALPHA = $00000002; + {$EXTERNALSYM DDSCAPS_ALPHA} + +(* + * Indicates that this surface is a backbuffer. It is generally + * set by CreateSurface when the DDSCAPS_FLIP capability bit is set. + * It indicates that this surface is THE back buffer of a surface + * flipping structure. DirectDraw supports N surfaces in a + * surface flipping structure. Only the surface that immediately + * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set. + * The other surfaces are identified as back buffers by the presence + * of the DDSCAPS_FLIP capability, their attachment order, and the + * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER + * capabilities. The bit is sent to CreateSurface when a standalone + * back buffer is being created. This surface could be attached to + * a front buffer and/or back buffers to form a flipping surface + * structure after the CreateSurface call. See AddAttachments for + * a detailed description of the behaviors in this case. + *) + DDSCAPS_BACKBUFFER = $00000004; + {$EXTERNALSYM DDSCAPS_BACKBUFFER} + +(* + * Indicates a complex surface structure is being described. A + * complex surface structure results in the creation of more than + * one surface. The additional surfaces are attached to the root + * surface. The complex structure can only be destroyed by + * destroying the root. + *) + DDSCAPS_COMPLEX = $00000008; + {$EXTERNALSYM DDSCAPS_COMPLEX} + +(* + * Indicates that this surface is a part of a surface flipping structure. + * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and + * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface + * on the resulting creations. The dwBackBufferCount field in the + * TDDSurfaceDesc structure must be set to at least 1 in order for + * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability + * must always be set with creating multiple surfaces through CreateSurface. + *) + DDSCAPS_FLIP = $00000010; + {$EXTERNALSYM DDSCAPS_FLIP} + +(* + * Indicates that this surface is THE front buffer of a surface flipping + * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP + * capability bit is set. + * If this capability is sent to CreateSurface then a standalonw front buffer + * is created. This surface will not have the DDSCAPS_FLIP capability. + * It can be attached to other back buffers to form a flipping structure. + * See AddAttachments for a detailed description of the behaviors in this + * case. + *) + DDSCAPS_FRONTBUFFER = $00000020; + {$EXTERNALSYM DDSCAPS_FRONTBUFFER} + +(* + * Indicates that this surface is any offscreen surface that is not an overlay, + * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used + * to identify plain vanilla surfaces. + *) + DDSCAPS_OFFSCREENPLAIN = $00000040; + {$EXTERNALSYM DDSCAPS_OFFSCREENPLAIN} + +(* + * Indicates that this surface is an overlay. It may or may not be directly visible + * depending on whether or not it is currently being overlayed onto the primary + * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being + * overlayed at the moment. + *) + DDSCAPS_OVERLAY = $00000080; + {$EXTERNALSYM DDSCAPS_OVERLAY} + +(* + * Indicates that unique DirectDrawPalette objects can be created and + * attached to this surface. + *) + DDSCAPS_PALETTE = $00000100; + {$EXTERNALSYM DDSCAPS_PALETTE} + +(* + * Indicates that this surface is the primary surface. The primary + * surface represents what the user is seeing at the moment. + *) + DDSCAPS_PRIMARYSURFACE = $00000200; + {$EXTERNALSYM DDSCAPS_PRIMARYSURFACE} + +(* + * This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now + * obsolete. + *) + DDSCAPS_RESERVED3 = $00000400; + {$EXTERNALSYM DDSCAPS_RESERVED3} + DDSCAPS_PRIMARYSURFACELEFT = DDSCAPS_RESERVED3; + {$EXTERNALSYM DDSCAPS_PRIMARYSURFACELEFT} + +(* + * Indicates that this surface memory was allocated in system memory + *) + DDSCAPS_SYSTEMMEMORY = $00000800; + {$EXTERNALSYM DDSCAPS_SYSTEMMEMORY} + +(* + * Indicates that this surface can be used as a 3D texture. It does not + * indicate whether or not the surface is being used for that purpose. + *) + DDSCAPS_TEXTURE = $00001000; + {$EXTERNALSYM DDSCAPS_TEXTURE} + +(* + * Indicates that a surface may be a destination for 3D rendering. This + * bit must be set in order to query for a Direct3D Device Interface + * from this surface. + *) + DDSCAPS_3DDEVICE = $00002000; + {$EXTERNALSYM DDSCAPS_3DDEVICE} + +(* + * Indicates that this surface exists in video memory. + *) + DDSCAPS_VIDEOMEMORY = $00004000; + {$EXTERNALSYM DDSCAPS_VIDEOMEMORY} + +(* + * Indicates that changes made to this surface are immediately visible. + * It is always set for the primary surface and is set for overlays while + * they are being overlayed and texture maps while they are being textured. + *) + DDSCAPS_VISIBLE = $00008000; + {$EXTERNALSYM DDSCAPS_VISIBLE} + +(* + * Indicates that only writes are permitted to the surface. Read accesses + * from the surface may or may not generate a protection fault, but the + * results of a read from this surface will not be meaningful. READ ONLY. + *) + DDSCAPS_WRITEONLY = $00010000; + {$EXTERNALSYM DDSCAPS_WRITEONLY} + +(* + * Indicates that this surface is a z buffer. A z buffer does not contain + * displayable information. Instead it contains bit depth information that is + * used to determine which pixels are visible and which are obscured. + *) + DDSCAPS_ZBUFFER = $00020000; + {$EXTERNALSYM DDSCAPS_ZBUFFER} + +(* + * Indicates surface will have a DC associated long term + *) + DDSCAPS_OWNDC = $00040000; + {$EXTERNALSYM DDSCAPS_OWNDC} + +(* + * Indicates surface should be able to receive live video + *) + DDSCAPS_LIVEVIDEO = $00080000; + {$EXTERNALSYM DDSCAPS_LIVEVIDEO} + +(* + * Indicates surface should be able to have a stream decompressed + * to it by the hardware. + *) + DDSCAPS_HWCODEC = $00100000; + {$EXTERNALSYM DDSCAPS_HWCODEC} + +(* + * Surface is a ModeX surface. + * + *) + DDSCAPS_MODEX = $00200000; + {$EXTERNALSYM DDSCAPS_MODEX} + +(* + * Indicates surface is one level of a mip-map. This surface will + * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map. + * This can be done explicitly, by creating a number of surfaces and + * attaching them with AddAttachedSurface or by implicitly by CreateSurface. + * If this bit is set then DDSCAPS_TEXTURE must also be set. + *) + DDSCAPS_MIPMAP = $00400000; + {$EXTERNALSYM DDSCAPS_MIPMAP} + +(* + * This bit is reserved. It should not be specified. + *) + DDSCAPS_RESERVED2 = $00800000; + {$EXTERNALSYM DDSCAPS_RESERVED2} + +(* + * Indicates that memory for the surface is not allocated until the surface + * is loaded (via the Direct3D texture Load() function). + *) + DDSCAPS_ALLOCONLOAD = $04000000; + {$EXTERNALSYM DDSCAPS_ALLOCONLOAD} + +(* + * Indicates that the surface will recieve data from a video port. + *) + DDSCAPS_VIDEOPORT = $08000000; + {$EXTERNALSYM DDSCAPS_VIDEOPORT} + +(* + * Indicates that a video memory surface is resident in true, local video + * memory rather than non-local video memory. If this flag is specified then + * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with + * DDSCAPS_NONLOCALVIDMEM. + *) + DDSCAPS_LOCALVIDMEM = $10000000; + {$EXTERNALSYM DDSCAPS_LOCALVIDMEM} + +(* + * Indicates that a video memory surface is resident in non-local video + * memory rather than true, local video memory. If this flag is specified + * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with + * DDSCAPS_LOCALVIDMEM. + *) + DDSCAPS_NONLOCALVIDMEM = $20000000; + {$EXTERNALSYM DDSCAPS_NONLOCALVIDMEM} + +(* + * Indicates that this surface is a standard VGA mode surface, and not a + * ModeX surface. (This flag will never be set in combination with the + * DDSCAPS_MODEX flag). + *) + DDSCAPS_STANDARDVGAMODE = $40000000; + {$EXTERNALSYM DDSCAPS_STANDARDVGAMODE} + +(* + * Indicates that this surface will be an optimized surface. This flag is + * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface + * will be created without any underlying video memory until loaded. + *) + DDSCAPS_OPTIMIZED = $80000000; + {$EXTERNALSYM DDSCAPS_OPTIMIZED} + + + +(* + * This bit is reserved + *) + DDSCAPS2_RESERVED4 = $00000002; + {$EXTERNALSYM DDSCAPS2_RESERVED4} + DDSCAPS2_HARDWAREDEINTERLACE = $00000000; + {$EXTERNALSYM DDSCAPS2_HARDWAREDEINTERLACE} + +(* + * Indicates to the driver that this surface will be locked very frequently + * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap + * set must also have DDSCAPS_TEXTURE. This cap cannot be used with + * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE. + *) + DDSCAPS2_HINTDYNAMIC = $00000004; + {$EXTERNALSYM DDSCAPS2_HINTDYNAMIC} + +(* + * Indicates to the driver that this surface can be re-ordered/retiled on + * load. This operation will not change the size of the texture. It is + * relatively fast and symmetrical, since the application may lock these + * bits (although it will take a performance hit when doing so). Surfaces + * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be + * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE. + *) + DDSCAPS2_HINTSTATIC = $00000008; + {$EXTERNALSYM DDSCAPS2_HINTSTATIC} + +(* + * Indicates that the client would like this texture surface to be managed by the + * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have + * DDSCAPS_TEXTURE and DDSCAPS_SYSTEMMEMORY. + *) + DDSCAPS2_TEXTUREMANAGE = $00000010; + {$EXTERNALSYM DDSCAPS2_TEXTUREMANAGE} + +(* + * These bits are reserved for internal use *) + DDSCAPS2_RESERVED1 = $00000020; + {$EXTERNALSYM DDSCAPS2_RESERVED1} + DDSCAPS2_RESERVED2 = $00000040; + {$EXTERNALSYM DDSCAPS2_RESERVED2} + +(* + * Indicates to the driver that this surface will never be locked again. + * The driver is free to optimize this surface via retiling and actual compression. + * All calls to Lock() or Blts from this surface will fail. Surfaces with this + * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with + * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC. + *) + DDSCAPS2_OPAQUE = $00000080; + {$EXTERNALSYM DDSCAPS2_OPAQUE} + +(* + * Applications should set this bit at CreateSurface time to indicate that they + * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set. + *) + DDSCAPS2_HINTANTIALIASING = $00000100; + {$EXTERNALSYM DDSCAPS2_HINTANTIALIASING} + +(* + * This flag is used at CreateSurface time to indicate that this set of + * surfaces is a cubic environment map + *) + DDSCAPS2_CUBEMAP = $00000200; + {$EXTERNALSYM DDSCAPS2_CUBEMAP} + +(* + * These flags preform two functions: + * - At CreateSurface time, they define which of the six cube faces are + * required by the application. + * - After creation, each face in the cubemap will have exactly one of these + * bits set. + *) + DDSCAPS2_CUBEMAP_POSITIVEX = $00000400; + {$EXTERNALSYM DDSCAPS2_CUBEMAP_POSITIVEX} + DDSCAPS2_CUBEMAP_NEGATIVEX = $00000800; + {$EXTERNALSYM DDSCAPS2_CUBEMAP_NEGATIVEX} + DDSCAPS2_CUBEMAP_POSITIVEY = $00001000; + {$EXTERNALSYM DDSCAPS2_CUBEMAP_POSITIVEY} + DDSCAPS2_CUBEMAP_NEGATIVEY = $00002000; + {$EXTERNALSYM DDSCAPS2_CUBEMAP_NEGATIVEY} + DDSCAPS2_CUBEMAP_POSITIVEZ = $00004000; + {$EXTERNALSYM DDSCAPS2_CUBEMAP_POSITIVEZ} + DDSCAPS2_CUBEMAP_NEGATIVEZ = $00008000; + {$EXTERNALSYM DDSCAPS2_CUBEMAP_NEGATIVEZ} + +(* + * This macro may be used to specify all faces of a cube map at CreateSurface time + *) + DDSCAPS2_CUBEMAP_ALLFACES = ( DDSCAPS2_CUBEMAP_POSITIVEX or + DDSCAPS2_CUBEMAP_NEGATIVEX or + DDSCAPS2_CUBEMAP_POSITIVEY or + DDSCAPS2_CUBEMAP_NEGATIVEY or + DDSCAPS2_CUBEMAP_POSITIVEZ or + DDSCAPS2_CUBEMAP_NEGATIVEZ ); + {$EXTERNALSYM DDSCAPS2_CUBEMAP_ALLFACES} + + +(* + * This flag is an additional flag which is present on mipmap sublevels from DX7 onwards + * It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface + * constructs such as Cube Maps, wherein there are more than one mipmap surface attached + * to the root surface. + * This caps bit is ignored by CreateSurface + *) + DDSCAPS2_MIPMAPSUBLEVEL = $00010000; + {$EXTERNALSYM DDSCAPS2_MIPMAPSUBLEVEL} + +(* This flag indicates that the texture should be managed by D3D only *) + DDSCAPS2_D3DTEXTUREMANAGE = $00020000; + {$EXTERNALSYM DDSCAPS2_D3DTEXTUREMANAGE} + +(* This flag indicates that the managed surface can be safely lost *) + DDSCAPS2_DONOTPERSIST = $00040000; + {$EXTERNALSYM DDSCAPS2_DONOTPERSIST} + +(* indicates that this surface is part of a stereo flipping chain *) + DDSCAPS2_STEREOSURFACELEFT = $00080000; + {$EXTERNALSYM DDSCAPS2_STEREOSURFACELEFT} + + +(* + * Indicates that the surface is a volume. + * Can be combined with DDSCAPS_MIPMAP to indicate a multi-level volume + *) + DDSCAPS2_VOLUME = $00200000; + {$EXTERNALSYM DDSCAPS2_VOLUME} + +(* + * Indicates that the surface may be locked multiple times by the application. + * This cap cannot be used with DDSCAPS2_OPAQUE. + *) + DDSCAPS2_NOTUSERLOCKABLE = $00400000; + {$EXTERNALSYM DDSCAPS2_NOTUSERLOCKABLE} + +(* + * Indicates that the vertex buffer data can be used to render points and + * point sprites. + *) + DDSCAPS2_POINTS = $00800000; + {$EXTERNALSYM DDSCAPS2_POINTS} + +(* + * Indicates that the vertex buffer data can be used to render rt pactches. + *) + DDSCAPS2_RTPATCHES = $01000000; + {$EXTERNALSYM DDSCAPS2_RTPATCHES} + +(* + * Indicates that the vertex buffer data can be used to render n patches. + *) + DDSCAPS2_NPATCHES = $02000000; + {$EXTERNALSYM DDSCAPS2_NPATCHES} + +(* + * This bit is reserved for internal use + *) + DDSCAPS2_RESERVED3 = $04000000; + {$EXTERNALSYM DDSCAPS2_RESERVED3} + + +(* + * Indicates that the contents of the backbuffer do not have to be preserved + * the contents of the backbuffer after they are presented. + *) + DDSCAPS2_DISCARDBACKBUFFER = $10000000; + {$EXTERNALSYM DDSCAPS2_DISCARDBACKBUFFER} + +(* + * Indicates that all surfaces in this creation chain should be given an alpha channel. + * This flag will be set on primary surface chains that may have no explicit pixel format + * (and thus take on the format of the current display mode). + * The driver should infer that all these surfaces have a format having an alpha channel. + * (e.g. assume D3DFMT_A8R8G8B8 if the display mode is x888.) + *) + DDSCAPS2_ENABLEALPHACHANNEL = $20000000; + {$EXTERNALSYM DDSCAPS2_ENABLEALPHACHANNEL} + +(* + * Indicates that all surfaces in this creation chain is extended primary surface format. + * This flag will be set on extended primary surface chains that always have explicit pixel + * format and the pixel format is typically GDI (Graphics Device Interface) couldn't handle, + * thus only used with fullscreen application. (e.g. D3DFMT_A2R10G10B10 format) + *) + DDSCAPS2_EXTENDEDFORMATPRIMARY = $40000000; + {$EXTERNALSYM DDSCAPS2_EXTENDEDFORMATPRIMARY} + +(* + * Indicates that all surfaces in this creation chain is additional primary surface. + * This flag will be set on primary surface chains which must present on the adapter + * id provided on dwCaps4. Typically this will be used to create secondary primary surface + * on DualView display adapter. + *) + DDSCAPS2_ADDITIONALPRIMARY = $80000000; + {$EXTERNALSYM DDSCAPS2_ADDITIONALPRIMARY} + +(* + * This is a mask that indicates the set of bits that may be set + * at createsurface time to indicate number of samples per pixel + * when multisampling + *) + DDSCAPS3_MULTISAMPLE_MASK = $0000001F; + {$EXTERNALSYM DDSCAPS3_MULTISAMPLE_MASK} + +(* + * This is a mask that indicates the set of bits that may be set + * at createsurface time to indicate the quality level of rendering + * for the current number of samples per pixel + *) + DDSCAPS3_MULTISAMPLE_QUALITY_MASK = $000000E0; + {$EXTERNALSYM DDSCAPS3_MULTISAMPLE_QUALITY_MASK} + DDSCAPS3_MULTISAMPLE_QUALITY_SHIFT = 5; + {$EXTERNALSYM DDSCAPS3_MULTISAMPLE_QUALITY_SHIFT} + +(* + * This bit is reserved for internal use + *) + DDSCAPS3_RESERVED1 = $00000100; + {$EXTERNALSYM DDSCAPS3_RESERVED1} + +(* + * This bit is reserved for internal use + *) + DDSCAPS3_RESERVED2 = $00000200; + {$EXTERNALSYM DDSCAPS3_RESERVED2} + +(* + * This indicates whether this surface has light-weight miplevels + *) + DDSCAPS3_LIGHTWEIGHTMIPMAP = $00000400; + {$EXTERNALSYM DDSCAPS3_LIGHTWEIGHTMIPMAP} + +(* + * This indicates that the mipsublevels for this surface are auto-generated + *) + DDSCAPS3_AUTOGENMIPMAP = $00000800; + {$EXTERNALSYM DDSCAPS3_AUTOGENMIPMAP} + +(* + * This indicates that the mipsublevels for this surface are auto-generated + *) + DDSCAPS3_DMAP = $00001000; + {$EXTERNALSYM DDSCAPS3_DMAP} + + + (**************************************************************************** + * + * DIRECTDRAW DRIVER CAPABILITY FLAGS + * + ****************************************************************************) + +(* + * Display hardware has 3D acceleration. + *) + DDCAPS_3D = $00000001; + {$EXTERNALSYM DDCAPS_3D} + +(* + * Indicates that DirectDraw will support only dest rectangles that are aligned + * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively. + * READ ONLY. + *) + DDCAPS_ALIGNBOUNDARYDEST = $00000002; + {$EXTERNALSYM DDCAPS_ALIGNBOUNDARYDEST} + +(* + * Indicates that DirectDraw will support only source rectangles whose sizes in + * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY. + *) + DDCAPS_ALIGNSIZEDEST = $00000004; + {$EXTERNALSYM DDCAPS_ALIGNSIZEDEST} +(* + * Indicates that DirectDraw will support only source rectangles that are aligned + * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively. + * READ ONLY. + *) + DDCAPS_ALIGNBOUNDARYSRC = $00000008; + {$EXTERNALSYM DDCAPS_ALIGNBOUNDARYSRC} + +(* + * Indicates that DirectDraw will support only source rectangles whose sizes in + * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY. + *) + DDCAPS_ALIGNSIZESRC = $00000010; + {$EXTERNALSYM DDCAPS_ALIGNSIZESRC} + +(* + * Indicates that DirectDraw will create video memory surfaces that have a stride + * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY. + *) + DDCAPS_ALIGNSTRIDE = $00000020; + {$EXTERNALSYM DDCAPS_ALIGNSTRIDE} + +(* + * Display hardware is capable of blt operations. + *) + DDCAPS_BLT = $00000040; + {$EXTERNALSYM DDCAPS_BLT} + +(* + * Display hardware is capable of asynchronous blt operations. + *) + DDCAPS_BLTQUEUE = $00000080; + {$EXTERNALSYM DDCAPS_BLTQUEUE} + +(* + * Display hardware is capable of color space conversions during the blt operation. + *) + DDCAPS_BLTFOURCC = $00000100; + {$EXTERNALSYM DDCAPS_BLTFOURCC} + +(* + * Display hardware is capable of stretching during blt operations. + *) + DDCAPS_BLTSTRETCH = $00000200; + {$EXTERNALSYM DDCAPS_BLTSTRETCH} + +(* + * Display hardware is shared with GDI. + *) + DDCAPS_GDI = $00000400; + {$EXTERNALSYM DDCAPS_GDI} + +(* + * Display hardware can overlay. + *) + DDCAPS_OVERLAY = $00000800; + {$EXTERNALSYM DDCAPS_OVERLAY} + +(* + * Set if display hardware supports overlays but can not clip them. + *) + DDCAPS_OVERLAYCANTCLIP = $00001000; + {$EXTERNALSYM DDCAPS_OVERLAYCANTCLIP} + +(* + * Indicates that overlay hardware is capable of color space conversions during + * the overlay operation. + *) + DDCAPS_OVERLAYFOURCC = $00002000; + {$EXTERNALSYM DDCAPS_OVERLAYFOURCC} + +(* + * Indicates that stretching can be done by the overlay hardware. + *) + DDCAPS_OVERLAYSTRETCH = $00004000; + {$EXTERNALSYM DDCAPS_OVERLAYSTRETCH} + +(* + * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces + * other than the primary surface. + *) + DDCAPS_PALETTE = $00008000; + {$EXTERNALSYM DDCAPS_PALETTE} + +(* + * Indicates that palette changes can be syncd with the veritcal refresh. + *) + DDCAPS_PALETTEVSYNC = $00010000; + {$EXTERNALSYM DDCAPS_PALETTEVSYNC} + +(* + * Display hardware can return the current scan line. + *) + DDCAPS_READSCANLINE = $00020000; + {$EXTERNALSYM DDCAPS_READSCANLINE} + +(* + * This flag used to bo DDCAPS_STEREOVIEW, which is now obsolete + *) + DDCAPS_RESERVED1 = $00040000; + {$EXTERNALSYM DDCAPS_RESERVED1} + +(* + * Display hardware is capable of generating a vertical blank interrupt. + *) + DDCAPS_VBI = $00080000; + {$EXTERNALSYM DDCAPS_VBI} + +(* + * Supports the use of z buffers with blt operations. + *) + DDCAPS_ZBLTS = $00100000; + {$EXTERNALSYM DDCAPS_ZBLTS} + +(* + * Supports Z Ordering of overlays. + *) + DDCAPS_ZOVERLAYS = $00200000; + {$EXTERNALSYM DDCAPS_ZOVERLAYS} + +(* + * Supports color key + *) + DDCAPS_COLORKEY = $00400000; + {$EXTERNALSYM DDCAPS_COLORKEY} + +(* + * Supports alpha surfaces + *) + DDCAPS_ALPHA = $00800000; + {$EXTERNALSYM DDCAPS_ALPHA} + +(* + * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set) + *) + DDCAPS_COLORKEYHWASSIST = $01000000; + {$EXTERNALSYM DDCAPS_COLORKEYHWASSIST} + +(* + * no hardware support at all + *) + DDCAPS_NOHARDWARE = $02000000; + {$EXTERNALSYM DDCAPS_NOHARDWARE} + +(* + * Display hardware is capable of color fill with bltter + *) + DDCAPS_BLTCOLORFILL = $04000000; + {$EXTERNALSYM DDCAPS_BLTCOLORFILL} + +(* + * Display hardware is bank switched, and potentially very slow at + * random access to VRAM. + *) + DDCAPS_BANKSWITCHED = $08000000; + {$EXTERNALSYM DDCAPS_BANKSWITCHED} + +(* + * Display hardware is capable of depth filling Z-buffers with bltter + *) + DDCAPS_BLTDEPTHFILL = $10000000; + {$EXTERNALSYM DDCAPS_BLTDEPTHFILL} + +(* + * Display hardware is capable of clipping while bltting. + *) + DDCAPS_CANCLIP = $20000000; + {$EXTERNALSYM DDCAPS_CANCLIP} + +(* + * Display hardware is capable of clipping while stretch bltting. + *) + DDCAPS_CANCLIPSTRETCHED = $40000000; + {$EXTERNALSYM DDCAPS_CANCLIPSTRETCHED} + +(* + * Display hardware is capable of bltting to or from system memory + *) + DDCAPS_CANBLTSYSMEM = $80000000; + {$EXTERNALSYM DDCAPS_CANBLTSYSMEM} + + + (**************************************************************************** + * + * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2) + * + ****************************************************************************) + +(* + * Display hardware is certified + *) + DDCAPS2_CERTIFIED = $00000001; + {$EXTERNALSYM DDCAPS2_CERTIFIED} + +(* + * Driver cannot interleave 2D operations (lock and blt) to surfaces with + * Direct3D rendering operations between calls to BeginScene() and EndScene() + *) + DDCAPS2_NO2DDURING3DSCENE = $00000002; + {$EXTERNALSYM DDCAPS2_NO2DDURING3DSCENE} + +(* + * Display hardware contains a video port + *) + DDCAPS2_VIDEOPORT = $00000004; + {$EXTERNALSYM DDCAPS2_VIDEOPORT} + +(* + * The overlay can be automatically flipped according to the video port + * VSYNCs, providing automatic doubled buffered display of video port + * data using an overlay + *) + DDCAPS2_AUTOFLIPOVERLAY = $00000008; + {$EXTERNALSYM DDCAPS2_AUTOFLIPOVERLAY} + +(* + * Overlay can display each field of interlaced data individually while + * it is interleaved in memory without causing jittery artifacts. + *) + DDCAPS2_CANBOBINTERLEAVED = $00000010; + {$EXTERNALSYM DDCAPS2_CANBOBINTERLEAVED} + +(* + * Overlay can display each field of interlaced data individually while + * it is not interleaved in memory without causing jittery artifacts. + *) + DDCAPS2_CANBOBNONINTERLEAVED = $00000020; + {$EXTERNALSYM DDCAPS2_CANBOBNONINTERLEAVED} + +(* + * The overlay surface contains color controls (brightness, sharpness, etc.) + *) + DDCAPS2_COLORCONTROLOVERLAY = $00000040; + {$EXTERNALSYM DDCAPS2_COLORCONTROLOVERLAY} + +(* + * The primary surface contains color controls (gamma, etc.) + *) + DDCAPS2_COLORCONTROLPRIMARY = $00000080; + {$EXTERNALSYM DDCAPS2_COLORCONTROLPRIMARY} + +(* + * RGBZ -> RGB supported for 16:16 RGB:Z + *) + DDCAPS2_CANDROPZ16BIT = $00000100; + {$EXTERNALSYM DDCAPS2_CANDROPZ16BIT} + +(* + * Driver supports non-local video memory. + *) + DDCAPS2_NONLOCALVIDMEM = $00000200; + {$EXTERNALSYM DDCAPS2_NONLOCALVIDMEM} + +(* + * Dirver supports non-local video memory but has different capabilities for + * non-local video memory surfaces. If this bit is set then so must + * DDCAPS2_NONLOCALVIDMEM. + *) + DDCAPS2_NONLOCALVIDMEMCAPS = $00000400; + {$EXTERNALSYM DDCAPS2_NONLOCALVIDMEMCAPS} + +(* + * Driver neither requires nor prefers surfaces to be pagelocked when performing + * blts involving system memory surfaces + *) + DDCAPS2_NOPAGELOCKREQUIRED = $00000800; + {$EXTERNALSYM DDCAPS2_NOPAGELOCKREQUIRED} + +(* + * Driver can create surfaces which are wider than the primary surface + *) + DDCAPS2_WIDESURFACES = $00001000; + {$EXTERNALSYM DDCAPS2_WIDESURFACES} + +(* + * Driver supports bob without using a video port by handling the + * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip. + *) + DDCAPS2_CANFLIPODDEVEN = $00002000; + {$EXTERNALSYM DDCAPS2_CANFLIPODDEVEN} + +(* + * Driver supports bob using hardware + *) + DDCAPS2_CANBOBHARDWARE = $00004000; + {$EXTERNALSYM DDCAPS2_CANBOBHARDWARE} + +(* + * Driver supports bltting any FOURCC surface to another surface of the same FOURCC + *) + DDCAPS2_COPYFOURCC = $00008000; + {$EXTERNALSYM DDCAPS2_COPYFOURCC} + + +(* + * Driver supports loadable gamma ramps for the primary surface + *) + DDCAPS2_PRIMARYGAMMA = $00020000; + {$EXTERNALSYM DDCAPS2_PRIMARYGAMMA} + +(* + * Driver can render in windowed mode. + *) + DDCAPS2_CANRENDERWINDOWED = $00080000; + {$EXTERNALSYM DDCAPS2_CANRENDERWINDOWED} + +(* + * A calibrator is available to adjust the gamma ramp according to the + * physical display properties so that the result will be identical on + * all calibrated systems. + *) + DDCAPS2_CANCALIBRATEGAMMA = $00100000; + {$EXTERNALSYM DDCAPS2_CANCALIBRATEGAMMA} + +(* + * Indicates that the driver will respond to DDFLIP_INTERVALn flags + *) + DDCAPS2_FLIPINTERVAL = $00200000; + {$EXTERNALSYM DDCAPS2_FLIPINTERVAL} + +(* + * Indicates that the driver will respond to DDFLIP_NOVSYNC + *) + DDCAPS2_FLIPNOVSYNC = $00400000; + {$EXTERNALSYM DDCAPS2_FLIPNOVSYNC} + +(* + * Driver supports management of video memory, if this flag is ON, + * driver manages the texture if requested with DDSCAPS2_TEXTUREMANAGE on + * DirectX manages the texture if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on + *) + DDCAPS2_CANMANAGETEXTURE = $00800000; + {$EXTERNALSYM DDCAPS2_CANMANAGETEXTURE} + +(* + * The Direct3D texture manager uses this cap to decide whether to put managed + * surfaces in non-local video memory. If the cap is set, the texture manager will + * put managed surfaces in non-local vidmem. Drivers that cannot texture from + * local vidmem SHOULD NOT set this cap. + *) + DDCAPS2_TEXMANINNONLOCALVIDMEM = $01000000; + {$EXTERNALSYM DDCAPS2_TEXMANINNONLOCALVIDMEM} + +(* + * Indicates that the driver supports DX7 type of stereo in at least one mode (which may + * not necessarily be the current mode). Applications should use IDirectDraw7 (or higher) + * ::EnumDisplayModes and check the DDSURFACEDESC.ddsCaps.dwCaps2 field for the presence of + * DDSCAPS2_STEREOSURFACELEFT to check if a particular mode supports stereo. The application + * can also use IDirectDraw7(or higher)::GetDisplayMode to check the current mode. + *) + DDCAPS2_STEREO = $02000000; + {$EXTERNALSYM DDCAPS2_STEREO} + +(* + * This caps bit is intended for internal DirectDraw use. + * -It is only valid if DDCAPS2_NONLOCALVIDMEMCAPS is set. + * -If this bit is set, then DDCAPS_CANBLTSYSMEM MUST be set by the driver (and + * all the assoicated system memory blt caps must be correct). + * -It implies that the system->video blt caps in DDCAPS also apply to system to + * nonlocal blts. I.e. the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCaps and dwSVBRops + * members of DDCAPS (DDCORECAPS) are filled in correctly. + * -Any blt from system to nonlocal memory that matches these caps bits will + * be passed to the driver. + * + * NOTE: This is intended to enable the driver itself to do efficient reordering + * of textures. This is NOT meant to imply that hardware can write into AGP memory. + * This operation is not currently supported. + *) + DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL = $04000000; + {$EXTERNALSYM DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL} + +(* + * was DDCAPS2_PUREHAL + *) + DDCAPS2_RESERVED1 = $08000000; + {$EXTERNALSYM DDCAPS2_RESERVED1} + +(* + * Driver supports management of video memory, if this flag is ON, + * driver manages the resource if requested with DDSCAPS2_TEXTUREMANAGE on + * DirectX manages the resource if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on + *) + DDCAPS2_CANMANAGERESOURCE = $10000000; + {$EXTERNALSYM DDCAPS2_CANMANAGERESOURCE} + +(* + * Driver supports dynamic textures. This will allow the application to set + * D3DUSAGE_DYNAMIC (DDSCAPS2_HINTDYNAMIC for drivers) at texture create time. + * Video memory dynamic textures WILL be lockable by applications. It is + * expected that these locks will be very efficient (which implies that the + * driver should always maintain a linear copy, a pointer to which can be + * quickly handed out to the application). + *) + DDCAPS2_DYNAMICTEXTURES = $20000000; + {$EXTERNALSYM DDCAPS2_DYNAMICTEXTURES} + +(* + * Driver supports auto-generation of mipmaps. + *) + DDCAPS2_CANAUTOGENMIPMAP = $40000000; + {$EXTERNALSYM DDCAPS2_CANAUTOGENMIPMAP} + + +(**************************************************************************** + * + * DIRECTDRAW FX ALPHA CAPABILITY FLAGS + * + ****************************************************************************) + +(* + * Supports alpha blending around the edge of a source color keyed surface. + * For Blt. + *) + DDFXALPHACAPS_BLTALPHAEDGEBLEND = $00000001; + {$EXTERNALSYM DDFXALPHACAPS_BLTALPHAEDGEBLEND} + +(* + * Supports alpha information in the pixel format. The bit depth of alpha + * information in the pixel format can be 1,2,4, or 8. The alpha value becomes + * more opaque as the alpha value increases. (0 is transparent.) + * For Blt. + *) + DDFXALPHACAPS_BLTALPHAPIXELS = $00000002; + {$EXTERNALSYM DDFXALPHACAPS_BLTALPHAPIXELS} + +(* + * Supports alpha information in the pixel format. The bit depth of alpha + * information in the pixel format can be 1,2,4, or 8. The alpha value + * becomes more transparent as the alpha value increases. (0 is opaque.) + * This flag can only be set if DDCAPS_ALPHA is set. + * For Blt. + *) + DDFXALPHACAPS_BLTALPHAPIXELSNEG = $00000004; + {$EXTERNALSYM DDFXALPHACAPS_BLTALPHAPIXELSNEG} + +(* + * Supports alpha only surfaces. The bit depth of an alpha only surface can be + * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases. + * (0 is transparent.) + * For Blt. + *) + DDFXALPHACAPS_BLTALPHASURFACES = $00000008; + {$EXTERNALSYM DDFXALPHACAPS_BLTALPHASURFACES} + +(* + * The depth of the alpha channel data can range can be 1,2,4, or 8. + * The NEG suffix indicates that this alpha channel becomes more transparent + * as the alpha value increases. (0 is opaque.) This flag can only be set if + * DDCAPS_ALPHA is set. + * For Blt. + *) + DDFXALPHACAPS_BLTALPHASURFACESNEG = $00000010; + {$EXTERNALSYM DDFXALPHACAPS_BLTALPHASURFACESNEG} + +(* + * Supports alpha blending around the edge of a source color keyed surface. + * For Overlays. + *) + DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND = $00000020; + {$EXTERNALSYM DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND} + +(* + * Supports alpha information in the pixel format. The bit depth of alpha + * information in the pixel format can be 1,2,4, or 8. The alpha value becomes + * more opaque as the alpha value increases. (0 is transparent.) + * For Overlays. + *) + DDFXALPHACAPS_OVERLAYALPHAPIXELS = $00000040; + {$EXTERNALSYM DDFXALPHACAPS_OVERLAYALPHAPIXELS} + +(* + * Supports alpha information in the pixel format. The bit depth of alpha + * information in the pixel format can be 1,2,4, or 8. The alpha value + * becomes more transparent as the alpha value increases. (0 is opaque.) + * This flag can only be set if DDCAPS_ALPHA is set. + * For Overlays. + *) + DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG = $00000080; + {$EXTERNALSYM DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG} + +(* + * Supports alpha only surfaces. The bit depth of an alpha only surface can be + * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases. + * (0 is transparent.) + * For Overlays. + *) + DDFXALPHACAPS_OVERLAYALPHASURFACES = $00000100; + {$EXTERNALSYM DDFXALPHACAPS_OVERLAYALPHASURFACES} + +(* + * The depth of the alpha channel data can range can be 1,2,4, or 8. + * The NEG suffix indicates that this alpha channel becomes more transparent + * as the alpha value increases. (0 is opaque.) This flag can only be set if + * DDCAPS_ALPHA is set. + * For Overlays. + *) + DDFXALPHACAPS_OVERLAYALPHASURFACESNEG = $00000200; + {$EXTERNALSYM DDFXALPHACAPS_OVERLAYALPHASURFACESNEG} + +(**************************************************************************** + * + * DIRECTDRAW FX CAPABILITY FLAGS + * + ****************************************************************************) + +(* + * Uses arithmetic operations to stretch and shrink surfaces during blt + * rather than pixel doubling techniques. Along the Y axis. + *) + DDFXCAPS_BLTARITHSTRETCHY = $00000020; + {$EXTERNALSYM DDFXCAPS_BLTARITHSTRETCHY} + +(* + * Uses arithmetic operations to stretch during blt + * rather than pixel doubling techniques. Along the Y axis. Only + * works for x1, x2, etc. + *) + DDFXCAPS_BLTARITHSTRETCHYN = $00000010; + {$EXTERNALSYM DDFXCAPS_BLTARITHSTRETCHYN} + +(* + * Supports mirroring left to right in blt. + *) + DDFXCAPS_BLTMIRRORLEFTRIGHT = $00000040; + {$EXTERNALSYM DDFXCAPS_BLTMIRRORLEFTRIGHT} + +(* + * Supports mirroring top to bottom in blt. + *) + DDFXCAPS_BLTMIRRORUPDOWN = $00000080; + {$EXTERNALSYM DDFXCAPS_BLTMIRRORUPDOWN} + +(* + * Supports arbitrary rotation for blts. + *) + DDFXCAPS_BLTROTATION = $00000100; + {$EXTERNALSYM DDFXCAPS_BLTROTATION} + +(* + * Supports 90 degree rotations for blts. + *) + DDFXCAPS_BLTROTATION90 = $00000200; + {$EXTERNALSYM DDFXCAPS_BLTROTATION90} + +(* + * DirectDraw supports arbitrary shrinking of a surface along the + * x axis (horizontal direction) for blts. + *) + DDFXCAPS_BLTSHRINKX = $00000400; + {$EXTERNALSYM DDFXCAPS_BLTSHRINKX} + +(* + * DirectDraw supports integer shrinking (1x,2x,) of a surface + * along the x axis (horizontal direction) for blts. + *) + DDFXCAPS_BLTSHRINKXN = $00000800; + {$EXTERNALSYM DDFXCAPS_BLTSHRINKXN} + +(* + * DirectDraw supports arbitrary shrinking of a surface along the + * y axis (horizontal direction) for blts. + *) + DDFXCAPS_BLTSHRINKY = $00001000; + {$EXTERNALSYM DDFXCAPS_BLTSHRINKY} + +(* + * DirectDraw supports integer shrinking (1x,2x,) of a surface + * along the y axis (vertical direction) for blts. + *) + DDFXCAPS_BLTSHRINKYN = $00002000; + {$EXTERNALSYM DDFXCAPS_BLTSHRINKYN} + +(* + * DirectDraw supports arbitrary stretching of a surface along the + * x axis (horizontal direction) for blts. + *) + DDFXCAPS_BLTSTRETCHX = $00004000; + {$EXTERNALSYM DDFXCAPS_BLTSTRETCHX} + +(* + * DirectDraw supports integer stretching (1x,2x,) of a surface + * along the x axis (horizontal direction) for blts. + *) + DDFXCAPS_BLTSTRETCHXN = $00008000; + {$EXTERNALSYM DDFXCAPS_BLTSTRETCHXN} + +(* + * DirectDraw supports arbitrary stretching of a surface along the + * y axis (horizontal direction) for blts. + *) + DDFXCAPS_BLTSTRETCHY = $00010000; + {$EXTERNALSYM DDFXCAPS_BLTSTRETCHY} + +(* + * DirectDraw supports integer stretching (1x,2x,) of a surface + * along the y axis (vertical direction) for blts. + *) + DDFXCAPS_BLTSTRETCHYN = $00020000; + {$EXTERNALSYM DDFXCAPS_BLTSTRETCHYN} + +(* + * Uses arithmetic operations to stretch and shrink surfaces during + * overlay rather than pixel doubling techniques. Along the Y axis + * for overlays. + *) + DDFXCAPS_OVERLAYARITHSTRETCHY = $00040000; + {$EXTERNALSYM DDFXCAPS_OVERLAYARITHSTRETCHY} + +(* + * Uses arithmetic operations to stretch surfaces during + * overlay rather than pixel doubling techniques. Along the Y axis + * for overlays. Only works for x1, x2, etc. + *) + DDFXCAPS_OVERLAYARITHSTRETCHYN = $00000008; + {$EXTERNALSYM DDFXCAPS_OVERLAYARITHSTRETCHYN} + +(* + * DirectDraw supports arbitrary shrinking of a surface along the + * x axis (horizontal direction) for overlays. + *) + DDFXCAPS_OVERLAYSHRINKX = $00080000; + {$EXTERNALSYM DDFXCAPS_OVERLAYSHRINKX} + +(* + * DirectDraw supports integer shrinking (1x,2x,) of a surface + * along the x axis (horizontal direction) for overlays. + *) + DDFXCAPS_OVERLAYSHRINKXN = $00100000; + {$EXTERNALSYM DDFXCAPS_OVERLAYSHRINKXN} + +(* + * DirectDraw supports arbitrary shrinking of a surface along the + * y axis (horizontal direction) for overlays. + *) + DDFXCAPS_OVERLAYSHRINKY = $00200000; + {$EXTERNALSYM DDFXCAPS_OVERLAYSHRINKY} + +(* + * DirectDraw supports integer shrinking (1x,2x,) of a surface + * along the y axis (vertical direction) for overlays. + *) + DDFXCAPS_OVERLAYSHRINKYN = $00400000; + {$EXTERNALSYM DDFXCAPS_OVERLAYSHRINKYN} + +(* + * DirectDraw supports arbitrary stretching of a surface along the + * x axis (horizontal direction) for overlays. + *) + DDFXCAPS_OVERLAYSTRETCHX = $00800000; + {$EXTERNALSYM DDFXCAPS_OVERLAYSTRETCHX} + +(* + * DirectDraw supports integer stretching (1x,2x,) of a surface + * along the x axis (horizontal direction) for overlays. + *) + DDFXCAPS_OVERLAYSTRETCHXN = $01000000; + {$EXTERNALSYM DDFXCAPS_OVERLAYSTRETCHXN} + +(* + * DirectDraw supports arbitrary stretching of a surface along the + * y axis (horizontal direction) for overlays. + *) + DDFXCAPS_OVERLAYSTRETCHY = $02000000; + {$EXTERNALSYM DDFXCAPS_OVERLAYSTRETCHY} + +(* + * DirectDraw supports integer stretching (1x,2x,) of a surface + * along the y axis (vertical direction) for overlays. + *) + DDFXCAPS_OVERLAYSTRETCHYN = $04000000; + {$EXTERNALSYM DDFXCAPS_OVERLAYSTRETCHYN} + +(* + * DirectDraw supports mirroring of overlays across the vertical axis + *) + DDFXCAPS_OVERLAYMIRRORLEFTRIGHT = $08000000; + {$EXTERNALSYM DDFXCAPS_OVERLAYMIRRORLEFTRIGHT} + +(* + * DirectDraw supports mirroring of overlays across the horizontal axis + *) + DDFXCAPS_OVERLAYMIRRORUPDOWN = $10000000; + {$EXTERNALSYM DDFXCAPS_OVERLAYMIRRORUPDOWN} + +(* + * DirectDraw supports deinterlacing of overlay surfaces + *) + DDFXCAPS_OVERLAYDEINTERLACE = $20000000; + {$EXTERNALSYM DDFXCAPS_OVERLAYDEINTERLACE} + + +(* + * Driver can do alpha blending for blits. + *) + DDFXCAPS_BLTALPHA = $00000001; + {$EXTERNALSYM DDFXCAPS_BLTALPHA} + +(* + * Driver can do geometric transformations (or warps) for blits. + *) + DDFXCAPS_BLTTRANSFORM = $00000002; + {$EXTERNALSYM DDFXCAPS_BLTTRANSFORM} + +(* + * Driver can do surface-reconstruction filtering for warped blits. + *) + DDFXCAPS_BLTFILTER = DDFXCAPS_BLTARITHSTRETCHY; + {$EXTERNALSYM DDFXCAPS_BLTFILTER} + +(* + * Driver can do alpha blending for overlays. + *) + DDFXCAPS_OVERLAYALPHA = $00000004; + {$EXTERNALSYM DDFXCAPS_OVERLAYALPHA} + +(* + * Driver can do geometric transformations (or warps) for overlays. + *) + DDFXCAPS_OVERLAYTRANSFORM = $20000000; + {$EXTERNALSYM DDFXCAPS_OVERLAYTRANSFORM} + +(* + * Driver can do surface-reconstruction filtering for warped overlays. + *) + DDFXCAPS_OVERLAYFILTER = DDFXCAPS_OVERLAYARITHSTRETCHY; + {$EXTERNALSYM DDFXCAPS_OVERLAYFILTER} + +(**************************************************************************** + * + * DIRECTDRAW STEREO VIEW CAPABILITIES + * + ****************************************************************************) + +(* + * This flag used to be DDSVCAPS_ENIGMA, which is now obsolete + *) + DDSVCAPS_RESERVED1 = $00000001; + {$EXTERNALSYM DDSVCAPS_RESERVED1} + +(* + * This flag used to be DDSVCAPS_FLICKER, which is now obsolete + *) + DDSVCAPS_RESERVED2 = $00000002; + {$EXTERNALSYM DDSVCAPS_RESERVED2} + +(* + * This flag used to be DDSVCAPS_REDBLUE, which is now obsolete + *) + DDSVCAPS_RESERVED3 = $00000004; + {$EXTERNALSYM DDSVCAPS_RESERVED3} + +(* + * This flag used to be DDSVCAPS_SPLIT, which is now obsolete + *) + DDSVCAPS_RESERVED4 = $00000008; + {$EXTERNALSYM DDSVCAPS_RESERVED4} + +(* + * The stereo view is accomplished with switching technology + *) + DDSVCAPS_STEREOSEQUENTIAL = $00000010; + {$EXTERNALSYM DDSVCAPS_STEREOSEQUENTIAL} + +(**************************************************************************** + * + * DIRECTDRAWPALETTE CAPABILITIES + * + ****************************************************************************) + +(* + * Index is 4 bits. There are sixteen color entries in the palette table. + *) + DDPCAPS_4BIT = $00000001; + {$EXTERNALSYM DDPCAPS_4BIT} + +(* + * Index is onto a 8 bit color index. This field is only valid with the + * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target + * surface is in 8bpp. Each color entry is one byte long and is an index + * into destination surface's 8bpp palette. + *) + DDPCAPS_8BITENTRIES = $00000002; + {$EXTERNALSYM DDPCAPS_8BITENTRIES} + +(* + * Index is 8 bits. There are 256 color entries in the palette table. + *) + DDPCAPS_8BIT = $00000004; + {$EXTERNALSYM DDPCAPS_8BIT} + +(* + * Indicates that this DIRECTDRAWPALETTE should use the palette color array + * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE + * object. + * This flag is obsolete. DirectDraw always initializes the color array from + * the lpDDColorArray parameter. The definition remains for source-level + * compatibility. + *) + DDPCAPS_INITIALIZE = $00000008; + {$EXTERNALSYM DDPCAPS_INITIALIZE} + +(* + * This palette is the one attached to the primary surface. Changing this + * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified + * and supported. + *) + DDPCAPS_PRIMARYSURFACE = $00000010; + {$EXTERNALSYM DDPCAPS_PRIMARYSURFACE} + +(* + * This palette is the one attached to the primary surface left. Changing + * this table has immediate effect on the display for the left eye unless + * DDPSETPAL_VSYNC is specified and supported. + *) + DDPCAPS_PRIMARYSURFACELEFT = $00000020; + {$EXTERNALSYM DDPCAPS_PRIMARYSURFACELEFT} + +(* + * This palette can have all 256 entries defined + *) + DDPCAPS_ALLOW256 = $00000040; + {$EXTERNALSYM DDPCAPS_ALLOW256} + +(* + * This palette can have modifications to it synced with the monitors + * refresh rate. + *) + DDPCAPS_VSYNC = $00000080; + {$EXTERNALSYM DDPCAPS_VSYNC} + +(* + * Index is 1 bit. There are two color entries in the palette table. + *) + DDPCAPS_1BIT = $00000100; + {$EXTERNALSYM DDPCAPS_1BIT} + +(* + * Index is 2 bit. There are four color entries in the palette table. + *) + DDPCAPS_2BIT = $00000200; + {$EXTERNALSYM DDPCAPS_2BIT} + +(* + * The peFlags member of PALETTEENTRY denotes an 8 bit alpha value + *) + DDPCAPS_ALPHA = $00000400; + {$EXTERNALSYM DDPCAPS_ALPHA} + + +(**************************************************************************** + * + * DIRECTDRAWPALETTE SETENTRY CONSTANTS + * + ****************************************************************************) + + +(**************************************************************************** + * + * DIRECTDRAWPALETTE GETENTRY CONSTANTS + * + ****************************************************************************) + +(* 0 is the only legal value *) + +(**************************************************************************** + * + * DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS + * + ****************************************************************************) + +(* + * The passed pointer is an IUnknown ptr. The cbData argument to SetPrivateData + * must be set to SizeOf(IUnknown^). DirectDraw will call AddRef through this + * pointer and Release when the private data is destroyed. This includes when + * the surface or palette is destroyed before such priovate data is destroyed. + *) + DDSPD_IUNKNOWNPOINTER = $00000001; + {$EXTERNALSYM DDSPD_IUNKNOWNPOINTER} + +(* + * Private data is only valid for the current state of the object, + * as determined by the uniqueness value. + *) + DDSPD_VOLATILE = $00000002; + {$EXTERNALSYM DDSPD_VOLATILE} + + +(**************************************************************************** + * + * DIRECTDRAWSURFACE SETPALETTE CONSTANTS + * + ****************************************************************************) + + +(**************************************************************************** + * + * DIRECTDRAW BITDEPTH CONSTANTS + * + * NOTE: These are only used to indicate supported bit depths. These + * are flags only, they are not to be used as an actual bit depth. The + * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual + * bit depths in a surface or for changing the display mode. + * + ****************************************************************************) + +(* + * 1 bit per pixel. + *) + DDBD_1 = $00004000; + {$EXTERNALSYM DDBD_1} + +(* + * 2 bits per pixel. + *) + DDBD_2 = $00002000; + {$EXTERNALSYM DDBD_2} + +(* + * 4 bits per pixel. + *) + DDBD_4 = $00001000; + {$EXTERNALSYM DDBD_4} + +(* + * 8 bits per pixel. + *) + DDBD_8 = $00000800; + {$EXTERNALSYM DDBD_8} + +(* + * 16 bits per pixel. + *) + DDBD_16 = $00000400; + {$EXTERNALSYM DDBD_16} + +(* + * 24 bits per pixel. + *) + DDBD_24 = $00000200; + {$EXTERNALSYM DDBD_24} + +(* + * 32 bits per pixel. + *) + DDBD_32 = $00000100; + {$EXTERNALSYM DDBD_32} + +(**************************************************************************** + * + * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS + * + ****************************************************************************) + +(* + * Set if the structure contains a color space. Not set if the structure + * contains a single color key. + *) + DDCKEY_COLORSPACE = $00000001; + {$EXTERNALSYM DDCKEY_COLORSPACE} + +(* + * Set if the structure specifies a color key or color space which is to be + * used as a destination color key for blt operations. + *) + DDCKEY_DESTBLT = $00000002; + {$EXTERNALSYM DDCKEY_DESTBLT} + +(* + * Set if the structure specifies a color key or color space which is to be + * used as a destination color key for overlay operations. + *) + DDCKEY_DESTOVERLAY = $00000004; + {$EXTERNALSYM DDCKEY_DESTOVERLAY} + +(* + * Set if the structure specifies a color key or color space which is to be + * used as a source color key for blt operations. + *) + DDCKEY_SRCBLT = $00000008; + {$EXTERNALSYM DDCKEY_SRCBLT} + +(* + * Set if the structure specifies a color key or color space which is to be + * used as a source color key for overlay operations. + *) + DDCKEY_SRCOVERLAY = $00000010; + {$EXTERNALSYM DDCKEY_SRCOVERLAY} + + +(**************************************************************************** + * + * DIRECTDRAW COLOR KEY CAPABILITY FLAGS + * + ****************************************************************************) + +(* + * Supports transparent blting using a color key to identify the replaceable + * bits of the destination surface for RGB colors. + *) + DDCKEYCAPS_DESTBLT = $00000001; + {$EXTERNALSYM DDCKEYCAPS_DESTBLT} + +(* + * Supports transparent blting using a color space to identify the replaceable + * bits of the destination surface for RGB colors. + *) + DDCKEYCAPS_DESTBLTCLRSPACE = $00000002; + {$EXTERNALSYM DDCKEYCAPS_DESTBLTCLRSPACE} + +(* + * Supports transparent blting using a color space to identify the replaceable + * bits of the destination surface for YUV colors. + *) + DDCKEYCAPS_DESTBLTCLRSPACEYUV = $00000004; + {$EXTERNALSYM DDCKEYCAPS_DESTBLTCLRSPACEYUV} + +(* + * Supports transparent blting using a color key to identify the replaceable + * bits of the destination surface for YUV colors. + *) + DDCKEYCAPS_DESTBLTYUV = $00000008; + {$EXTERNALSYM DDCKEYCAPS_DESTBLTYUV} + +(* + * Supports overlaying using colorkeying of the replaceable bits of the surface + * being overlayed for RGB colors. + *) + DDCKEYCAPS_DESTOVERLAY = $00000010; + {$EXTERNALSYM DDCKEYCAPS_DESTOVERLAY} + +(* + * Supports a color space as the color key for the destination for RGB colors. + *) + DDCKEYCAPS_DESTOVERLAYCLRSPACE = $00000020; + {$EXTERNALSYM DDCKEYCAPS_DESTOVERLAYCLRSPACE} + +(* + * Supports a color space as the color key for the destination for YUV colors. + *) + DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV = $00000040; + {$EXTERNALSYM DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV} + +(* + * Supports only one active destination color key value for visible overlay + * surfaces. + *) + DDCKEYCAPS_DESTOVERLAYONEACTIVE = $00000080; + {$EXTERNALSYM DDCKEYCAPS_DESTOVERLAYONEACTIVE} + +(* + * Supports overlaying using colorkeying of the replaceable bits of the + * surface being overlayed for YUV colors. + *) + DDCKEYCAPS_DESTOVERLAYYUV = $00000100; + {$EXTERNALSYM DDCKEYCAPS_DESTOVERLAYYUV} + +(* + * Supports transparent blting using the color key for the source with + * this surface for RGB colors. + *) + DDCKEYCAPS_SRCBLT = $00000200; + {$EXTERNALSYM DDCKEYCAPS_SRCBLT} + +(* + * Supports transparent blting using a color space for the source with + * this surface for RGB colors. + *) + DDCKEYCAPS_SRCBLTCLRSPACE = $00000400; + {$EXTERNALSYM DDCKEYCAPS_SRCBLTCLRSPACE} + +(* + * Supports transparent blting using a color space for the source with + * this surface for YUV colors. + *) + DDCKEYCAPS_SRCBLTCLRSPACEYUV = $00000800; + {$EXTERNALSYM DDCKEYCAPS_SRCBLTCLRSPACEYUV} + +(* + * Supports transparent blting using the color key for the source with + * this surface for YUV colors. + *) + DDCKEYCAPS_SRCBLTYUV = $00001000; + {$EXTERNALSYM DDCKEYCAPS_SRCBLTYUV} + +(* + * Supports overlays using the color key for the source with this + * overlay surface for RGB colors. + *) + DDCKEYCAPS_SRCOVERLAY = $00002000; + {$EXTERNALSYM DDCKEYCAPS_SRCOVERLAY} + +(* + * Supports overlays using a color space as the source color key for + * the overlay surface for RGB colors. + *) + DDCKEYCAPS_SRCOVERLAYCLRSPACE = $00004000; + {$EXTERNALSYM DDCKEYCAPS_SRCOVERLAYCLRSPACE} + +(* + * Supports overlays using a color space as the source color key for + * the overlay surface for YUV colors. + *) + DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV = $00008000; + {$EXTERNALSYM DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV} + +(* + * Supports only one active source color key value for visible + * overlay surfaces. + *) + DDCKEYCAPS_SRCOVERLAYONEACTIVE = $00010000; + {$EXTERNALSYM DDCKEYCAPS_SRCOVERLAYONEACTIVE} + +(* + * Supports overlays using the color key for the source with this + * overlay surface for YUV colors. + *) + DDCKEYCAPS_SRCOVERLAYYUV = $00020000; + {$EXTERNALSYM DDCKEYCAPS_SRCOVERLAYYUV} + +(* + * there are no bandwidth trade-offs for using colorkey with an overlay + *) + DDCKEYCAPS_NOCOSTOVERLAY = $00040000; + {$EXTERNALSYM DDCKEYCAPS_NOCOSTOVERLAY} + + +(**************************************************************************** + * + * DIRECTDRAW PIXELFORMAT FLAGS + * + ****************************************************************************) + +(* + * The surface has alpha channel information in the pixel format. + *) + DDPF_ALPHAPIXELS = $00000001; + {$EXTERNALSYM DDPF_ALPHAPIXELS} + +(* + * The pixel format contains alpha only information + *) + DDPF_ALPHA = $00000002; + {$EXTERNALSYM DDPF_ALPHA} + +(* + * The FourCC code is valid. + *) + DDPF_FOURCC = $00000004; + {$EXTERNALSYM DDPF_FOURCC} + +(* + * The surface is 4-bit color indexed. + *) + DDPF_PALETTEINDEXED4 = $00000008; + {$EXTERNALSYM DDPF_PALETTEINDEXED4} + +(* + * The surface is indexed into a palette which stores indices + * into the destination surface's 8-bit palette. + *) + DDPF_PALETTEINDEXEDTO8 = $00000010; + {$EXTERNALSYM DDPF_PALETTEINDEXEDTO8} + +(* + * The surface is 8-bit color indexed. + *) + DDPF_PALETTEINDEXED8 = $00000020; + {$EXTERNALSYM DDPF_PALETTEINDEXED8} + +(* + * The RGB data in the pixel format structure is valid. + *) + DDPF_RGB = $00000040; + {$EXTERNALSYM DDPF_RGB} + +(* + * The surface will accept pixel data in the format specified + * and compress it during the write. + *) + DDPF_COMPRESSED = $00000080; + {$EXTERNALSYM DDPF_COMPRESSED} + +(* + * The surface will accept RGB data and translate it during + * the write to YUV data. The format of the data to be written + * will be contained in the pixel format structure. The DDPF_RGB + * flag will be set. + *) + DDPF_RGBTOYUV = $00000100; + {$EXTERNALSYM DDPF_RGBTOYUV} + +(* + * pixel format is YUV - YUV data in pixel format struct is valid + *) + DDPF_YUV = $00000200; + {$EXTERNALSYM DDPF_YUV} + +(* + * pixel format is a z buffer only surface + *) + DDPF_ZBUFFER = $00000400; + {$EXTERNALSYM DDPF_ZBUFFER} + +(* + * The surface is 1-bit color indexed. + *) + DDPF_PALETTEINDEXED1 = $00000800; + {$EXTERNALSYM DDPF_PALETTEINDEXED1} + +(* + * The surface is 2-bit color indexed. + *) + DDPF_PALETTEINDEXED2 = $00001000; + {$EXTERNALSYM DDPF_PALETTEINDEXED2} + +(* + * The surface contains Z information in the pixels + *) + DDPF_ZPIXELS = $00002000; + {$EXTERNALSYM DDPF_ZPIXELS} + +(* + * The surface contains stencil information along with Z + *) + DDPF_STENCILBUFFER = $00004000; + {$EXTERNALSYM DDPF_STENCILBUFFER} + +(* + * Premultiplied alpha format -- the color components have been + * premultiplied by the alpha component. + *) + DDPF_ALPHAPREMULT = $00008000; + {$EXTERNALSYM DDPF_ALPHAPREMULT} + + +(* + * Luminance data in the pixel format is valid. + * Use this flag for luminance-only or luminance+alpha surfaces, + * the bit depth is then ddpf.dwLuminanceBitCount. + *) + DDPF_LUMINANCE = $00020000; + {$EXTERNALSYM DDPF_LUMINANCE} + +(* + * Luminance data in the pixel format is valid. + * Use this flag when hanging luminance off bumpmap surfaces, + * the bit mask for the luminance portion of the pixel is then + * ddpf.dwBumpLuminanceBitMask + *) + DDPF_BUMPLUMINANCE = $00040000; + {$EXTERNALSYM DDPF_BUMPLUMINANCE} + +(* + * Bump map dUdV data in the pixel format is valid. + *) + DDPF_BUMPDUDV = $00080000; + {$EXTERNALSYM DDPF_BUMPDUDV} + + +(*=========================================================================== + * + * + * DIRECTDRAW CALLBACK FLAGS + * + * + *==========================================================================*) + +(**************************************************************************** + * + * DIRECTDRAW ENUMSURFACES FLAGS + * + ****************************************************************************) + +(* + * Enumerate all of the surfaces that meet the search criterion. + *) + DDENUMSURFACES_ALL = $00000001; + {$EXTERNALSYM DDENUMSURFACES_ALL} + {$EXTERNALSYM DDENUMSURFACES_ALL} + +(* + * A search hit is a surface that matches the surface description. + *) + DDENUMSURFACES_MATCH = $00000002; + {$EXTERNALSYM DDENUMSURFACES_MATCH} + +(* + * A search hit is a surface that does not match the surface description. + *) + DDENUMSURFACES_NOMATCH = $00000004; + {$EXTERNALSYM DDENUMSURFACES_NOMATCH} + +(* + * Enumerate the first surface that can be created which meets the search criterion. + *) + DDENUMSURFACES_CANBECREATED = $00000008; + {$EXTERNALSYM DDENUMSURFACES_CANBECREATED} + +(* + * Enumerate the surfaces that already exist that meet the search criterion. + *) + DDENUMSURFACES_DOESEXIST = $00000010; + {$EXTERNALSYM DDENUMSURFACES_DOESEXIST} + + +(**************************************************************************** + * + * DIRECTDRAW SETDISPLAYMODE FLAGS + * + ****************************************************************************) + +(* + * The desired mode is a standard VGA mode + *) + DDSDM_STANDARDVGAMODE = $00000001; + {$EXTERNALSYM DDSDM_STANDARDVGAMODE} + + +(**************************************************************************** + * + * DIRECTDRAW ENUMDISPLAYMODES FLAGS + * + ****************************************************************************) + +(* + * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees + * that a particular mode will be enumerated only once. This flag specifies whether + * the refresh rate is taken into account when determining if a mode is unique. + *) + DDEDM_REFRESHRATES = $00000001; + {$EXTERNALSYM DDEDM_REFRESHRATES} + +(* + * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA + * modes such as mode 0x13 in addition to the usual ModeX modes (which are always + * enumerated if the application has previously called SetCooperativeLevel with the + * DDSCL_ALLOWMODEX flag set). + *) + DDEDM_STANDARDVGAMODES = $00000002; + {$EXTERNALSYM DDEDM_STANDARDVGAMODES} + + +(**************************************************************************** + * + * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS + * + ****************************************************************************) + +(* + * Exclusive mode owner will be responsible for the entire primary surface. + * GDI can be ignored. used with DD + *) + DDSCL_FULLSCREEN = $00000001; + {$EXTERNALSYM DDSCL_FULLSCREEN} + +(* + * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode + *) + DDSCL_ALLOWREBOOT = $00000002; + {$EXTERNALSYM DDSCL_ALLOWREBOOT} + +(* + * prevents DDRAW from modifying the application window. + * prevents DDRAW from minimize/restore the application window on activation. + *) + DDSCL_NOWINDOWCHANGES = $00000004; + {$EXTERNALSYM DDSCL_NOWINDOWCHANGES} + +(* + * app wants to work as a regular Windows application + *) + DDSCL_NORMAL = $00000008; + {$EXTERNALSYM DDSCL_NORMAL} + +(* + * app wants exclusive access + *) + DDSCL_EXCLUSIVE = $00000010; + {$EXTERNALSYM DDSCL_EXCLUSIVE} + + +(* + * app can deal with non-windows display modes + *) + DDSCL_ALLOWMODEX = $00000040; + {$EXTERNALSYM DDSCL_ALLOWMODEX} + +(* + * this window will receive the focus messages + *) + DDSCL_SETFOCUSWINDOW = $00000080; + {$EXTERNALSYM DDSCL_SETFOCUSWINDOW} + +(* + * this window is associated with the DDRAW object and will + * cover the screen in fullscreen mode + *) + DDSCL_SETDEVICEWINDOW = $00000100; + {$EXTERNALSYM DDSCL_SETDEVICEWINDOW} + +(* + * app wants DDRAW to create a window to be associated with the + * DDRAW object + *) + DDSCL_CREATEDEVICEWINDOW = $00000200; + {$EXTERNALSYM DDSCL_CREATEDEVICEWINDOW} + +(* + * App explicitly asks DDRAW/D3D to be multithread safe. This makes D3D + * take the global crtisec more frequently. + *) + DDSCL_MULTITHREADED = $00000400; + {$EXTERNALSYM DDSCL_MULTITHREADED} + +(* + * App specifies that it would like to keep the FPU set up for optimal Direct3D + * performance (single precision and exceptions disabled) so Direct3D + * does not need to explicitly set the FPU each time. This is assumed by + * default in DirectX 7. See also DDSCL_FPUPRESERVE + *) + DDSCL_FPUSETUP = $00000800; + {$EXTERNALSYM DDSCL_FPUSETUP} + +(* + * App specifies that it needs either double precision FPU or FPU exceptions + * enabled. This makes Direct3D explicitly set the FPU state eah time it is + * called. Setting the flag will reduce Direct3D performance. The flag is + * assumed by default in DirectX 6 and earlier. See also DDSCL_FPUSETUP + *) + DDSCL_FPUPRESERVE = $00001000; + {$EXTERNALSYM DDSCL_FPUPRESERVE} + + +(**************************************************************************** + * + * DIRECTDRAW BLT FLAGS + * + ****************************************************************************) + +(* + * Use the alpha information in the pixel format or the alpha channel surface + * attached to the destination surface as the alpha channel for this blt. + *) + DDBLT_ALPHADEST = $00000001; + {$EXTERNALSYM DDBLT_ALPHADEST} + +(* + * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel + * for the destination surface for this blt. + *) + DDBLT_ALPHADESTCONSTOVERRIDE = $00000002; + {$EXTERNALSYM DDBLT_ALPHADESTCONSTOVERRIDE} + +(* + * The NEG suffix indicates that the destination surface becomes more + * transparent as the alpha value increases. (0 is opaque) + *) + DDBLT_ALPHADESTNEG = $00000004; + {$EXTERNALSYM DDBLT_ALPHADESTNEG} + +(* + * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha + * channel for the destination for this blt. + *) + DDBLT_ALPHADESTSURFACEOVERRIDE = $00000008; + {$EXTERNALSYM DDBLT_ALPHADESTSURFACEOVERRIDE} + +(* + * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel + * for the edges of the image that border the color key colors. + *) + DDBLT_ALPHAEDGEBLEND = $00000010; + {$EXTERNALSYM DDBLT_ALPHAEDGEBLEND} + +(* + * Use the alpha information in the pixel format or the alpha channel surface + * attached to the source surface as the alpha channel for this blt. + *) + DDBLT_ALPHASRC = $00000020; + {$EXTERNALSYM DDBLT_ALPHASRC} + +(* + * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel + * for the source for this blt. + *) + DDBLT_ALPHASRCCONSTOVERRIDE = $00000040; + {$EXTERNALSYM DDBLT_ALPHASRCCONSTOVERRIDE} + +(* + * The NEG suffix indicates that the source surface becomes more transparent + * as the alpha value increases. (0 is opaque) + *) + DDBLT_ALPHASRCNEG = $00000080; + {$EXTERNALSYM DDBLT_ALPHASRCNEG} + +(* + * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel + * for the source for this blt. + *) + DDBLT_ALPHASRCSURFACEOVERRIDE = $00000100; + {$EXTERNALSYM DDBLT_ALPHASRCSURFACEOVERRIDE} + +(* + * Do this blt asynchronously through the FIFO in the order received. If + * there is no room in the hardware FIFO fail the call. + *) + DDBLT_ASYNC = $00000200; + {$EXTERNALSYM DDBLT_ASYNC} + +(* + * Uses the dwFillColor field in the DDBLTFX structure as the RGB color + * to fill the destination rectangle on the destination surface with. + *) + DDBLT_COLORFILL = $00000400; + {$EXTERNALSYM DDBLT_COLORFILL} + +(* + * Uses the dwDDFX field in the DDBLTFX structure to specify the effects + * to use for the blt. + *) + DDBLT_DDFX = $00000800; + {$EXTERNALSYM DDBLT_DDFX} + +(* + * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS + * that are not part of the Win32 API. + *) + DDBLT_DDROPS = $00001000; + {$EXTERNALSYM DDBLT_DDROPS} + +(* + * Use the color key associated with the destination surface. + *) + DDBLT_KEYDEST = $00002000; + {$EXTERNALSYM DDBLT_KEYDEST} + +(* + * Use the dckDestColorkey field in the DDBLTFX structure as the color key + * for the destination surface. + *) + DDBLT_KEYDESTOVERRIDE = $00004000; + {$EXTERNALSYM DDBLT_KEYDESTOVERRIDE} + +(* + * Use the color key associated with the source surface. + *) + DDBLT_KEYSRC = $00008000; + {$EXTERNALSYM DDBLT_KEYSRC} + +(* + * Use the dckSrcColorkey field in the DDBLTFX structure as the color key + * for the source surface. + *) + DDBLT_KEYSRCOVERRIDE = $00010000; + {$EXTERNALSYM DDBLT_KEYSRCOVERRIDE} + +(* + * Use the dwROP field in the DDBLTFX structure for the raster operation + * for this blt. These ROPs are the same as the ones defined in the Win32 API. + *) + DDBLT_ROP = $00020000; + {$EXTERNALSYM DDBLT_ROP} + +(* + * Use the dwRotationAngle field in the DDBLTFX structure as the angle + * (specified in 1/100th of a degree) to rotate the surface. + *) + DDBLT_ROTATIONANGLE = $00040000; + {$EXTERNALSYM DDBLT_ROTATIONANGLE} + +(* + * Z-buffered blt using the z-buffers attached to the source and destination + * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the + * z-buffer opcode. + *) + DDBLT_ZBUFFER = $00080000; + {$EXTERNALSYM DDBLT_ZBUFFER} + +(* + * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field + * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively + * for the destination. + *) + DDBLT_ZBUFFERDESTCONSTOVERRIDE = $00100000; + {$EXTERNALSYM DDBLT_ZBUFFERDESTCONSTOVERRIDE} + +(* + * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode + * field in the DDBLTFX structure as the z-buffer and z-buffer opcode + * respectively for the destination. + *) + DDBLT_ZBUFFERDESTOVERRIDE = $00200000; + {$EXTERNALSYM DDBLT_ZBUFFERDESTOVERRIDE} + +(* + * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field + * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively + * for the source. + *) + DDBLT_ZBUFFERSRCCONSTOVERRIDE = $00400000; + {$EXTERNALSYM DDBLT_ZBUFFERSRCCONSTOVERRIDE} + +(* + * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode + * field in the DDBLTFX structure as the z-buffer and z-buffer opcode + * respectively for the source. + *) + DDBLT_ZBUFFERSRCOVERRIDE = $00800000; + {$EXTERNALSYM DDBLT_ZBUFFERSRCOVERRIDE} + +(* + * wait until the device is ready to handle the blt + * this will cause blt to not return DDERR_WASSTILLDRAWING + *) + DDBLT_WAIT = $01000000; + {$EXTERNALSYM DDBLT_WAIT} + +(* + * Uses the dwFillDepth field in the DDBLTFX structure as the depth value + * to fill the destination rectangle on the destination Z-buffer surface + * with. + *) + DDBLT_DEPTHFILL = $02000000; + {$EXTERNALSYM DDBLT_DEPTHFILL} + + +(* + * Return immediately (with DDERR_WASSTILLDRAWING) if the device is not + * ready to schedule the blt at the time Blt() is called. + *) + DDBLT_DONOTWAIT = $08000000; + {$EXTERNALSYM DDBLT_DONOTWAIT} + +(* + * These flags indicate a presentation blt (i.e. a blt + * that moves surface contents from an offscreen back buffer to the primary + * surface). The driver is not allowed to "queue" more than three such blts. + * The "end" of the presentation blt is indicated, since the + * blt may be clipped, in which case the runtime will call the driver with + * several blts. All blts (even if not clipped) are tagged with DDBLT_PRESENTATION + * and the last (even if not clipped) additionally with DDBLT_LAST_PRESENTATION. + * Thus the true rule is that the driver must not schedule a DDBLT_PRESENTATION + * blt if there are 3 or more DDBLT_PRESENTLAST blts in the hardware pipe. + * If there are such blts in the pipe, the driver should return DDERR_WASSTILLDRAWING + * until the oldest queued DDBLT_LAST_PRESENTATION blts has been retired (i.e. the + * pixels have been actually written to the primary surface). Once the oldest blt + * has been retired, the driver is free to schedule the current blt. + * The goal is to provide a mechanism whereby the device's hardware queue never + * gets more than 3 frames ahead of the frames being generated by the application. + * When excessive queueing occurs, applications become unusable because the application + * visibly lags user input, and such problems make windowed interactive applications impossible. + * Some drivers may not have sufficient knowledge of their hardware's FIFO to know + * when a certain blt has been retired. Such drivers should code cautiously, and + * simply not allow any frames to be queued at all. DDBLT_LAST_PRESENTATION should cause + * such drivers to return DDERR_WASSTILLDRAWING until the accelerator is completely + * finished- exactly as if the application had called Lock on the source surface + * before calling Blt. + * In other words, the driver is allowed and encouraged to + * generate as much latency as it can, but never more than 3 frames worth. + * Implementation detail: Drivers should count blts against the SOURCE surface, not + * against the primary surface. This enables multiple parallel windowed application + * to function more optimally. + * This flag is passed only to DX8 or higher drivers. + * + * APPLICATIONS DO NOT SET THESE FLAGS. THEY ARE SET BY THE DIRECTDRAW RUNTIME. + * + *) + DDBLT_PRESENTATION = $10000000; + {$EXTERNALSYM DDBLT_PRESENTATION} + DDBLT_LAST_PRESENTATION = $20000000; + {$EXTERNALSYM DDBLT_LAST_PRESENTATION} + +(* + * If DDBLT_EXTENDED_FLAGS is set, then the driver should re-interpret + * other flags according to the definitions that follow. + * For example, bit 0 (0x00000001L) means DDBLT_ALPHADEST, unless + * DDBLT_EXTENDED_FLAGS is also set, in which case bit 0 means + * DDBLT_EXTENDED_LINEAR_CONTENT. + * Only DirectX9 and higher drivers will be given extended blt flags. + * Only flags explicitly mentioned here should be re-interpreted. + * All other flags retain their original meanings. + * + * List of re-interpreted flags: + * + * Bit Hex value New meaning old meaning + * --------------------------------------------------------------- + * 2 0x00000004 DDBLT_EXTENDED_LINEAR_CONTENT DDBLT_ALPHADESTNEG + * 4 0x00000010 DDBLT_EXTENDED_PRESENTATION_STRETCHFACTOR DDBLT_ALPHAEDGEBLEND + * + * + * NOTE: APPLICATIONS SHOULD NOT SET THIS FLAG. THIS FLAG IS INTENDED + * FOR USE BY THE DIRECT3D RUNTIME. + *) + DDBLT_EXTENDED_FLAGS = $40000000; + {$EXTERNALSYM DDBLT_EXTENDED_FLAGS} + +(* + * EXTENDED FLAG. SEE DEFINITION OF DDBLT_EXTENDED_FLAGS. + * This flag indidcates that the source surface contains content in a + * linear color space. The driver may perform gamma correction to the + * desktop color space (i.e. sRGB, gamma 2.2) as part of this blt. + * If the device can perform such a conversion as part of the copy, + * the driver should also set D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION + * + * NOTE: APPLICATIONS SHOULD NOT SET THIS FLAG. THIS FLAG IS INTENDED + * FOR USE BY THE DIRECT3D RUNTIME. Use IDirect3DSwapChain9::Present + * and specify D3DPRESENT_LINEAR_CONTENT in order to use this functionality. + *) + DDBLT_EXTENDED_LINEAR_CONTENT = $00000004; + {$EXTERNALSYM DDBLT_EXTENDED_LINEAR_CONTENT} + + +(**************************************************************************** + * + * BLTFAST FLAGS + * + ****************************************************************************) + + DDBLTFAST_NOCOLORKEY = $00000000; + {$EXTERNALSYM DDBLTFAST_NOCOLORKEY} + DDBLTFAST_SRCCOLORKEY = $00000001; + {$EXTERNALSYM DDBLTFAST_SRCCOLORKEY} + DDBLTFAST_DESTCOLORKEY = $00000002; + {$EXTERNALSYM DDBLTFAST_DESTCOLORKEY} + DDBLTFAST_WAIT = $00000010; + {$EXTERNALSYM DDBLTFAST_WAIT} + DDBLTFAST_DONOTWAIT = $00000020; + {$EXTERNALSYM DDBLTFAST_DONOTWAIT} + +(**************************************************************************** + * + * FLIP FLAGS + * + ****************************************************************************) + + DDFLIP_WAIT = $00000001; + {$EXTERNALSYM DDFLIP_WAIT} + +(* + * Indicates that the target surface contains the even field of video data. + * This flag is only valid with an overlay surface. + *) + DDFLIP_EVEN = $00000002; + {$EXTERNALSYM DDFLIP_EVEN} + +(* + * Indicates that the target surface contains the odd field of video data. + * This flag is only valid with an overlay surface. + *) + DDFLIP_ODD = $00000004; + {$EXTERNALSYM DDFLIP_ODD} + +(* + * Causes DirectDraw to perform the physical flip immediately and return + * to the application. Typically, what was the front buffer but is now the back + * buffer will still be visible (depending on timing) until the next vertical + * retrace. Subsequent operations involving the two flipped surfaces will + * not check to see if the physical flip has finished (i.e. will not return + * DDERR_WASSTILLDRAWING for that reason (but may for other reasons)). + * This allows an application to perform Flips at a higher frequency than the + * monitor refresh rate, but may introduce visible artifacts. + * Only effective if DDCAPS2_FLIPNOVSYNC is set. If that bit is not set, + * DDFLIP_NOVSYNC has no effect. + *) + DDFLIP_NOVSYNC = $00000008; + {$EXTERNALSYM DDFLIP_NOVSYNC} + + +(* + * Flip Interval Flags. These flags indicate how many vertical retraces to wait between + * each flip. The default is one. DirectDraw will return DDERR_WASSTILLDRAWING for each + * surface involved in the flip until the specified number of vertical retraces has + * ocurred. Only effective if DDCAPS2_FLIPINTERVAL is set. If that bit is not set, + * DDFLIP_INTERVALn has no effect. + *) + +(* + * DirectDraw will flip on every other vertical sync + *) + DDFLIP_INTERVAL2 = $02000000; + {$EXTERNALSYM DDFLIP_INTERVAL2} + + +(* + * DirectDraw will flip on every third vertical sync + *) + DDFLIP_INTERVAL3 = $03000000; + {$EXTERNALSYM DDFLIP_INTERVAL3} + + +(* + * DirectDraw will flip on every fourth vertical sync + *) + DDFLIP_INTERVAL4 = $04000000; + {$EXTERNALSYM DDFLIP_INTERVAL4} + +(* + * DirectDraw will flip and display a main stereo surface + *) + DDFLIP_STEREO = $00000010; + {$EXTERNALSYM DDFLIP_STEREO} + +(* + * On IDirectDrawSurface7 and higher interfaces, the default is DDFLIP_WAIT. If you wish + * to override the default and use time when the accelerator is busy (as denoted by + * the DDERR_WASSTILLDRAWING return code) then use DDFLIP_DONOTWAIT. + *) + DDFLIP_DONOTWAIT = $00000020; + {$EXTERNALSYM DDFLIP_DONOTWAIT} + + +(**************************************************************************** + * + * DIRECTDRAW SURFACE OVERLAY FLAGS + * + ****************************************************************************) + +(* + * Use the alpha information in the pixel format or the alpha channel surface + * attached to the destination surface as the alpha channel for the + * destination overlay. + *) + DDOVER_ALPHADEST = $00000001; + {$EXTERNALSYM DDOVER_ALPHADEST} + +(* + * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the + * destination alpha channel for this overlay. + *) + DDOVER_ALPHADESTCONSTOVERRIDE = $00000002; + {$EXTERNALSYM DDOVER_ALPHADESTCONSTOVERRIDE} + +(* + * The NEG suffix indicates that the destination surface becomes more + * transparent as the alpha value increases. + *) + DDOVER_ALPHADESTNEG = $00000004; + {$EXTERNALSYM DDOVER_ALPHADESTNEG} + +(* + * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha + * channel destination for this overlay. + *) + DDOVER_ALPHADESTSURFACEOVERRIDE = $00000008; + {$EXTERNALSYM DDOVER_ALPHADESTSURFACEOVERRIDE} + +(* + * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha + * channel for the edges of the image that border the color key colors. + *) + DDOVER_ALPHAEDGEBLEND = $00000010; + {$EXTERNALSYM DDOVER_ALPHAEDGEBLEND} + +(* + * Use the alpha information in the pixel format or the alpha channel surface + * attached to the source surface as the source alpha channel for this overlay. + *) + DDOVER_ALPHASRC = $00000020; + {$EXTERNALSYM DDOVER_ALPHASRC} + +(* + * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source + * alpha channel for this overlay. + *) + DDOVER_ALPHASRCCONSTOVERRIDE = $00000040; + {$EXTERNALSYM DDOVER_ALPHASRCCONSTOVERRIDE} + +(* + * The NEG suffix indicates that the source surface becomes more transparent + * as the alpha value increases. + *) + DDOVER_ALPHASRCNEG = $00000080; + {$EXTERNALSYM DDOVER_ALPHASRCNEG} + +(* + * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel + * source for this overlay. + *) + DDOVER_ALPHASRCSURFACEOVERRIDE = $00000100; + {$EXTERNALSYM DDOVER_ALPHASRCSURFACEOVERRIDE} + +(* + * Turn this overlay off. + *) + DDOVER_HIDE = $00000200; + {$EXTERNALSYM DDOVER_HIDE} + +(* + * Use the color key associated with the destination surface. + *) + DDOVER_KEYDEST = $00000400; + {$EXTERNALSYM DDOVER_KEYDEST} + +(* + * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key + * for the destination surface + *) + DDOVER_KEYDESTOVERRIDE = $00000800; + {$EXTERNALSYM DDOVER_KEYDESTOVERRIDE} + +(* + * Use the color key associated with the source surface. + *) + DDOVER_KEYSRC = $00001000; + {$EXTERNALSYM DDOVER_KEYSRC} + +(* + * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key + * for the source surface. + *) + DDOVER_KEYSRCOVERRIDE = $00002000; + {$EXTERNALSYM DDOVER_KEYSRCOVERRIDE} + +(* + * Turn this overlay on. + *) + DDOVER_SHOW = $00004000; + {$EXTERNALSYM DDOVER_SHOW} + +(* + * Add a dirty rect to an emulated overlayed surface. + *) + DDOVER_ADDDIRTYRECT = $00008000; + {$EXTERNALSYM DDOVER_ADDDIRTYRECT} + +(* + * Redraw all dirty rects on an emulated overlayed surface. + *) + DDOVER_REFRESHDIRTYRECTS = $00010000; + {$EXTERNALSYM DDOVER_REFRESHDIRTYRECTS} + +(* + * Redraw the entire surface on an emulated overlayed surface. + *) + DDOVER_REFRESHALL = $00020000; + {$EXTERNALSYM DDOVER_REFRESHALL} + + +(* + * Use the overlay FX flags to define special overlay FX + *) + DDOVER_DDFX = $00080000; + {$EXTERNALSYM DDOVER_DDFX} + +(* + * Autoflip the overlay when ever the video port autoflips + *) + DDOVER_AUTOFLIP = $00100000; + {$EXTERNALSYM DDOVER_AUTOFLIP} + +(* + * Display each field of video port data individually without + * causing any jittery artifacts + *) + DDOVER_BOB = $00200000; + {$EXTERNALSYM DDOVER_BOB} + +(* + * Indicates that bob/weave decisions should not be overridden by other + * interfaces. + *) + DDOVER_OVERRIDEBOBWEAVE = $00400000; + {$EXTERNALSYM DDOVER_OVERRIDEBOBWEAVE} + +(* + * Indicates that the surface memory is composed of interleaved fields. + *) + DDOVER_INTERLEAVED = $00800000; + {$EXTERNALSYM DDOVER_INTERLEAVED} + +(* + * Indicates that bob will be performed using hardware rather than + * software or emulated. + *) + DDOVER_BOBHARDWARE = $01000000; + {$EXTERNALSYM DDOVER_BOBHARDWARE} + +(* + * Indicates that overlay FX structure contains valid ARGB scaling factors. + *) + DDOVER_ARGBSCALEFACTORS = $02000000; + {$EXTERNALSYM DDOVER_ARGBSCALEFACTORS} + +(* + * Indicates that ARGB scaling factors can be degraded to fit driver capabilities. + *) + DDOVER_DEGRADEARGBSCALING = $04000000; + {$EXTERNALSYM DDOVER_DEGRADEARGBSCALING} + + +(**************************************************************************** + * + * DIRECTDRAWSURFACE LOCK FLAGS + * + ****************************************************************************) + +(* + * The default. Set to indicate that Lock should return a valid memory pointer + * to the top of the specified rectangle. If no rectangle is specified then a + * pointer to the top of the surface is returned. + *) + DDLOCK_SURFACEMEMORYPTR = $00000000; // = default + {$EXTERNALSYM DDLOCK_SURFACEMEMORYPTR} + +(* + * Set to indicate that Lock should wait until it can obtain a valid memory + * pointer before returning. If this bit is set, Lock will never return + * DDERR_WASSTILLDRAWING. + *) + DDLOCK_WAIT = $00000001; + {$EXTERNALSYM DDLOCK_WAIT} + +(* + * Set if an event handle is being passed to Lock. Lock will trigger the event + * when it can return the surface memory pointer requested. + *) + DDLOCK_EVENT = $00000002; + {$EXTERNALSYM DDLOCK_EVENT} + +(* + * Indicates that the surface being locked will only be read from. + *) + DDLOCK_READONLY = $00000010; + {$EXTERNALSYM DDLOCK_READONLY} + +(* + * Indicates that the surface being locked will only be written to + *) + DDLOCK_WRITEONLY = $00000020; + {$EXTERNALSYM DDLOCK_WRITEONLY} + + +(* + * Indicates that a system wide lock should not be taken when this surface + * is locked. This has several advantages (cursor responsiveness, ability + * to call more Windows functions, easier debugging) when locking video + * memory surfaces. However, an application specifying this flag must + * comply with a number of conditions documented in the help file. + * Furthermore, this flag cannot be specified when locking the primary. + *) + DDLOCK_NOSYSLOCK = $00000800; + {$EXTERNALSYM DDLOCK_NOSYSLOCK} + +(* + * Used only with Direct3D Vertex Buffer Locks. Indicates that no vertices + * that were referred to in Draw*PrimtiveVB calls since the start of the + * frame (or the last lock without this flag) will be modified during the + * lock. This can be useful when one is only appending data to the vertex + * buffer + *) + DDLOCK_NOOVERWRITE = $00001000; + {$EXTERNALSYM DDLOCK_NOOVERWRITE} + +(* + * Indicates that no assumptions will be made about the contents of the + * surface or vertex buffer during this lock. + * This enables two things: + * - Direct3D or the driver may provide an alternative memory + * area as the vertex buffer. This is useful when one plans to clear the + * contents of the vertex buffer and fill in new data. + * - Drivers sometimes store surface data in a re-ordered format. + * When the application locks the surface, the driver is forced to un-re-order + * the surface data before allowing the application to see the surface contents. + * This flag is a hint to the driver that it can skip the un-re-ordering process + * since the application plans to overwrite every single pixel in the surface + * or locked rectangle (and so erase any un-re-ordered pixels anyway). + * Applications should always set this flag when they intend to overwrite the entire + * surface or locked rectangle. + *) + DDLOCK_DISCARDCONTENTS = $00002000; + {$EXTERNALSYM DDLOCK_DISCARDCONTENTS} + (* + * DDLOCK_OKTOSWAP is an older, less informative name for DDLOCK_DISCARDCONTENTS + *) + DDLOCK_OKTOSWAP = $00002000; + {$EXTERNALSYM DDLOCK_OKTOSWAP} + +(* + * On IDirectDrawSurface7 and higher interfaces, the default is DDLOCK_WAIT. If you wish + * to override the default and use time when the accelerator is busy (as denoted by + * the DDERR_WASSTILLDRAWING return code) then use DDLOCK_DONOTWAIT. + *) + DDLOCK_DONOTWAIT = $00004000; + {$EXTERNALSYM DDLOCK_DONOTWAIT} + +(* + * This indicates volume texture lock with front and back specified. + *) + DDLOCK_HASVOLUMETEXTUREBOXRECT = $00008000; + {$EXTERNALSYM DDLOCK_HASVOLUMETEXTUREBOXRECT} + +(* + * This indicates that the driver should not update dirty rect information for this lock. + *) + DDLOCK_NODIRTYUPDATE = $00010000; + {$EXTERNALSYM DDLOCK_NODIRTYUPDATE} + + +(**************************************************************************** + * + * DIRECTDRAWSURFACE PAGELOCK FLAGS + * + ****************************************************************************) + +(* + * No flags defined at present + *) + + +(**************************************************************************** + * + * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS + * + ****************************************************************************) + +(* + * No flags defined at present + *) + + +(**************************************************************************** + * + * DIRECTDRAWSURFACE BLT FX FLAGS + * + ****************************************************************************) + +(* + * If stretching, use arithmetic stretching along the Y axis for this blt. + *) + DDBLTFX_ARITHSTRETCHY = $00000001; + {$EXTERNALSYM DDBLTFX_ARITHSTRETCHY} + +(* + * Do this blt mirroring the surface left to right. Spin the + * surface around its y-axis. + *) + DDBLTFX_MIRRORLEFTRIGHT = $00000002; + {$EXTERNALSYM DDBLTFX_MIRRORLEFTRIGHT} + +(* + * Do this blt mirroring the surface up and down. Spin the surface + * around its x-axis. + *) + DDBLTFX_MIRRORUPDOWN = $00000004; + {$EXTERNALSYM DDBLTFX_MIRRORUPDOWN} + +(* + * Schedule this blt to avoid tearing. + *) + DDBLTFX_NOTEARING = $00000008; + {$EXTERNALSYM DDBLTFX_NOTEARING} + +(* + * Do this blt rotating the surface one hundred and eighty degrees. + *) + DDBLTFX_ROTATE180 = $00000010; + {$EXTERNALSYM DDBLTFX_ROTATE180} + +(* + * Do this blt rotating the surface two hundred and seventy degrees. + *) + DDBLTFX_ROTATE270 = $00000020; + {$EXTERNALSYM DDBLTFX_ROTATE270} + +(* + * Do this blt rotating the surface ninety degrees. + *) + DDBLTFX_ROTATE90 = $00000040; + {$EXTERNALSYM DDBLTFX_ROTATE90} + +(* + * Do this z blt using dwZBufferLow and dwZBufferHigh as range values + * specified to limit the bits copied from the source surface. + *) + DDBLTFX_ZBUFFERRANGE = $00000080; + {$EXTERNALSYM DDBLTFX_ZBUFFERRANGE} + +(* + * Do this z blt adding the dwZBufferBaseDest to each of the sources z values + * before comparing it with the desting z values. + *) + DDBLTFX_ZBUFFERBASEDEST = $00000100; + {$EXTERNALSYM DDBLTFX_ZBUFFERBASEDEST} + +(**************************************************************************** + * + * DIRECTDRAWSURFACE OVERLAY FX FLAGS + * + ****************************************************************************) + +(* + * If stretching, use arithmetic stretching along the Y axis for this overlay. + *) + DDOVERFX_ARITHSTRETCHY = $00000001; + {$EXTERNALSYM DDOVERFX_ARITHSTRETCHY} + +(* + * Mirror the overlay across the vertical axis + *) + DDOVERFX_MIRRORLEFTRIGHT = $00000002; + {$EXTERNALSYM DDOVERFX_MIRRORLEFTRIGHT} + +(* + * Mirror the overlay across the horizontal axis + *) + DDOVERFX_MIRRORUPDOWN = $00000004; + {$EXTERNALSYM DDOVERFX_MIRRORUPDOWN} + +(* + * Deinterlace the overlay, if possible + *) + DDOVERFX_DEINTERLACE = $00000008; + {$EXTERNALSYM DDOVERFX_DEINTERLACE} + + +(**************************************************************************** + * + * DIRECTDRAW WAITFORVERTICALBLANK FLAGS + * + ****************************************************************************) + +(* + * return when the vertical blank interval begins + *) + DDWAITVB_BLOCKBEGIN = $00000001; + {$EXTERNALSYM DDWAITVB_BLOCKBEGIN} + +(* + * set up an event to trigger when the vertical blank begins + *) + DDWAITVB_BLOCKBEGINEVENT = $00000002; + {$EXTERNALSYM DDWAITVB_BLOCKBEGINEVENT} + +(* + * return when the vertical blank interval ends and display begins + *) + DDWAITVB_BLOCKEND = $00000004; + {$EXTERNALSYM DDWAITVB_BLOCKEND} + +(**************************************************************************** + * + * DIRECTDRAW GETFLIPSTATUS FLAGS + * + ****************************************************************************) + +(* + * is it OK to flip now? + *) + DDGFS_CANFLIP = $00000001; + {$EXTERNALSYM DDGFS_CANFLIP} + +(* + * is the last flip finished? + *) + DDGFS_ISFLIPDONE = $00000002; + {$EXTERNALSYM DDGFS_ISFLIPDONE} + +(**************************************************************************** + * + * DIRECTDRAW GETBLTSTATUS FLAGS + * + ****************************************************************************) + +(* + * is it OK to blt now? + *) + DDGBS_CANBLT = $00000001; + {$EXTERNALSYM DDGBS_CANBLT} + +(* + * is the blt to the surface finished? + *) + DDGBS_ISBLTDONE = $00000002; + {$EXTERNALSYM DDGBS_ISBLTDONE} + + +(**************************************************************************** + * + * DIRECTDRAW ENUMOVERLAYZORDER FLAGS + * + ****************************************************************************) + +(* + * Enumerate overlays back to front. + *) + DDENUMOVERLAYZ_BACKTOFRONT = $00000000; + {$EXTERNALSYM DDENUMOVERLAYZ_BACKTOFRONT} + +(* + * Enumerate overlays front to back + *) + DDENUMOVERLAYZ_FRONTTOBACK = $00000001; + {$EXTERNALSYM DDENUMOVERLAYZ_FRONTTOBACK} + +(**************************************************************************** + * + * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS + * + ****************************************************************************) + +(* + * Send overlay to front + *) + DDOVERZ_SENDTOFRONT = $00000000; + {$EXTERNALSYM DDOVERZ_SENDTOFRONT} + +(* + * Send overlay to back + *) + DDOVERZ_SENDTOBACK = $00000001; + {$EXTERNALSYM DDOVERZ_SENDTOBACK} + +(* + * Move Overlay forward + *) + DDOVERZ_MOVEFORWARD = $00000002; + {$EXTERNALSYM DDOVERZ_MOVEFORWARD} + +(* + * Move Overlay backward + *) + DDOVERZ_MOVEBACKWARD = $00000003; + {$EXTERNALSYM DDOVERZ_MOVEBACKWARD} + +(* + * Move Overlay in front of relative surface + *) + DDOVERZ_INSERTINFRONTOF = $00000004; + {$EXTERNALSYM DDOVERZ_INSERTINFRONTOF} + +(* + * Move Overlay in back of relative surface + *) + DDOVERZ_INSERTINBACKOF = $00000005; + {$EXTERNALSYM DDOVERZ_INSERTINBACKOF} + + +(**************************************************************************** + * + * DIRECTDRAW SETGAMMARAMP FLAGS + * + ****************************************************************************) + +(* + * Request calibrator to adjust the gamma ramp according to the physical + * properties of the display so that the result should appear identical + * on all systems. + *) + DDSGR_CALIBRATE = $00000001; + {$EXTERNALSYM DDSGR_CALIBRATE} + + +(**************************************************************************** + * + * DIRECTDRAW STARTMODETEST FLAGS + * + ****************************************************************************) + +(* + * Indicates that the mode being tested has passed + *) + DDSMT_ISTESTREQUIRED = $00000001; + {$EXTERNALSYM DDSMT_ISTESTREQUIRED} + + +(**************************************************************************** + * + * DIRECTDRAW EVALUATEMODE FLAGS + * + ****************************************************************************) + +(* + * Indicates that the mode being tested has passed + *) + DDEM_MODEPASSED = $00000001; + {$EXTERNALSYM DDEM_MODEPASSED} + +(* + * Indicates that the mode being tested has failed + *) + DDEM_MODEFAILED = $00000002; + {$EXTERNALSYM DDEM_MODEFAILED} + + +(*=========================================================================== + * + * + * DIRECTDRAW RETURN CODES + * + * The return values from DirectDraw Commands and Surface that return an HRESULT + * are codes from DirectDraw concerning the results of the action + * requested by DirectDraw. + * + *==========================================================================*) + +(* + * Status is OK + * + * Issued by: DirectDraw Commands and all callbacks + *) + DD_OK = 0; + {$EXTERNALSYM DD_OK} + DD_FALSE = S_FALSE; + {$EXTERNALSYM DD_FALSE} + +(**************************************************************************** + * + * DIRECTDRAW ENUMCALLBACK RETURN VALUES + * + * EnumCallback returns are used to control the flow of the DIRECTDRAW and + * DIRECTDRAWSURFACE object enumerations. They can only be returned by + * enumeration callback routines. + * + ****************************************************************************) + +(* + * stop the enumeration + *) + DDENUMRET_CANCEL = 0; + {$EXTERNALSYM DDENUMRET_CANCEL} + +(* + * continue the enumeration + *) + DDENUMRET_OK = 1; + {$EXTERNALSYM DDENUMRET_OK} + +(**************************************************************************** + * + * DIRECTDRAW ERRORS + * + * Errors are represented by negative values and cannot be combined. + * + ****************************************************************************) + +const + _FACDD = $876; + {$EXTERNALSYM _FACDD} + _MAKE_DDHRESULT = HResult(1 shl 31) or HResult(_FACDD shl 16); + +//#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) +function MAKE_DDHRESULT(Code: DWORD): HResult; +{$EXTERNALSYM MAKE_DDHRESULT} + +const +(* + * This object is already initialized + *) + DDERR_ALREADYINITIALIZED = HResult(_MAKE_DDHRESULT + 5); + {$EXTERNALSYM DDERR_ALREADYINITIALIZED} + +(* + * This surface can not be attached to the requested surface. + *) + DDERR_CANNOTATTACHSURFACE = HResult(_MAKE_DDHRESULT + 10); + {$EXTERNALSYM DDERR_CANNOTATTACHSURFACE} + +(* + * This surface can not be detached from the requested surface. + *) + DDERR_CANNOTDETACHSURFACE = HResult(_MAKE_DDHRESULT + 20); + {$EXTERNALSYM DDERR_CANNOTDETACHSURFACE} + +(* + * Support is currently not available. + *) + DDERR_CURRENTLYNOTAVAIL = HResult(_MAKE_DDHRESULT + 40); + {$EXTERNALSYM DDERR_CURRENTLYNOTAVAIL} + +(* + * An exception was encountered while performing the requested operation + *) + DDERR_EXCEPTION = HResult(_MAKE_DDHRESULT + 55); + {$EXTERNALSYM DDERR_EXCEPTION} + +(* + * Generic failure. + *) + DDERR_GENERIC = E_FAIL; + {$EXTERNALSYM DDERR_GENERIC} + +(* + * Height of rectangle provided is not a multiple of reqd alignment + *) + DDERR_HEIGHTALIGN = HResult(_MAKE_DDHRESULT + 90); + {$EXTERNALSYM DDERR_HEIGHTALIGN} + +(* + * Unable to match primary surface creation request with existing + * primary surface. + *) + DDERR_INCOMPATIBLEPRIMARY = HResult(_MAKE_DDHRESULT + 95); + {$EXTERNALSYM DDERR_INCOMPATIBLEPRIMARY} + +(* + * One or more of the caps bits passed to the callback are incorrect. + *) + DDERR_INVALIDCAPS = HResult(_MAKE_DDHRESULT + 100); + {$EXTERNALSYM DDERR_INVALIDCAPS} + +(* + * DirectDraw does not support provided Cliplist. + *) + DDERR_INVALIDCLIPLIST = HResult(_MAKE_DDHRESULT + 110); + {$EXTERNALSYM DDERR_INVALIDCLIPLIST} + +(* + * DirectDraw does not support the requested mode + *) + DDERR_INVALIDMODE = HResult(_MAKE_DDHRESULT + 120); + {$EXTERNALSYM DDERR_INVALIDMODE} + +(* + * DirectDraw received a pointer that was an invalid DIRECTDRAW object. + *) + DDERR_INVALIDOBJECT = HResult(_MAKE_DDHRESULT + 130); + {$EXTERNALSYM DDERR_INVALIDOBJECT} + +(* + * One or more of the parameters passed to the callback function are + * incorrect. + *) + DDERR_INVALIDPARAMS = E_INVALIDARG; + {$EXTERNALSYM DDERR_INVALIDPARAMS} + +(* + * pixel format was invalid as specified + *) + DDERR_INVALIDPIXELFORMAT = HResult(_MAKE_DDHRESULT + 145); + {$EXTERNALSYM DDERR_INVALIDPIXELFORMAT} + +(* + * Rectangle provided was invalid. + *) + DDERR_INVALIDRECT = HResult(_MAKE_DDHRESULT + 150); + {$EXTERNALSYM DDERR_INVALIDRECT} + +(* + * Operation could not be carried out because one or more surfaces are locked + *) + DDERR_LOCKEDSURFACES = HResult(_MAKE_DDHRESULT + 160); + {$EXTERNALSYM DDERR_LOCKEDSURFACES} + +(* + * There is no 3D present. + *) + DDERR_NO3D = HResult(_MAKE_DDHRESULT + 170); + {$EXTERNALSYM DDERR_NO3D} + +(* + * Operation could not be carried out because there is no alpha accleration + * hardware present or available. + *) + DDERR_NOALPHAHW = HResult(_MAKE_DDHRESULT + 180); + {$EXTERNALSYM DDERR_NOALPHAHW} + +(* + * Operation could not be carried out because there is no stereo + * hardware present or available. + *) + DDERR_NOSTEREOHARDWARE = HResult(_MAKE_DDHRESULT + 181); + {$EXTERNALSYM DDERR_NOSTEREOHARDWARE} + +(* + * Operation could not be carried out because there is no hardware + * present which supports stereo surfaces + *) + DDERR_NOSURFACELEFT = HResult(_MAKE_DDHRESULT + 182); + {$EXTERNALSYM DDERR_NOSURFACELEFT} + + + +(* + * no clip list available + *) + DDERR_NOCLIPLIST = HResult(_MAKE_DDHRESULT + 205); + {$EXTERNALSYM DDERR_NOCLIPLIST} + +(* + * Operation could not be carried out because there is no color conversion + * hardware present or available. + *) + DDERR_NOCOLORCONVHW = HResult(_MAKE_DDHRESULT + 210); + {$EXTERNALSYM DDERR_NOCOLORCONVHW} + +(* + * Create function called without DirectDraw object method SetCooperativeLevel + * being called. + *) + DDERR_NOCOOPERATIVELEVELSET = HResult(_MAKE_DDHRESULT + 212); + {$EXTERNALSYM DDERR_NOCOOPERATIVELEVELSET} + +(* + * Surface doesn't currently have a color key + *) + DDERR_NOCOLORKEY = HResult(_MAKE_DDHRESULT + 215); + {$EXTERNALSYM DDERR_NOCOLORKEY} + +(* + * Operation could not be carried out because there is no hardware support + * of the dest color key. + *) + DDERR_NOCOLORKEYHW = HResult(_MAKE_DDHRESULT + 220); + {$EXTERNALSYM DDERR_NOCOLORKEYHW} + +(* + * No DirectDraw support possible with current display driver + *) + DDERR_NODIRECTDRAWSUPPORT = HResult(_MAKE_DDHRESULT + 222); + {$EXTERNALSYM DDERR_NODIRECTDRAWSUPPORT} + +(* + * Operation requires the application to have exclusive mode but the + * application does not have exclusive mode. + *) + DDERR_NOEXCLUSIVEMODE = HResult(_MAKE_DDHRESULT + 225); + {$EXTERNALSYM DDERR_NOEXCLUSIVEMODE} + +(* + * Flipping visible surfaces is not supported. + *) + DDERR_NOFLIPHW = HResult(_MAKE_DDHRESULT + 230); + {$EXTERNALSYM DDERR_NOFLIPHW} + +(* + * There is no GDI present. + *) + DDERR_NOGDI = HResult(_MAKE_DDHRESULT + 240); + {$EXTERNALSYM DDERR_NOGDI} + +(* + * Operation could not be carried out because there is no hardware present + * or available. + *) + DDERR_NOMIRRORHW = HResult(_MAKE_DDHRESULT + 250); + {$EXTERNALSYM DDERR_NOMIRRORHW} + +(* + * Requested item was not found + *) + DDERR_NOTFOUND = HResult(_MAKE_DDHRESULT + 255); + {$EXTERNALSYM DDERR_NOTFOUND} + +(* + * Operation could not be carried out because there is no overlay hardware + * present or available. + *) + DDERR_NOOVERLAYHW = HResult(_MAKE_DDHRESULT + 260); + {$EXTERNALSYM DDERR_NOOVERLAYHW} + +(* + * Operation could not be carried out because the source and destination + * rectangles are on the same surface and overlap each other. + *) + DDERR_OVERLAPPINGRECTS = HResult(_MAKE_DDHRESULT + 270); + {$EXTERNALSYM DDERR_OVERLAPPINGRECTS} + +(* + * Operation could not be carried out because there is no appropriate raster + * op hardware present or available. + *) + DDERR_NORASTEROPHW = HResult(_MAKE_DDHRESULT + 280); + {$EXTERNALSYM DDERR_NORASTEROPHW} + +(* + * Operation could not be carried out because there is no rotation hardware + * present or available. + *) + DDERR_NOROTATIONHW = HResult(_MAKE_DDHRESULT + 290); + {$EXTERNALSYM DDERR_NOROTATIONHW} + +(* + * Operation could not be carried out because there is no hardware support + * for stretching + *) + DDERR_NOSTRETCHHW = HResult(_MAKE_DDHRESULT + 310); + {$EXTERNALSYM DDERR_NOSTRETCHHW} + +(* + * DirectDrawSurface is not in 4 bit color palette and the requested operation + * requires 4 bit color palette. + *) + DDERR_NOT4BITCOLOR = HResult(_MAKE_DDHRESULT + 316); + {$EXTERNALSYM DDERR_NOT4BITCOLOR} + +(* + * DirectDrawSurface is not in 4 bit color index palette and the requested + * operation requires 4 bit color index palette. + *) + DDERR_NOT4BITCOLORINDEX = HResult(_MAKE_DDHRESULT + 317); + {$EXTERNALSYM DDERR_NOT4BITCOLORINDEX} + +(* + * DirectDraw Surface is not in 8 bit color mode and the requested operation + * requires 8 bit color. + *) + DDERR_NOT8BITCOLOR = HResult(_MAKE_DDHRESULT + 320); + {$EXTERNALSYM DDERR_NOT8BITCOLOR} + +(* + * Operation could not be carried out because there is no texture mapping + * hardware present or available. + *) + DDERR_NOTEXTUREHW = HResult(_MAKE_DDHRESULT + 330); + {$EXTERNALSYM DDERR_NOTEXTUREHW} + +(* + * Operation could not be carried out because there is no hardware support + * for vertical blank synchronized operations. + *) + DDERR_NOVSYNCHW = HResult(_MAKE_DDHRESULT + 335); + {$EXTERNALSYM DDERR_NOVSYNCHW} + +(* + * Operation could not be carried out because there is no hardware support + * for zbuffer blting. + *) + DDERR_NOZBUFFERHW = HResult(_MAKE_DDHRESULT + 340); + {$EXTERNALSYM DDERR_NOZBUFFERHW} + +(* + * Overlay surfaces could not be z layered based on their BltOrder because + * the hardware does not support z layering of overlays. + *) + DDERR_NOZOVERLAYHW = HResult(_MAKE_DDHRESULT + 350); + {$EXTERNALSYM DDERR_NOZOVERLAYHW} + +(* + * The hardware needed for the requested operation has already been + * allocated. + *) + DDERR_OUTOFCAPS = HResult(_MAKE_DDHRESULT + 360); + {$EXTERNALSYM DDERR_OUTOFCAPS} + +(* + * DirectDraw does not have enough memory to perform the operation. + *) + DDERR_OUTOFMEMORY = E_OUTOFMEMORY; + {$EXTERNALSYM DDERR_OUTOFMEMORY} + +(* + * DirectDraw does not have enough memory to perform the operation. + *) + DDERR_OUTOFVIDEOMEMORY = HResult(_MAKE_DDHRESULT + 380); + {$EXTERNALSYM DDERR_OUTOFVIDEOMEMORY} + +(* + * hardware does not support clipped overlays + *) + DDERR_OVERLAYCANTCLIP = HResult(_MAKE_DDHRESULT + 382); + {$EXTERNALSYM DDERR_OVERLAYCANTCLIP} + +(* + * Can only have ony color key active at one time for overlays + *) + DDERR_OVERLAYCOLORKEYONLYONEACTIVE = HResult(_MAKE_DDHRESULT + 384); + {$EXTERNALSYM DDERR_OVERLAYCOLORKEYONLYONEACTIVE} + +(* + * Access to this palette is being refused because the palette is already + * locked by another thread. + *) + DDERR_PALETTEBUSY = HResult(_MAKE_DDHRESULT + 387); + {$EXTERNALSYM DDERR_PALETTEBUSY} + +(* + * No src color key specified for this operation. + *) + DDERR_COLORKEYNOTSET = HResult(_MAKE_DDHRESULT + 400); + {$EXTERNALSYM DDERR_COLORKEYNOTSET} + +(* + * This surface is already attached to the surface it is being attached to. + *) + DDERR_SURFACEALREADYATTACHED = HResult(_MAKE_DDHRESULT + 410); + {$EXTERNALSYM DDERR_SURFACEALREADYATTACHED} + +(* + * This surface is already a dependency of the surface it is being made a + * dependency of. + *) + DDERR_SURFACEALREADYDEPENDENT = HResult(_MAKE_DDHRESULT + 420); + {$EXTERNALSYM DDERR_SURFACEALREADYDEPENDENT} + +(* + * Access to this surface is being refused because the surface is already + * locked by another thread. + *) + DDERR_SURFACEBUSY = HResult(_MAKE_DDHRESULT + 430); + {$EXTERNALSYM DDERR_SURFACEBUSY} + +(* + * Access to this surface is being refused because no driver exists + * which can supply a pointer to the surface. + * This is most likely to happen when attempting to lock the primary + * surface when no DCI provider is present. + * Will also happen on attempts to lock an optimized surface. + *) + DDERR_CANTLOCKSURFACE = HResult(_MAKE_DDHRESULT + 435); + {$EXTERNALSYM DDERR_CANTLOCKSURFACE} + +(* + * Access to Surface refused because Surface is obscured. + *) + DDERR_SURFACEISOBSCURED = HResult(_MAKE_DDHRESULT + 440); + {$EXTERNALSYM DDERR_SURFACEISOBSCURED} + +(* + * Access to this surface is being refused because the surface is gone. + * The DIRECTDRAWSURFACE object representing this surface should + * have Restore called on it. + *) + DDERR_SURFACELOST = HResult(_MAKE_DDHRESULT + 450); + {$EXTERNALSYM DDERR_SURFACELOST} + +(* + * The requested surface is not attached. + *) + DDERR_SURFACENOTATTACHED = HResult(_MAKE_DDHRESULT + 460); + {$EXTERNALSYM DDERR_SURFACENOTATTACHED} + +(* + * Height requested by DirectDraw is too large. + *) + DDERR_TOOBIGHEIGHT = HResult(_MAKE_DDHRESULT + 470); + {$EXTERNALSYM DDERR_TOOBIGHEIGHT} + +(* + * Size requested by DirectDraw is too large -- The individual height and + * width are OK. + *) + DDERR_TOOBIGSIZE = HResult(_MAKE_DDHRESULT + 480); + {$EXTERNALSYM DDERR_TOOBIGSIZE} + +(* + * Width requested by DirectDraw is too large. + *) + DDERR_TOOBIGWIDTH = HResult(_MAKE_DDHRESULT + 490); + {$EXTERNALSYM DDERR_TOOBIGWIDTH} + +(* + * Action not supported. + *) + DDERR_UNSUPPORTED = E_NOTIMPL; + {$EXTERNALSYM DDERR_UNSUPPORTED} + +(* + * FOURCC format requested is unsupported by DirectDraw + *) + DDERR_UNSUPPORTEDFORMAT = HResult(_MAKE_DDHRESULT + 510); + {$EXTERNALSYM DDERR_UNSUPPORTEDFORMAT} + +(* + * Bitmask in the pixel format requested is unsupported by DirectDraw + *) + DDERR_UNSUPPORTEDMASK = HResult(_MAKE_DDHRESULT + 520); + {$EXTERNALSYM DDERR_UNSUPPORTEDMASK} + +(* + * The specified stream contains invalid data + *) + DDERR_INVALIDSTREAM = HResult(_MAKE_DDHRESULT + 521); + {$EXTERNALSYM DDERR_INVALIDSTREAM} + +(* + * vertical blank is in progress + *) + DDERR_VERTICALBLANKINPROGRESS = HResult(_MAKE_DDHRESULT + 537); + {$EXTERNALSYM DDERR_VERTICALBLANKINPROGRESS} + +(* + * Informs DirectDraw that the previous Blt which is transfering information + * to or from this Surface is incomplete. + *) + DDERR_WASSTILLDRAWING = HResult(_MAKE_DDHRESULT + 540); + {$EXTERNALSYM DDERR_WASSTILLDRAWING} + + +(* + * The specified surface type requires specification of the COMPLEX flag + *) + DDERR_DDSCAPSCOMPLEXREQUIRED = HResult(_MAKE_DDHRESULT + 542); + {$EXTERNALSYM DDERR_DDSCAPSCOMPLEXREQUIRED} + + +(* + * Rectangle provided was not horizontally aligned on reqd. boundary + *) + DDERR_XALIGN = HResult(_MAKE_DDHRESULT + 560); + {$EXTERNALSYM DDERR_XALIGN} + +(* + * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver + * identifier. + *) + DDERR_INVALIDDIRECTDRAWGUID = HResult(_MAKE_DDHRESULT + 561); + {$EXTERNALSYM DDERR_INVALIDDIRECTDRAWGUID} + +(* + * A DirectDraw object representing this driver has already been created + * for this process. + *) + DDERR_DIRECTDRAWALREADYCREATED = HResult(_MAKE_DDHRESULT + 562); + {$EXTERNALSYM DDERR_DIRECTDRAWALREADYCREATED} + +(* + * A hardware only DirectDraw object creation was attempted but the driver + * did not support any hardware. + *) + DDERR_NODIRECTDRAWHW = HResult(_MAKE_DDHRESULT + 563); + {$EXTERNALSYM DDERR_NODIRECTDRAWHW} + +(* + * this process already has created a primary surface + *) + DDERR_PRIMARYSURFACEALREADYEXISTS = HResult(_MAKE_DDHRESULT + 564); + {$EXTERNALSYM DDERR_PRIMARYSURFACEALREADYEXISTS} + +(* + * software emulation not available. + *) + DDERR_NOEMULATION = HResult(_MAKE_DDHRESULT + 565); + {$EXTERNALSYM DDERR_NOEMULATION} + +(* + * region passed to Clipper::GetClipList is too small. + *) + DDERR_REGIONTOOSMALL = HResult(_MAKE_DDHRESULT + 566); + {$EXTERNALSYM DDERR_REGIONTOOSMALL} + +(* + * an attempt was made to set a clip list for a clipper objec that + * is already monitoring an hwnd. + *) + DDERR_CLIPPERISUSINGHWND = HResult(_MAKE_DDHRESULT + 567); + {$EXTERNALSYM DDERR_CLIPPERISUSINGHWND} + +(* + * No clipper object attached to surface object + *) + DDERR_NOCLIPPERATTACHED = HResult(_MAKE_DDHRESULT + 568); + {$EXTERNALSYM DDERR_NOCLIPPERATTACHED} + +(* + * Clipper notification requires an HWND or + * no HWND has previously been set as the CooperativeLevel HWND. + *) + DDERR_NOHWND = HResult(_MAKE_DDHRESULT + 569); + {$EXTERNALSYM DDERR_NOHWND} + +(* + * HWND used by DirectDraw CooperativeLevel has been subclassed, + * this prevents DirectDraw from restoring state. + *) + DDERR_HWNDSUBCLASSED = HResult(_MAKE_DDHRESULT + 570); + {$EXTERNALSYM DDERR_HWNDSUBCLASSED} + +(* + * The CooperativeLevel HWND has already been set. + * It can not be reset while the process has surfaces or palettes created. + *) + DDERR_HWNDALREADYSET = HResult(_MAKE_DDHRESULT + 571); + {$EXTERNALSYM DDERR_HWNDALREADYSET} + +(* + * No palette object attached to this surface. + *) + DDERR_NOPALETTEATTACHED = HResult(_MAKE_DDHRESULT + 572); + {$EXTERNALSYM DDERR_NOPALETTEATTACHED} + +(* + * No hardware support for 16 or 256 color palettes. + *) + DDERR_NOPALETTEHW = HResult(_MAKE_DDHRESULT + 573); + {$EXTERNALSYM DDERR_NOPALETTEHW} + +(* + * If a clipper object is attached to the source surface passed into a + * BltFast call. + *) + DDERR_BLTFASTCANTCLIP = HResult(_MAKE_DDHRESULT + 574); + {$EXTERNALSYM DDERR_BLTFASTCANTCLIP} + +(* + * No blter. + *) + DDERR_NOBLTHW = HResult(_MAKE_DDHRESULT + 575); + {$EXTERNALSYM DDERR_NOBLTHW} + +(* + * No DirectDraw ROP hardware. + *) + DDERR_NODDROPSHW = HResult(_MAKE_DDHRESULT + 576); + {$EXTERNALSYM DDERR_NODDROPSHW} + +(* + * returned when GetOverlayPosition is called on a hidden overlay + *) + DDERR_OVERLAYNOTVISIBLE = HResult(_MAKE_DDHRESULT + 577); + {$EXTERNALSYM DDERR_OVERLAYNOTVISIBLE} + +(* + * returned when GetOverlayPosition is called on a overlay that UpdateOverlay + * has never been called on to establish a destionation. + *) + DDERR_NOOVERLAYDEST = HResult(_MAKE_DDHRESULT + 578); + {$EXTERNALSYM DDERR_NOOVERLAYDEST} + +(* + * returned when the position of the overlay on the destionation is no longer + * legal for that destionation. + *) + DDERR_INVALIDPOSITION = HResult(_MAKE_DDHRESULT + 579); + {$EXTERNALSYM DDERR_INVALIDPOSITION} + +(* + * returned when an overlay member is called for a non-overlay surface + *) + DDERR_NOTAOVERLAYSURFACE = HResult(_MAKE_DDHRESULT + 580); + {$EXTERNALSYM DDERR_NOTAOVERLAYSURFACE} + +(* + * An attempt was made to set the cooperative level when it was already + * set to exclusive. + *) + DDERR_EXCLUSIVEMODEALREADYSET = HResult(_MAKE_DDHRESULT + 581); + {$EXTERNALSYM DDERR_EXCLUSIVEMODEALREADYSET} + +(* + * An attempt has been made to flip a surface that is not flippable. + *) + DDERR_NOTFLIPPABLE = HResult(_MAKE_DDHRESULT + 582); + {$EXTERNALSYM DDERR_NOTFLIPPABLE} + +(* + * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly + * created. + *) + DDERR_CANTDUPLICATE = HResult(_MAKE_DDHRESULT + 583); + {$EXTERNALSYM DDERR_CANTDUPLICATE} + +(* + * Surface was not locked. An attempt to unlock a surface that was not + * locked at all, or by this process, has been attempted. + *) + DDERR_NOTLOCKED = HResult(_MAKE_DDHRESULT + 584); + {$EXTERNALSYM DDERR_NOTLOCKED} + +(* + * Windows can not create any more DCs, or a DC was requested for a paltte-indexed + * surface when the surface had no palette AND the display mode was not palette-indexed + * (in this case DirectDraw cannot select a proper palette into the DC) + *) + DDERR_CANTCREATEDC = HResult(_MAKE_DDHRESULT + 585); + {$EXTERNALSYM DDERR_CANTCREATEDC} + +(* + * No DC was ever created for this surface. + *) + DDERR_NODC = HResult(_MAKE_DDHRESULT + 586); + {$EXTERNALSYM DDERR_NODC} + +(* + * This surface can not be restored because it was created in a different + * mode. + *) + DDERR_WRONGMODE = HResult(_MAKE_DDHRESULT + 587); + {$EXTERNALSYM DDERR_WRONGMODE} + +(* + * This surface can not be restored because it is an implicitly created + * surface. + *) + DDERR_IMPLICITLYCREATED = HResult(_MAKE_DDHRESULT + 588); + {$EXTERNALSYM DDERR_IMPLICITLYCREATED} + +(* + * The surface being used is not a palette-based surface + *) + DDERR_NOTPALETTIZED = HResult(_MAKE_DDHRESULT + 589); + {$EXTERNALSYM DDERR_NOTPALETTIZED} + + +(* + * The display is currently in an unsupported mode + *) + DDERR_UNSUPPORTEDMODE = HResult(_MAKE_DDHRESULT + 590); + {$EXTERNALSYM DDERR_UNSUPPORTEDMODE} + +(* + * Operation could not be carried out because there is no mip-map + * texture mapping hardware present or available. + *) + DDERR_NOMIPMAPHW = HResult(_MAKE_DDHRESULT + 591); + {$EXTERNALSYM DDERR_NOMIPMAPHW} + +(* + * The requested action could not be performed because the surface was of + * the wrong type. + *) + DDERR_INVALIDSURFACETYPE = HResult(_MAKE_DDHRESULT + 592); + {$EXTERNALSYM DDERR_INVALIDSURFACETYPE} + + +(* + * Device does not support optimized surfaces, therefore no video memory optimized surfaces + *) + DDERR_NOOPTIMIZEHW = HResult(_MAKE_DDHRESULT + 600); + {$EXTERNALSYM DDERR_NOOPTIMIZEHW} + +(* + * Surface is an optimized surface, but has not yet been allocated any memory + *) + DDERR_NOTLOADED = HResult(_MAKE_DDHRESULT + 601); + {$EXTERNALSYM DDERR_NOTLOADED} + +(* + * Attempt was made to create or set a device window without first setting + * the focus window + *) + DDERR_NOFOCUSWINDOW = HResult(_MAKE_DDHRESULT + 602); + {$EXTERNALSYM DDERR_NOFOCUSWINDOW} + +(* + * Attempt was made to set a palette on a mipmap sublevel + *) + DDERR_NOTONMIPMAPSUBLEVEL = HResult(_MAKE_DDHRESULT + 603); + {$EXTERNALSYM DDERR_NOTONMIPMAPSUBLEVEL} + +(* + * A DC has already been returned for this surface. Only one DC can be + * retrieved per surface. + *) + DDERR_DCALREADYCREATED = HResult(_MAKE_DDHRESULT + 620); + {$EXTERNALSYM DDERR_DCALREADYCREATED} + +(* + * An attempt was made to allocate non-local video memory from a device + * that does not support non-local video memory. + *) + DDERR_NONONLOCALVIDMEM = HResult(_MAKE_DDHRESULT + 630); + {$EXTERNALSYM DDERR_NONONLOCALVIDMEM} + +(* + * The attempt to page lock a surface failed. + *) + DDERR_CANTPAGELOCK = HResult(_MAKE_DDHRESULT + 640); + {$EXTERNALSYM DDERR_CANTPAGELOCK} + + +(* + * The attempt to page unlock a surface failed. + *) + DDERR_CANTPAGEUNLOCK = HResult(_MAKE_DDHRESULT + 660); + {$EXTERNALSYM DDERR_CANTPAGEUNLOCK} + +(* + * An attempt was made to page unlock a surface with no outstanding page locks. + *) + DDERR_NOTPAGELOCKED = HResult(_MAKE_DDHRESULT + 680); + {$EXTERNALSYM DDERR_NOTPAGELOCKED} + +(* + * There is more data available than the specified buffer size could hold + *) + DDERR_MOREDATA = HResult(_MAKE_DDHRESULT + 690); + {$EXTERNALSYM DDERR_MOREDATA} + +(* + * The data has expired and is therefore no longer valid. + *) + DDERR_EXPIRED = HResult(_MAKE_DDHRESULT + 691); + {$EXTERNALSYM DDERR_EXPIRED} + +(* + * The mode test has finished executing. + *) + DDERR_TESTFINISHED = HResult(_MAKE_DDHRESULT + 692); + {$EXTERNALSYM DDERR_TESTFINISHED} + +(* + * The mode test has switched to a new mode. + *) + DDERR_NEWMODE = HResult(_MAKE_DDHRESULT + 693); + {$EXTERNALSYM DDERR_NEWMODE} + +(* + * D3D has not yet been initialized. + *) + DDERR_D3DNOTINITIALIZED = HResult(_MAKE_DDHRESULT + 694); + {$EXTERNALSYM DDERR_D3DNOTINITIALIZED} + +(* + * The video port is not active + *) + DDERR_VIDEONOTACTIVE = HResult(_MAKE_DDHRESULT + 695); + {$EXTERNALSYM DDERR_VIDEONOTACTIVE} + +(* + * The monitor does not have EDID data. + *) + DDERR_NOMONITORINFORMATION = HResult(_MAKE_DDHRESULT + 696); + {$EXTERNALSYM DDERR_NOMONITORINFORMATION} + +(* + * The driver does not enumerate display mode refresh rates. + *) + DDERR_NODRIVERSUPPORT = HResult(_MAKE_DDHRESULT + 697); + {$EXTERNALSYM DDERR_NODRIVERSUPPORT} + +(* + * Surfaces created by one direct draw device cannot be used directly by + * another direct draw device. + *) + DDERR_DEVICEDOESNTOWNSURFACE = HResult(_MAKE_DDHRESULT + 699); + {$EXTERNALSYM DDERR_DEVICEDOESNTOWNSURFACE} + + + +(* + * An attempt was made to invoke an interface member of a DirectDraw object + * created by CoCreateInstance() before it was initialized. + *) + DDERR_NOTINITIALIZED = CO_E_NOTINITIALIZED; + {$EXTERNALSYM DDERR_NOTINITIALIZED} + +(* Alpha bit depth constants *) + + + +(* + * API's + *) + +const + DirectDrawDll = 'ddraw.dll'; + +type + HMonitor = THandle; + {$EXTERNALSYM HMonitor} + + TDDEnumCallbackA = function (lpGUID: PGUID; lpDriverDescription: PAnsiChar; + lpDriverName: PAnsiChar; lpContext: Pointer): BOOL; stdcall; + {$EXTERNALSYM TDDEnumCallbackA} + TDDEnumCallbackW = function (lpGUID: PGUID; lpDriverDescription: PWideChar; + lpDriverName: PWideChar; lpContext: Pointer): BOOL; stdcall; + {$EXTERNALSYM TDDEnumCallbackW} + TDDEnumCallback = function (lpGUID: PGUID; lpDriverDescription: PChar; + lpDriverName: PChar; lpContext: Pointer): BOOL; stdcall; + {$EXTERNALSYM TDDEnumCallback} + + TDDEnumCallbackExA = function (lpGUID: PGUID; lpDriverDescription: PAnsiChar; + lpDriverName: PAnsiChar; lpContext: Pointer; Monitor: HMonitor): BOOL; + stdcall; + {$EXTERNALSYM TDDEnumCallbackExA} + TDDEnumCallbackExW = function (lpGUID: PGUID; lpDriverDescription: PWideChar; + lpDriverName: PWideChar; lpContext: Pointer; Monitor: HMonitor): BOOL; + stdcall; + {$EXTERNALSYM TDDEnumCallbackExW} + TDDEnumCallbackEx = function (lpGUID: PGUID; lpDriverDescription: PChar; + lpDriverName: PChar; lpContext: Pointer; Monitor: HMonitor): BOOL; + stdcall; + {$EXTERNALSYM TDDEnumCallbackEx} + +function DirectDrawLoaded: Boolean; +function UnLoadDirectDraw: Boolean; +function LoadDirectDraw: Boolean; + +{$IFDEF DIRECTDRAW_DYNAMIC_LINK} +var + DirectDrawEnumerateA : function (lpCallback: TDDEnumCallbackA; + lpContext: Pointer): HResult; stdcall; + {$EXTERNALSYM DirectDrawEnumerateA} + DirectDrawEnumerateW : function (lpCallback: TDDEnumCallbackW; + lpContext: Pointer): HResult; stdcall; + {$EXTERNALSYM DirectDrawEnumerateW} + DirectDrawEnumerate : function (lpCallback: TDDEnumCallback; + lpContext: Pointer): HResult; stdcall; + {$EXTERNALSYM DirectDrawEnumerate} + + DirectDrawEnumerateExA : function (lpCallback: TDDEnumCallbackExA; + lpContext: Pointer; dwFlags: DWORD): HResult; stdcall; + {$EXTERNALSYM DirectDrawEnumerateExA} + DirectDrawEnumerateExW : function (lpCallback: TDDEnumCallbackExW; + lpContext: Pointer; dwFlags: DWORD): HResult; stdcall; + {$EXTERNALSYM DirectDrawEnumerateExW} + DirectDrawEnumerateEx : function (lpCallback: TDDEnumCallbackEx; + lpContext: Pointer; dwFlags: DWORD): HResult; stdcall; + {$EXTERNALSYM DirectDrawEnumerateEx} + + DirectDrawCreate : function (lpGUID: PGUID; + out lplpDD: IDirectDraw; + pUnkOuter: IUnknown): HResult; stdcall; + {$EXTERNALSYM DirectDrawCreate} + DirectDrawCreateEx : function (lpGUID: PGUID; + out lplpDD: IDirectDraw7; const iid: TGUID; + pUnkOuter: IUnknown): HResult; stdcall; + {$EXTERNALSYM DirectDrawCreateEx} + DirectDrawCreateClipper : function (dwFlags: DWORD; + out lplpDDClipper: IDirectDrawClipper; + pUnkOuter: IUnknown): HResult; stdcall; + {$EXTERNALSYM DirectDrawCreateClipper} +{$ELSE} + +function DirectDrawEnumerateA(lpCallback: TDDEnumCallbackA; lpContext: Pointer): HResult; stdcall; external DirectDrawDll; +{$EXTERNALSYM DirectDrawEnumerateA} +function DirectDrawEnumerateW(lpCallback: TDDEnumCallbackW; lpContext: Pointer): HResult; stdcall; external DirectDrawDll; +{$EXTERNALSYM DirectDrawEnumerateW} +function DirectDrawEnumerate(lpCallback: TDDEnumCallback; lpContext: Pointer): HResult; stdcall; + external DirectDrawDll name {$IFDEF UNICODE}'DirectDrawEnumerateW'{$ELSE}'DirectDrawEnumerateA'{$ENDIF}; +{$EXTERNALSYM DirectDrawEnumerate} + +function DirectDrawEnumerateExA(lpCallback: TDDEnumCallbackExA; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall; external DirectDrawDll; +{$EXTERNALSYM DirectDrawEnumerateExA} +function DirectDrawEnumerateExW(lpCallback: TDDEnumCallbackExW; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall; external DirectDrawDll; +{$EXTERNALSYM DirectDrawEnumerateExW} +function DirectDrawEnumerateEx(lpCallback: TDDEnumCallbackEx; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall; + external DirectDrawDll name {$IFDEF UNICODE}'DirectDrawEnumerateExW'{$ELSE}'DirectDrawEnumerateExA'{$ENDIF}; +{$EXTERNALSYM DirectDrawEnumerateEx} + +function DirectDrawCreate(lpGUID: PGUID; out lplpDD: IDirectDraw; + pUnkOuter: IUnknown): HResult; stdcall; external DirectDrawDll; +{$EXTERNALSYM DirectDrawCreate} + +function DirectDrawCreateEx(lpGUID: PGUID; out lplpDD: IDirectDraw7; + const iid: TGUID; pUnkOuter: IUnknown): HResult; stdcall; external DirectDrawDll; +{$EXTERNALSYM DirectDrawCreateEx} + +function DirectDrawCreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper; + pUnkOuter: IUnknown): HResult; stdcall; external DirectDrawDll; +{$EXTERNALSYM DirectDrawCreateClipper} + +{$ENDIF} + +const +(* + * Flags for DirectDrawEnumerateEx + * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to + * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx. + * By default, only the primary display device is enumerated. + * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES) + *) + +(* + * This flag causes enumeration of any GDI display devices which are part of + * the Windows Desktop + *) + DDENUM_ATTACHEDSECONDARYDEVICES = $00000001; + {$EXTERNALSYM DDENUM_ATTACHEDSECONDARYDEVICES} + +(* + * This flag causes enumeration of any GDI display devices which are not + * part of the Windows Desktop + *) + DDENUM_DETACHEDSECONDARYDEVICES = $00000002; + {$EXTERNALSYM DDENUM_DETACHEDSECONDARYDEVICES} + +(* + * This flag causes enumeration of non-display devices + *) + DDENUM_NONDISPLAYDEVICES = $00000004; + {$EXTERNALSYM DDENUM_NONDISPLAYDEVICES} + + + REGSTR_KEY_DDHW_DESCRIPTION = 'Description'; + {$EXTERNALSYM REGSTR_KEY_DDHW_DESCRIPTION} + REGSTR_KEY_DDHW_DRIVERNAME = 'DriverName'; + {$EXTERNALSYM REGSTR_KEY_DDHW_DRIVERNAME} + REGSTR_PATH_DDHW = 'Hardware\DirectDrawDrivers'; + {$EXTERNALSYM REGSTR_PATH_DDHW} + + DDCREATE_HARDWAREONLY = $00000001; + {$EXTERNALSYM DDCREATE_HARDWAREONLY} + DDCREATE_EMULATIONONLY = $00000002; + {$EXTERNALSYM DDCREATE_EMULATIONONLY} + +(* + * Flags for the IDirectDraw4::GetDeviceIdentifier method + *) + +(* + * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped + * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the + * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is + * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities + * of the DirectDraw object involved. + *) + DDGDI_GETHOSTIDENTIFIER = $00000001; + {$EXTERNALSYM DDGDI_GETHOSTIDENTIFIER} + +(* + * Macros for interpretting DDEVICEIDENTIFIER2.dwWHQLLevel + *) +function GET_WHQL_YEAR(dwWHQLLevel: DWORD): DWORD; +{$EXTERNALSYM GET_WHQL_YEAR} +function GET_WHQL_MONTH(dwWHQLLevel: DWORD): DWORD; +{$EXTERNALSYM GET_WHQL_MONTH} +function GET_WHQL_DAY(dwWHQLLevel: DWORD): DWORD; +{$EXTERNALSYM GET_WHQL_DAY} + + +(*==========================================================================; + * + * Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved. + * + * File: dvp.h + * Content: DirectDrawVideoPort include file + * + ***************************************************************************) + +const +(* + * GUIDS used by DirectDrawVideoPort objects + *) + +(* + IID_IDDVideoPortContainer, + IID_IDirectDrawVideoPort, + IID_IDirectDrawVideoPortNotify + - are defined later in Delphi header +*) + + DDVPTYPE_E_HREFH_VREFH: TGUID = (D1:$54F39980;D2:$DA60;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8)); + {$EXTERNALSYM DDVPTYPE_E_HREFH_VREFH} + DDVPTYPE_E_HREFH_VREFL: TGUID = (D1:$92783220;D2:$DA60;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8)); + {$EXTERNALSYM DDVPTYPE_E_HREFH_VREFL} + DDVPTYPE_E_HREFL_VREFH: TGUID = (D1:$A07A02E0;D2:$DA60;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8)); + {$EXTERNALSYM DDVPTYPE_E_HREFL_VREFH} + DDVPTYPE_E_HREFL_VREFL: TGUID = (D1:$E09C77E0;D2:$DA60;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8)); + {$EXTERNALSYM DDVPTYPE_E_HREFL_VREFL} + DDVPTYPE_CCIR656: TGUID = (D1:$FCA326A0;D2:$DA60;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8)); + {$EXTERNALSYM DDVPTYPE_CCIR656} + DDVPTYPE_BROOKTREE: TGUID = (D1:$1352A560;D2:$DA61;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8)); + {$EXTERNALSYM DDVPTYPE_BROOKTREE} + DDVPTYPE_PHILIPS: TGUID = (D1:$332CF160;D2:$DA61;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8)); + {$EXTERNALSYM DDVPTYPE_PHILIPS} + + +(* + * These definitions are required to allow polymorphic structure members (i.e. those + * that are referred to both as DWORDs and as pointers) to resolve into a type + * of correct size to hold the largest of those two types (i.e. pointer) on 64 bit + * systems. For 32 bit environments, ULONG_PTR resolves to a DWORD. + *) +type + ULONG_PTR = DWORD; + {$EXTERNALSYM ULONG_PTR} + +(*============================================================================ + * + * DirectDraw Structures + * + * Various structures used to invoke DirectDraw. + * + *==========================================================================*) + +type + +(* + * DDVIDEOPORTCONNECT + *) + PDDVideoPortConnect = ^TDDVideoPortConnect; + _DDVIDEOPORTCONNECT = packed record + dwSize: DWORD; // size of the TDDVideoPortConnect structure + dwPortWidth: DWORD; // Width of the video port + guidTypeID: TGUID; // Description of video port connection + dwFlags: DWORD; // Connection flags + dwReserved1: ULONG_PTR; // Reserved, set to zero. + end; + {$EXTERNALSYM _DDVIDEOPORTCONNECT} + DDVIDEOPORTCONNECT = _DDVIDEOPORTCONNECT; + {$EXTERNALSYM DDVIDEOPORTCONNECT} + TDDVideoPortConnect = _DDVIDEOPORTCONNECT; + +(* + * DDVIDEOPORTCAPS + *) + PDDVideoPortCaps = ^TDDVideoPortCaps; + _DDVIDEOPORTCAPS = packed record + dwSize: DWORD; // size of the TDDVideoPortCaps structure + dwFlags: DWORD; // indicates which fields contain data + dwMaxWidth: DWORD; // max width of the video port field + dwMaxVBIWidth: DWORD; // max width of the VBI data + dwMaxHeight: DWORD; // max height of the video port field + dwVideoPortID: DWORD; // Video port ID (0 - (dwMaxVideoPorts -1)) + dwCaps: DWORD; // Video port capabilities + dwFX: DWORD; // More video port capabilities + dwNumAutoFlipSurfaces: DWORD; // Number of autoflippable surfaces + dwAlignVideoPortBoundary: DWORD; // Byte restriction of placement within the surface + dwAlignVideoPortPrescaleWidth: DWORD; // Byte restriction of width after prescaling + dwAlignVideoPortCropBoundary: DWORD; // Byte restriction of left cropping + dwAlignVideoPortCropWidth: DWORD; // Byte restriction of cropping width + dwPreshrinkXStep: DWORD; // Width can be shrunk in steps of 1/x + dwPreshrinkYStep: DWORD; // Height can be shrunk in steps of 1/x + dwNumVBIAutoFlipSurfaces: DWORD; // Number of VBI autoflippable surfaces allowed + dwNumPreferredAutoflip: DWORD; // Optimal number of autoflippable surfaces for hardware + wNumFilterTapsX: Word; // Number of taps the prescaler uses in the X direction (0 - no prescale, 1 - replication, etc.) + wNumFilterTapsY: Word; // Number of taps the prescaler uses in the Y direction (0 - no prescale, 1 - replication, etc.) + end; + {$EXTERNALSYM _DDVIDEOPORTCAPS} + DDVIDEOPORTCAPS = _DDVIDEOPORTCAPS; + {$EXTERNALSYM DDVIDEOPORTCAPS} + TDDVideoPortCaps = _DDVIDEOPORTCAPS; + +const +(* + * The dwMaxWidth and dwMaxVBIWidth members are valid + *) + DDVPD_WIDTH = $00000001; + {$EXTERNALSYM DDVPD_WIDTH} + +(* + * The dwMaxHeight member is valid + *) + DDVPD_HEIGHT = $00000002; + {$EXTERNALSYM DDVPD_HEIGHT} + +(* + * The dwVideoPortID member is valid + *) + DDVPD_ID = $00000004; + {$EXTERNALSYM DDVPD_ID} + +(* + * The dwCaps member is valid + *) + DDVPD_CAPS = $00000008; + {$EXTERNALSYM DDVPD_CAPS} + +(* + * The dwFX member is valid + *) + DDVPD_FX = $00000010; + {$EXTERNALSYM DDVPD_FX} + +(* + * The dwNumAutoFlipSurfaces member is valid + *) + DDVPD_AUTOFLIP = $00000020; + {$EXTERNALSYM DDVPD_AUTOFLIP} + +(* + * All of the alignment members are valid + *) + DDVPD_ALIGN = $00000040; + {$EXTERNALSYM DDVPD_ALIGN} + +(* + * The dwNumPreferredAutoflip member is valid + *) + DDVPD_PREFERREDAUTOFLIP = $00000080; + {$EXTERNALSYM DDVPD_PREFERREDAUTOFLIP} + +(* + * The wNumFilterTapsX and wNumFilterTapsY fields are valid + *) + DDVPD_FILTERQUALITY = $00000100; + {$EXTERNALSYM DDVPD_FILTERQUALITY} + +type +(* + * DDVIDEOPORTDESC + *) + PDDVideoPortDesc = ^TDDVideoPortDesc; + _DDVIDEOPORTDESC = packed record + dwSize: DWORD; // size of the TDDVideoPortDesc structure + dwFieldWidth: DWORD; // width of the video port field + dwVBIWidth: DWORD; // width of the VBI data + dwFieldHeight: DWORD; // height of the video port field + dwMicrosecondsPerField: DWORD; // Microseconds per video field + dwMaxPixelsPerSecond: DWORD; // Maximum pixel rate per second + dwVideoPortID: DWORD; // Video port ID (0 - (dwMaxVideoPorts -1)) + dwReserved1: DWORD; // Reserved for future use - set to zero (struct padding) + VideoPortType: TDDVideoPortConnect; // Description of video port connection + dwReserved2: DWORD; // Reserved for future use - set to zero + dwReserved3: DWORD; // Reserved for future use - set to zero + end; + {$EXTERNALSYM _DDVIDEOPORTDESC} + DDVIDEOPORTDESC = _DDVIDEOPORTDESC; + {$EXTERNALSYM DDVIDEOPORTDESC} + TDDVideoPortDesc = _DDVIDEOPORTDESC; + +(* + * DDVIDEOPORTINFO + *) + PDDVideoPortInfo = ^TDDVideoPortInfo; + _DDVIDEOPORTINFO = packed record + dwSize: DWORD; // Size of the structure + dwOriginX: DWORD; // Placement of the video data within the surface. + dwOriginY: DWORD; // Placement of the video data within the surface. + dwVPFlags: DWORD; // Video port options + rCrop: TRect; // Cropping rectangle (optional). + dwPrescaleWidth: DWORD; // Determines pre-scaling/zooming in the X direction (optional). + dwPrescaleHeight: DWORD; // Determines pre-scaling/zooming in the Y direction (optional). + lpddpfInputFormat: PDDPixelFormat; // Video format written to the video port + lpddpfVBIInputFormat: PDDPixelFormat; // Input format of the VBI data + lpddpfVBIOutputFormat: PDDPixelFormat; // Output format of the data + dwVBIHeight: DWORD; // Specifies the number of lines of data within the vertical blanking interval. + dwReserved1: DWORD; // Reserved for future use - set to zero + dwReserved2: DWORD; // Reserved for future use - set to zero + end; + {$EXTERNALSYM _DDVIDEOPORTINFO} + DDVIDEOPORTINFO = _DDVIDEOPORTINFO; + {$EXTERNALSYM DDVIDEOPORTINFO} + TDDVideoPortInfo = _DDVIDEOPORTINFO; + +(* + * DDVIDEOPORTBANDWIDTH + *) + PDDVideoPortBandWidth = ^TDDVideoPortBandWidth; + _DDVIDEOPORTBANDWIDTH = packed record + dwSize: DWORD; // Size of the structure + dwCaps: DWORD; + dwOverlay: DWORD; // Zoom factor at which overlay is supported + dwColorkey: DWORD; // Zoom factor at which overlay w/ colorkey is supported + dwYInterpolate: DWORD; // Zoom factor at which overlay w/ Y interpolation is supported + dwYInterpAndColorkey: DWORD; // Zoom factor at which ovelray w/ Y interpolation and colorkeying is supported + dwReserved1: DWORD; // Reserved for future use - set to zero + dwReserved2: DWORD; // Reserved for future use - set to zero + end; + {$EXTERNALSYM _DDVIDEOPORTBANDWIDTH} + DDVIDEOPORTBANDWIDTH = _DDVIDEOPORTBANDWIDTH; + {$EXTERNALSYM DDVIDEOPORTBANDWIDTH} + TDDVideoPortBandWidth = _DDVIDEOPORTBANDWIDTH; + +(* + * DDVIDEOPORTSTATUS + *) + PDDVideoPortStatus = ^TDDVideoPortStatus; + _DDVIDEOPORTSTATUS = record + dwSize: DWORD; // Size of the structure + bInUse: BOOL; // TRUE if video port is currently being used + dwFlags: DWORD; // Currently not used + dwReserved1: DWORD; // Reserved for future use + VideoPortType: TDDVideoPortConnect; // Information about the connection + dwReserved2: DWORD; // Reserved for future use + dwReserved3: DWORD; // Reserved for future use + end; + {$EXTERNALSYM _DDVIDEOPORTSTATUS} + DDVIDEOPORTSTATUS = _DDVIDEOPORTSTATUS; + {$EXTERNALSYM DDVIDEOPORTSTATUS} + TDDVideoPortStatus = _DDVIDEOPORTSTATUS; + +(* + * DDVIDEOPORTNOTIFY + *) + PDDVideoPortNotify = ^TDDVideoPortNotify; + _DDVIDEOPORTNOTIFY = packed record + ApproximateTimeStamp: Int64; // Timestamp in the event notification + lField: Longint; // 0 if even, 1 if odd, -1 if unknown + dwSurfaceIndex: Longword; // Index in the surface chain of the surface that received the sample + lDone: Longint; // Call InterlockedIncrement on this when done with sample + end; + {$EXTERNALSYM _DDVIDEOPORTNOTIFY} + DDVIDEOPORTNOTIFY = _DDVIDEOPORTNOTIFY; + {$EXTERNALSYM DDVIDEOPORTNOTIFY} + TDDVideoPortNotify = _DDVIDEOPORTNOTIFY; + + +(*============================================================================ + * + * Video Port Flags + * + * All flags are bit flags. + * + *==========================================================================*) +const +(**************************************************************************** + * + * VIDEOPORT DDVIDEOPORTCONNECT / TDDVideoPortConnect FLAGS + * + ****************************************************************************) + +(* + * When this is set by the driver and passed to the client, this + * indicates that the video port is capable of double clocking the data. + * When this is set by the client, this indicates that the video port + * should enable double clocking. This flag is only valid with external + * syncs. + *) + DDVPCONNECT_DOUBLECLOCK = $00000001; + {$EXTERNALSYM DDVPCONNECT_DOUBLECLOCK} + +(* + * When this is set by the driver and passed to the client, this + * indicates that the video port is capable of using an external VACT + * signal. When this is set by the client, this indicates that the + * video port should use the external VACT signal. + *) + DDVPCONNECT_VACT = $00000002; + {$EXTERNALSYM DDVPCONNECT_VACT} + +(* + * When this is set by the driver and passed to the client, this + * indicates that the video port is capable of treating even fields + * like odd fields and visa versa. When this is set by the client, + * this indicates that the video port should treat even fields like odd + * fields. + *) + DDVPCONNECT_INVERTPOLARITY = $00000004; + {$EXTERNALSYM DDVPCONNECT_INVERTPOLARITY} + +(* + * Indicates that any data written to the video port during the VREF + * period will not be written into the frame buffer. This flag is read only. + *) + DDVPCONNECT_DISCARDSVREFDATA = $00000008; + {$EXTERNALSYM DDVPCONNECT_DISCARDSVREFDATA} + +(* + * When this is set be the driver and passed to the client, this + * indicates that the device will write half lines into the frame buffer + * if half lines are provided by the decoder. If this is set by the client, + * this indicates that the decoder will be supplying half lines. + *) + DDVPCONNECT_HALFLINE = $00000010; + {$EXTERNALSYM DDVPCONNECT_HALFLINE} + +(* + * Indicates that the signal is interlaced. This flag is only + * set by the client. + *) + DDVPCONNECT_INTERLACED = $00000020; + {$EXTERNALSYM DDVPCONNECT_INTERLACED} + +(* + * Indicates that video port is shareable and that this video port + * will use the even fields. This flag is only set by the client. + *) + DDVPCONNECT_SHAREEVEN = $00000040; + {$EXTERNALSYM DDVPCONNECT_SHAREEVEN} + +(* + * Indicates that video port is shareable and that this video port + * will use the odd fields. This flag is only set by the client. + *) + DDVPCONNECT_SHAREODD = $00000080; + {$EXTERNALSYM DDVPCONNECT_SHAREODD} + +(**************************************************************************** + * + * VIDEOPORT DDVIDEOPORTDESC / TDDVideoPortDesc CAPS + * + ****************************************************************************) + +(* + * Flip can be performed automatically to avoid tearing. + *) + DDVPCAPS_AUTOFLIP = $00000001; + {$EXTERNALSYM DDVPCAPS_AUTOFLIP} + +(* + * Supports interlaced video + *) + DDVPCAPS_INTERLACED = $00000002; + {$EXTERNALSYM DDVPCAPS_INTERLACED} + +(* + * Supports non-interlaced video + *) + DDVPCAPS_NONINTERLACED = $00000004; + {$EXTERNALSYM DDVPCAPS_NONINTERLACED} + +(* + * Indicates that the device can return whether the current field + * of an interlaced signal is even or odd. + *) + DDVPCAPS_READBACKFIELD = $00000008; + {$EXTERNALSYM DDVPCAPS_READBACKFIELD} + +(* + * Indicates that the device can return the current line of video + * being written into the frame buffer. + *) + DDVPCAPS_READBACKLINE = $00000010; + {$EXTERNALSYM DDVPCAPS_READBACKLINE} + +(* + * Allows two gen-locked video streams to share a single video port, + * where one stream uses the even fields and the other uses the odd + * fields. Separate parameters (including address, scaling, + * cropping, etc.) are maintained for both fields.) + *) + DDVPCAPS_SHAREABLE = $00000020; + {$EXTERNALSYM DDVPCAPS_SHAREABLE} + +(* + * Even fields of video can be automatically discarded. + *) + DDVPCAPS_SKIPEVENFIELDS = $00000040; + {$EXTERNALSYM DDVPCAPS_SKIPEVENFIELDS} + +(* + * Odd fields of video can be automatically discarded. + *) + DDVPCAPS_SKIPODDFIELDS = $00000080; + {$EXTERNALSYM DDVPCAPS_SKIPODDFIELDS} + +(* + * Indicates that the device is capable of driving the graphics + * VSYNC with the video port VSYNC. + *) + DDVPCAPS_SYNCMASTER = $00000100; + {$EXTERNALSYM DDVPCAPS_SYNCMASTER} + +(* + * Indicates that data within the vertical blanking interval can + * be written to a different surface. + *) + DDVPCAPS_VBISURFACE = $00000200; + {$EXTERNALSYM DDVPCAPS_VBISURFACE} + +(* + * Indicates that the video port can perform color operations + * on the incoming data before it is written to the frame buffer. + *) + DDVPCAPS_COLORCONTROL = $00000400; + {$EXTERNALSYM DDVPCAPS_COLORCONTROL} + +(* + * Indicates that the video port can accept VBI data in a different + * width or format than the regular video data. + *) + DDVPCAPS_OVERSAMPLEDVBI = $00000800; + {$EXTERNALSYM DDVPCAPS_OVERSAMPLEDVBI} + +(* + * Indicates that the video port can write data directly to system memory + *) + DDVPCAPS_SYSTEMMEMORY = $00001000; + {$EXTERNALSYM DDVPCAPS_SYSTEMMEMORY} + +(* + * Indicates that the VBI and video portions of the video stream can + * be controlled by an independent processes. + *) + DDVPCAPS_VBIANDVIDEOINDEPENDENT = $00002000; + {$EXTERNALSYM DDVPCAPS_VBIANDVIDEOINDEPENDENT} + +(* + * Indicates that the video port contains high quality hardware + * de-interlacing hardware that should be used instead of the + * bob/weave algorithms. + *) + DDVPCAPS_HARDWAREDEINTERLACE = $00004000; + {$EXTERNALSYM DDVPCAPS_HARDWAREDEINTERLACE} + + +(**************************************************************************** + * + * VIDEOPORT DDVIDEOPORTDESC / TDDVideoPortDesc FX + * + ****************************************************************************) + +(* + * Limited cropping is available to crop out the vertical interval data. + *) + DDVPFX_CROPTOPDATA = $00000001; + {$EXTERNALSYM DDVPFX_CROPTOPDATA} + +(* + * Incoming data can be cropped in the X direction before it is written + * to the surface. + *) + DDVPFX_CROPX = $00000002; + {$EXTERNALSYM DDVPFX_CROPX} + +(* + * Incoming data can be cropped in the Y direction before it is written + * to the surface. + *) + DDVPFX_CROPY = $00000004; + {$EXTERNALSYM DDVPFX_CROPY} + +(* + * Supports interleaving interlaced fields in memory. + *) + DDVPFX_INTERLEAVE = $00000008; + {$EXTERNALSYM DDVPFX_INTERLEAVE} + +(* + * Supports mirroring left to right as the video data is written + * into the frame buffer. + *) + DDVPFX_MIRRORLEFTRIGHT = $00000010; + {$EXTERNALSYM DDVPFX_MIRRORLEFTRIGHT} + +(* + * Supports mirroring top to bottom as the video data is written + * into the frame buffer. + *) + DDVPFX_MIRRORUPDOWN = $00000020; + {$EXTERNALSYM DDVPFX_MIRRORUPDOWN} + +(* + * Data can be arbitrarily shrunk in the X direction before it + * is written to the surface. + *) + DDVPFX_PRESHRINKX = $00000040; + {$EXTERNALSYM DDVPFX_PRESHRINKX} + +(* + * Data can be arbitrarily shrunk in the Y direction before it + * is written to the surface. + *) + DDVPFX_PRESHRINKY = $00000080; + {$EXTERNALSYM DDVPFX_PRESHRINKY} + +(* + * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the X + * direction before it is written to the surface. + *) + DDVPFX_PRESHRINKXB = $00000100; + {$EXTERNALSYM DDVPFX_PRESHRINKXB} + +(* + * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the Y + * direction before it is written to the surface. + *) + DDVPFX_PRESHRINKYB = $00000200; + {$EXTERNALSYM DDVPFX_PRESHRINKYB} + +(* + * Data can be shrunk in increments of 1/x in the X direction + * (where X is specified in the TDDVideoPortCaps.dwPreshrinkXStep) + * before it is written to the surface. + *) + DDVPFX_PRESHRINKXS = $00000400; + {$EXTERNALSYM DDVPFX_PRESHRINKXS} + +(* + * Data can be shrunk in increments of 1/x in the Y direction + * (where X is specified in the TDDVideoPortCaps.dwPreshrinkYStep) + * before it is written to the surface. + *) + DDVPFX_PRESHRINKYS = $00000800; + {$EXTERNALSYM DDVPFX_PRESHRINKYS} + +(* + * Data can be arbitrarily stretched in the X direction before + * it is written to the surface. + *) + DDVPFX_PRESTRETCHX = $00001000; + {$EXTERNALSYM DDVPFX_PRESTRETCHX} + +(* + * Data can be arbitrarily stretched in the Y direction before + * it is written to the surface. + *) + DDVPFX_PRESTRETCHY = $00002000; + {$EXTERNALSYM DDVPFX_PRESTRETCHY} + +(* + * Data can be integer stretched in the X direction before it is + * written to the surface. + *) + DDVPFX_PRESTRETCHXN = $00004000; + {$EXTERNALSYM DDVPFX_PRESTRETCHXN} + +(* + * Data can be integer stretched in the Y direction before it is + * written to the surface. + *) + DDVPFX_PRESTRETCHYN = $00008000; + {$EXTERNALSYM DDVPFX_PRESTRETCHYN} + +(* + * Indicates that data within the vertical blanking interval can + * be converted independently of the remaining video data. + *) + DDVPFX_VBICONVERT = $00010000; + {$EXTERNALSYM DDVPFX_VBICONVERT} + +(* + * Indicates that scaling can be disabled for data within the + * vertical blanking interval. + *) + DDVPFX_VBINOSCALE = $00020000; + {$EXTERNALSYM DDVPFX_VBINOSCALE} + +(* + * Indicates that the video data can ignore the left and right + * cropping coordinates when cropping oversampled VBI data. + *) + DDVPFX_IGNOREVBIXCROP = $00040000; + {$EXTERNALSYM DDVPFX_IGNOREVBIXCROP} + +(* + * Indicates that interleaving can be disabled for data within the + * vertical blanking interval. + *) + DDVPFX_VBINOINTERLEAVE = $00080000; + {$EXTERNALSYM DDVPFX_VBINOINTERLEAVE} + + +(**************************************************************************** + * + * VIDEOPORT DDVIDEOPORTINFO / TDDVideoPortInfo FLAGS + * + ****************************************************************************) + +(* + * Perform automatic flipping. Auto-flipping is performed between + * the overlay surface that was attached to the video port using + * IDirectDrawVideoPort::AttachSurface and the overlay surfaces that + * are attached to the surface via the IDirectDrawSurface::AttachSurface + * method. The flip order is the order in which the overlay surfaces + * were. attached. + *) + DDVP_AUTOFLIP = $00000001; + {$EXTERNALSYM DDVP_AUTOFLIP} + +(* + * Perform conversion using the ddpfOutputFormat information. + *) + DDVP_CONVERT = $00000002; + {$EXTERNALSYM DDVP_CONVERT} + +(* + * Perform cropping using the specified rectangle. + *) + DDVP_CROP = $00000004; + {$EXTERNALSYM DDVP_CROP} + +(* + * Indicates that interlaced fields should be interleaved in memory. + *) + DDVP_INTERLEAVE = $00000008; + {$EXTERNALSYM DDVP_INTERLEAVE} + +(* + * Indicates that the data should be mirrored left to right as it's + * written into the frame buffer. + *) + DDVP_MIRRORLEFTRIGHT = $00000010; + {$EXTERNALSYM DDVP_MIRRORLEFTRIGHT} + +(* + * Indicates that the data should be mirrored top to bottom as it's + * written into the frame buffer. + *) + DDVP_MIRRORUPDOWN = $00000020; + {$EXTERNALSYM DDVP_MIRRORUPDOWN} + +(* + * Perform pre-scaling/zooming based on the pre-scale parameters. + *) + DDVP_PRESCALE = $00000040; + {$EXTERNALSYM DDVP_PRESCALE} + +(* + * Ignore input of even fields. + *) + DDVP_SKIPEVENFIELDS = $00000080; + {$EXTERNALSYM DDVP_SKIPEVENFIELDS} + +(* + * Ignore input of odd fields. + *) + DDVP_SKIPODDFIELDS = $00000100; + {$EXTERNALSYM DDVP_SKIPODDFIELDS} + +(* + * Drive the graphics VSYNCs using the video port VYSNCs. + *) + DDVP_SYNCMASTER = $00000200; + {$EXTERNALSYM DDVP_SYNCMASTER} + +(* + * The ddpfVBIOutputFormatFormat member contains data that should be used + * to convert the data within the vertical blanking interval. + *) + DDVP_VBICONVERT = $00000400; + {$EXTERNALSYM DDVP_VBICONVERT} + +(* + * Indicates that data within the vertical blanking interval + * should not be scaled. + *) + DDVP_VBINOSCALE = $00000800; + {$EXTERNALSYM DDVP_VBINOSCALE} + +(* + * Indicates that these bob/weave decisions should not be + * overriden by other interfaces. + *) + DDVP_OVERRIDEBOBWEAVE = $00001000; + {$EXTERNALSYM DDVP_OVERRIDEBOBWEAVE} + +(* + * Indicates that the video data should ignore the left and right + * cropping coordinates when cropping the VBI data. + *) + DDVP_IGNOREVBIXCROP = $00002000; + {$EXTERNALSYM DDVP_IGNOREVBIXCROP} + +(* + * Indicates that interleaving can be disabled for data within the + * vertical blanking interval. + *) + DDVP_VBINOINTERLEAVE = $00004000; + {$EXTERNALSYM DDVP_VBINOINTERLEAVE} + +(* + * Indicates that the video port should use the hardware + * de-interlacing hardware. + *) + DDVP_HARDWAREDEINTERLACE = $00008000; + {$EXTERNALSYM DDVP_HARDWAREDEINTERLACE} + +(**************************************************************************** + * + * DIRIRECTDRAWVIDEOPORT GETINPUTFORMAT/GETOUTPUTFORMAT FLAGS + * + ****************************************************************************) + +(* + * Return formats for the video data + *) + DDVPFORMAT_VIDEO = $00000001; + {$EXTERNALSYM DDVPFORMAT_VIDEO} + +(* + * Return formats for the VBI data + *) + DDVPFORMAT_VBI = $00000002; + {$EXTERNALSYM DDVPFORMAT_VBI} + +(**************************************************************************** + * + * DIRIRECTDRAWVIDEOPORT SETTARGETSURFACE FLAGS + * + ****************************************************************************) + +(* + * Surface should receive video data (and VBI data if a surface + * is not explicitly attached for that purpose) + *) + DDVPTARGET_VIDEO = $00000001; + {$EXTERNALSYM DDVPTARGET_VIDEO} + +(* + * Surface should receive VBI data + *) + DDVPTARGET_VBI = $00000002; + {$EXTERNALSYM DDVPTARGET_VBI} + + +(**************************************************************************** + * + * DIRIRECTDRAWVIDEOPORT WAITFORSYNC FLAGS + * + ****************************************************************************) + +(* + * Waits until the beginning of the next VSYNC + *) + DDVPWAIT_BEGIN = $00000001; + {$EXTERNALSYM DDVPWAIT_BEGIN} + +(* + * Waits until the end of the next/current VSYNC + *) + DDVPWAIT_END = $00000002; + {$EXTERNALSYM DDVPWAIT_END} + +(* + * Waits until the beginning of the specified line + *) + DDVPWAIT_LINE = $00000003; + {$EXTERNALSYM DDVPWAIT_LINE} + +(**************************************************************************** + * + * DIRECTDRAWVIDEOPORT FLIP FLAGS + * + ****************************************************************************) + +(* + * Flips the normal video surface + *) + DDVPFLIP_VIDEO = $00000001; + {$EXTERNALSYM DDVPFLIP_VIDEO} + +(* + * Flips the VBI surface + *) + DDVPFLIP_VBI = $00000002; + {$EXTERNALSYM DDVPFLIP_VBI} + +(**************************************************************************** + * + * DIRIRECTDRAWVIDEOPORT GETVIDEOSIGNALSTATUS VALUES + * + ****************************************************************************) + +(* + * No video signal is present at the video port + *) + DDVPSQ_NOSIGNAL = $00000001; + {$EXTERNALSYM DDVPSQ_NOSIGNAL} + +(* + * A valid video signal is present at the video port + *) + DDVPSQ_SIGNALOK = $00000002; + {$EXTERNALSYM DDVPSQ_SIGNALOK} + +(**************************************************************************** + * + * VIDEOPORTBANDWIDTH Flags + * + ****************************************************************************) + +(* + * The specified height/width refer to the size of the video port data + * written into memory, after prescaling has occured. + *) + DDVPB_VIDEOPORT = $00000001; + {$EXTERNALSYM DDVPB_VIDEOPORT} + +(* + * The specified height/width refer to the source size of the overlay. + *) + DDVPB_OVERLAY = $00000002; + {$EXTERNALSYM DDVPB_OVERLAY} + +(* + * This is a query for the device to return which caps this device requires. + *) + DDVPB_TYPE = $00000004; + {$EXTERNALSYM DDVPB_TYPE} + +(**************************************************************************** + * + * VIDEOPORTBANDWIDTH Caps + * + ****************************************************************************) + +(* + * The bandwidth for this device is dependant on the overlay source size. + *) + DDVPBCAPS_SOURCE = $00000001; + {$EXTERNALSYM DDVPBCAPS_SOURCE} + +(* + * The bandwidth for this device is dependant on the overlay destination + * size. + *) + DDVPBCAPS_DESTINATION = $00000002; + {$EXTERNALSYM DDVPBCAPS_DESTINATION} + +(**************************************************************************** + * + * DDVIDEOPORTCONTAINER CreateVideoPort flags + * + ****************************************************************************) + +(* + * The process only wants to control the VBI portion of the video stream. + *) + DDVPCREATE_VBIONLY = $00000001; + {$EXTERNALSYM DDVPCREATE_VBIONLY} + +(* + * The process only wants to control the non-VBI (video) portion of + * the video stream. + *) + DDVPCREATE_VIDEOONLY = $00000002; + {$EXTERNALSYM DDVPCREATE_VIDEOONLY} + +(**************************************************************************** + * + * DDVIDEOPORTSTATUS flags + * + ****************************************************************************) + +(* + * The video port interface is only controlling the VBI portion of the + * video stream + *) + DDVPSTATUS_VBIONLY = $00000001; + {$EXTERNALSYM DDVPSTATUS_VBIONLY} + +(* + * The video port interface is only controlling the video portion of the + * video stream + *) + DDVPSTATUS_VIDEOONLY = $00000002; + {$EXTERNALSYM DDVPSTATUS_VIDEOONLY} + + +type +(* + * API's + *) + + TDDEnumVideoCallback = function (lpTDDVideoPortCaps: PDDVideoPortCaps; + lpContext: Pointer): HResult; stdcall; + {$EXTERNALSYM TDDEnumVideoCallback} + +(* + * INTERACES FOLLOW: + * IDirectDrawVideoPort + * IVideoPort + *) + IDirectDrawVideoPort = interface; + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDrawVideoPort;'} + {$EXTERNALSYM IDirectDrawVideoPort} + +(* + * IDirectDrawVideoPortContainer + *) + {$HPPEMIT 'typedef System::DelphiInterface _di_IDDVideoPortContainer;'} + {$EXTERNALSYM IDDVideoPortContainer} + IDDVideoPortContainer = interface(IUnknown) + ['{6C142760-A733-11CE-A521-0020AF0BE560}'] + (*** IDDVideoPortContainer methods ***) + function CreateVideoPort(dwFlags: DWORD; var lpTDDVideoPortDesc: + TDDVideoPortDesc; var lplpDDVideoPort: IDirectDrawVideoPort; + pUnkOuter: IUnknown): HResult; stdcall; + function EnumVideoPorts(dwFlags: DWORD; + lpTDDVideoPortCaps: PDDVideoPortCaps; lpContext: Pointer; + lpEnumVideoCallback: TDDEnumVideoCallback): HResult; stdcall; + function GetVideoPortConnectInfo(dwPortId: DWORD; var lpNumEntries: DWORD; + lpConnectInfo: PDDVideoPortConnect): HResult; stdcall; + function QueryVideoPortStatus(dwPortId: DWORD; + var lpVPStatus: TDDVideoPortStatus): HResult; stdcall; + end; + +(* + * IDirectDrawVideoPort + *) + IDirectDrawVideoPort = interface(IUnknown) + ['{B36D93E0-2B43-11CF-A2DE-00AA00B93356}'] + (*** IDirectDrawVideoPort methods ***) + function Flip(lpDDSurface: IDirectDrawSurface; dwFlags: DWORD): HResult; stdcall; + function GetBandwidthInfo(var lpddpfFormat: TDDPixelFormat; + dwWidth: DWORD; dwHeight: DWORD; dwFlags: DWORD; + var lpBandwidth: TDDVideoPortBandWidth): HResult; stdcall; + function GetColorControls(var lpColorControl: TDDColorControl): HResult; stdcall; + function GetInputFormats(var lpNumFormats: DWORD; var lpFormats: + TDDPixelFormat; dwFlags: DWORD): HResult; stdcall; + function GetOutputFormats(var lpInputFormat: TDDPixelFormat; + var lpNumFormats: DWORD; lpFormats: PDDPixelFormat; dwFlags: DWORD): + HResult; stdcall; + function GetFieldPolarity(var lpbVideoField: BOOL): HResult; stdcall; + function GetVideoLine(var lpdwLine: DWORD): HResult; stdcall; + function GetVideoSignalStatus(varlpdwStatus: DWORD): HResult; stdcall; + function SetColorControls(var lpColorControl: TDDColorControl): HResult; stdcall; + function SetTargetSurface(lpDDSurface: IDirectDrawSurface; dwFlags: DWORD): + HResult; stdcall; + function StartVideo(var lpVideoInfo: TDDVideoPortInfo): HResult; stdcall; + function StopVideo: HResult; stdcall; + function UpdateVideo(var lpVideoInfo: TDDVideoPortInfo): HResult; stdcall; + function WaitForSync(dwFlags: DWORD; dwLine: DWORD; dwTimeout: DWORD): + HResult; stdcall; + end; + + IID_IDDVideoPortContainer = IDDVideoPortContainer; + {$EXTERNALSYM IID_IDDVideoPortContainer} + IID_IDirectDrawVideoPort = IDirectDrawVideoPort; + {$EXTERNALSYM IID_IDirectDrawVideoPort} + +(* + * IDirectDrawVideoPort + *) + {$HPPEMIT 'typedef System::DelphiInterface _di_IDirectDrawVideoPortNotify;'} + {$EXTERNALSYM IDirectDrawVideoPortNotify} + IDirectDrawVideoPortNotify = interface(IUnknown) + ['{6C142760-A733-11CE-A521-0020AF0BE560}'] + (*** IVideoPort methods ***) + function AcquireNotification(hEvent: THandle; const params: TDDVideoPortNotify): HResult; stdcall; + function ReleaseNotification(hEvent: THandle): HResult; stdcall; + end; + + +var + DDrawDLL : HMODULE = 0; + +function DDErrorString(Value: HResult): String; + +implementation + +//#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) +function MAKE_DDHRESULT(Code: DWORD): HResult; +begin + Result:= MakeResult(1, _FACDD, code); +end; + +//#define GET_WHQL_YEAR( dwWHQLLevel ) \ +// ( (dwWHQLLevel) / 0x10000 ) +function GET_WHQL_YEAR(dwWHQLLevel: DWORD): DWORD; +begin + Result := (dwWHQLLevel) div $10000; +end; + +//#define GET_WHQL_MONTH( dwWHQLLevel ) \ +// ( ( (dwWHQLLevel) / 0x100 ) & 0x00ff ) +function GET_WHQL_MONTH(dwWHQLLevel: DWORD): DWORD; +begin + Result := ((dwWHQLLevel) div $100) and $00ff; +end; + +//#define GET_WHQL_DAY( dwWHQLLevel ) \ +// ( (dwWHQLLevel) & 0xff ) +function GET_WHQL_DAY(dwWHQLLevel: DWORD): DWORD; +begin + Result := (dwWHQLLevel) and $ff; +end; + + +function MAKEFOURCC(ch0, ch1, ch2, ch3: Char): DWORD; +begin + Result := DWORD(Byte(ch0) shl 0) or + DWORD(Byte(ch1) shl 8) or + DWORD(Byte(ch2) shl 16) or + DWORD(Byte(ch3) shl 24); +end; + +function DDErrorString(Value: HResult): String; +begin + case Value of + DD_OK: Result := 'The request completed successfully.'; + DDERR_ALREADYINITIALIZED: Result := 'This object is already initialized.'; + DDERR_BLTFASTCANTCLIP: Result := ' if a clipper object is attached to the source surface passed into a BltFast call.'; + DDERR_CANNOTATTACHSURFACE: Result := 'This surface can not be attached to the requested surface.'; + DDERR_CANNOTDETACHSURFACE: Result := 'This surface can not be detached from the requested surface.'; + DDERR_CANTCREATEDC: Result := 'Windows can not create any more DCs.'; + DDERR_CANTDUPLICATE: Result := 'Cannot duplicate primary & 3D surfaces, or surfaces that are implicitly created.'; + DDERR_CLIPPERISUSINGHWND: Result := 'An attempt was made to set a cliplist for a clipper object that is already monitoring an hwnd.'; + DDERR_COLORKEYNOTSET: Result := 'No src color key specified for this operation.'; + DDERR_CURRENTLYNOTAVAIL: Result := 'Support is currently not available.'; + DDERR_DIRECTDRAWALREADYCREATED: Result := 'A DirectDraw object representing this driver has already been created for this process.'; + DDERR_EXCEPTION: Result := 'An exception was encountered while performing the requested operation.'; + DDERR_EXCLUSIVEMODEALREADYSET: Result := 'An attempt was made to set the cooperative level when it was already set to exclusive.'; + DDERR_GENERIC: Result := 'Generic failure.'; + DDERR_HEIGHTALIGN: Result := 'Height of rectangle provided is not a multiple of reqd alignment.'; + DDERR_HWNDALREADYSET: Result := 'The CooperativeLevel HWND has already been set. It can not be reset while the process has surfaces or palettes created.'; + DDERR_HWNDSUBCLASSED: Result := 'HWND used by DirectDraw CooperativeLevel has been subclassed, this prevents DirectDraw from restoring state.'; + DDERR_IMPLICITLYCREATED: Result := 'This surface can not be restored because it is an implicitly created surface.'; + DDERR_INCOMPATIBLEPRIMARY: Result := 'Unable to match primary surface creation request with existing primary surface.'; + DDERR_INVALIDCAPS: Result := 'One or more of the caps bits passed to the callback are incorrect.'; + DDERR_INVALIDCLIPLIST: Result := 'DirectDraw does not support the provided cliplist.'; + DDERR_INVALIDDIRECTDRAWGUID: Result := 'The GUID passed to DirectDrawCreate is not a valid DirectDraw driver identifier.'; + DDERR_INVALIDMODE: Result := 'DirectDraw does not support the requested mode.'; + DDERR_INVALIDOBJECT: Result := 'DirectDraw received a pointer that was an invalid DIRECTDRAW object.'; + DDERR_INVALIDPARAMS: Result := 'One or more of the parameters passed to the function are incorrect.'; + DDERR_INVALIDPIXELFORMAT: Result := 'The pixel format was invalid as specified.'; + DDERR_INVALIDPOSITION: Result := 'Returned when the position of the overlay on the destination is no longer legal for that destination.'; + DDERR_INVALIDRECT: Result := 'Rectangle provided was invalid.'; + DDERR_LOCKEDSURFACES: Result := 'Operation could not be carried out because one or more surfaces are locked.'; + DDERR_NO3D: Result := 'There is no 3D present.'; + DDERR_NOALPHAHW: Result := 'Operation could not be carried out because there is no alpha accleration hardware present or available.'; + DDERR_NOBLTHW: Result := 'No blitter hardware present.'; + DDERR_NOCLIPLIST: Result := 'No cliplist available.'; + DDERR_NOCLIPPERATTACHED: Result := 'No clipper object attached to surface object.'; + DDERR_NOCOLORCONVHW: Result := 'Operation could not be carried out because there is no color conversion hardware present or available.'; + DDERR_NOCOLORKEY: Result := 'Surface does not currently have a color key'; + DDERR_NOCOLORKEYHW: Result := 'Operation could not be carried out because there is no hardware support of the destination color key.'; + DDERR_NOCOOPERATIVELEVELSET: Result := 'Create function called without DirectDraw object method SetCooperativeLevel being called.'; + DDERR_NODC: Result := 'No DC was ever created for this surface.'; + DDERR_NODDROPSHW: Result := 'No DirectDraw ROP hardware.'; + DDERR_NODIRECTDRAWHW: Result := 'A hardware-only DirectDraw object creation was attempted but the driver did not support any hardware.'; + DDERR_NOEMULATION: Result := 'Software emulation not available.'; + DDERR_NOEXCLUSIVEMODE: Result := 'Operation requires the application to have exclusive mode but the application does not have exclusive mode.'; + DDERR_NOFLIPHW: Result := 'Flipping visible surfaces is not supported.'; + DDERR_NOGDI: Result := 'There is no GDI present.'; + DDERR_NOHWND: Result := 'Clipper notification requires an HWND or no HWND has previously been set as the CooperativeLevel HWND.'; + DDERR_NOMIRRORHW: Result := 'Operation could not be carried out because there is no hardware present or available.'; + DDERR_NOOVERLAYDEST: Result := 'Returned when GetOverlayPosition is called on an overlay that UpdateOverlay has never been called on to establish a destination.'; + DDERR_NOOVERLAYHW: Result := 'Operation could not be carried out because there is no overlay hardware present or available.'; + DDERR_NOPALETTEATTACHED: Result := 'No palette object attached to this surface.'; + DDERR_NOPALETTEHW: Result := 'No hardware support for 16 or 256 color palettes.'; + DDERR_NORASTEROPHW: Result := 'Operation could not be carried out because there is no appropriate raster op hardware present or available.'; + DDERR_NOROTATIONHW: Result := 'Operation could not be carried out because there is no rotation hardware present or available.'; + DDERR_NOSTRETCHHW: Result := 'Operation could not be carried out because there is no hardware support for stretching.'; + DDERR_NOT4BITCOLOR: Result := 'DirectDrawSurface is not in 4 bit color palette and the requested operation requires 4 bit color palette.'; + DDERR_NOT4BITCOLORINDEX: Result := 'DirectDrawSurface is not in 4 bit color index palette and the requested operation requires 4 bit color index palette.'; + DDERR_NOT8BITCOLOR: Result := 'DirectDrawSurface is not in 8 bit color mode and the requested operation requires 8 bit color.'; + DDERR_NOTAOVERLAYSURFACE: Result := 'Returned when an overlay member is called for a non-overlay surface.'; + DDERR_NOTEXTUREHW: Result := 'Operation could not be carried out because there is no texture mapping hardware present or available.'; + DDERR_NOTFLIPPABLE: Result := 'An attempt has been made to flip a surface that is not flippable.'; + DDERR_NOTFOUND: Result := 'Requested item was not found.'; + DDERR_NOTLOCKED: Result := 'Surface was not locked. An attempt to unlock a surface that was not locked at all, or by this process, has been attempted.'; + DDERR_NOTPALETTIZED: Result := 'The surface being used is not a palette-based surface.'; + DDERR_NOVSYNCHW: Result := 'Operation could not be carried out because there is no hardware support for vertical blank synchronized operations.'; + DDERR_NOZBUFFERHW: Result := 'Operation could not be carried out because there is no hardware support for zbuffer blitting.'; + DDERR_NOZOVERLAYHW: Result := 'Overlay surfaces could not be z layered based on their BltOrder because the hardware does not support z layering of overlays.'; + DDERR_OUTOFCAPS: Result := 'The hardware needed for the requested operation has already been allocated.'; + DDERR_OUTOFMEMORY: Result := 'DirectDraw does not have enough memory to perform the operation.'; + DDERR_OUTOFVIDEOMEMORY: Result := 'DirectDraw does not have enough memory to perform the operation.'; + DDERR_OVERLAYCANTCLIP: Result := 'The hardware does not support clipped overlays.'; + DDERR_OVERLAYCOLORKEYONLYONEACTIVE: Result := 'Can only have ony color key active at one time for overlays.'; + DDERR_OVERLAYNOTVISIBLE: Result := 'Returned when GetOverlayPosition is called on a hidden overlay.'; + DDERR_PALETTEBUSY: Result := 'Access to this palette is being refused because the palette is already locked by another thread.'; + DDERR_PRIMARYSURFACEALREADYEXISTS: Result := 'This process already has created a primary surface.'; + DDERR_REGIONTOOSMALL: Result := 'Region passed to Clipper::GetClipList is too small.'; + DDERR_SURFACEALREADYATTACHED: Result := 'This surface is already attached to the surface it is being attached to.'; + DDERR_SURFACEALREADYDEPENDENT: Result := 'This surface is already a dependency of the surface it is being made a dependency of.'; + DDERR_SURFACEBUSY: Result := 'Access to this surface is being refused because the surface is already locked by another thread.'; + DDERR_SURFACEISOBSCURED: Result := 'Access to surface refused because the surface is obscured.'; + DDERR_SURFACELOST: Result := 'Access to this surface is being refused because the surface memory is gone. The DirectDrawSurface object representing this surface should have Restore called on it.'; + DDERR_SURFACENOTATTACHED: Result := 'The requested surface is not attached.'; + DDERR_TOOBIGHEIGHT: Result := 'Height requested by DirectDraw is too large.'; + DDERR_TOOBIGSIZE: Result := 'Size requested by DirectDraw is too large, but the individual height and width are OK.'; + DDERR_TOOBIGWIDTH: Result := 'Width requested by DirectDraw is too large.'; + DDERR_UNSUPPORTED: Result := 'Action not supported.'; + DDERR_UNSUPPORTEDFORMAT: Result := 'FOURCC format requested is unsupported by DirectDraw.'; + DDERR_UNSUPPORTEDMASK: Result := 'Bitmask in the pixel format requested is unsupported by DirectDraw.'; + DDERR_VERTICALBLANKINPROGRESS: Result := 'Vertical blank is in progress.'; + DDERR_WASSTILLDRAWING: Result := 'Informs DirectDraw that the previous Blt which is transfering information to or from this Surface is incomplete.'; + DDERR_WRONGMODE: Result := 'This surface can not be restored because it was created in a different mode.'; + DDERR_XALIGN: Result := 'Rectangle provided was not horizontally aligned on required boundary.'; + // new: + DDERR_OVERLAPPINGRECTS: Result := 'Operation could not be carried out because the source and destination rectangles are on the same surface and overlap each other.'; + DDERR_INVALIDSTREAM: Result := 'The specified stream contains invalid data'; + DDERR_UNSUPPORTEDMODE: Result := 'The display is currently in an unsupported mode'; + DDERR_NOMIPMAPHW: Result := 'Operation could not be carried out because there is no mip-map texture mapping hardware present or available.'; + DDERR_INVALIDSURFACETYPE: Result := 'The requested action could not be performed because the surface was of the wrong type.'; + DDERR_NOOPTIMIZEHW: Result := 'Device does not support optimized surfaces, therefore no video memory optimized surfaces'; + DDERR_NOTLOADED: Result := 'Surface is an optimized surface, but has not yet been allocated any memory'; + DDERR_NOFOCUSWINDOW: Result := 'Attempt was made to create or set a device window without first setting the focus window'; + DDERR_DCALREADYCREATED: Result := 'A DC has already been returned for this surface. Only one DC can be retrieved per surface.'; + DDERR_NONONLOCALVIDMEM: Result := 'An attempt was made to allocate non-local video memory from a device that does not support non-local video memory.'; + DDERR_CANTPAGELOCK: Result := 'The attempt to page lock a surface failed.'; + DDERR_CANTPAGEUNLOCK: Result := 'The attempt to page unlock a surface failed.'; + DDERR_NOTPAGELOCKED: Result := 'An attempt was made to page unlock a surface with no outstanding page locks.'; + DDERR_MOREDATA: Result := 'There is more data available than the specified buffer size could hold'; + DDERR_EXPIRED: Result := 'The data has expired and is therefore no longer valid.'; + DDERR_VIDEONOTACTIVE: Result := 'The video port is not active'; + DDERR_DEVICEDOESNTOWNSURFACE: Result := 'Surfaces created by one direct draw device cannot be used directly by another direct draw device.'; + DDERR_NOTINITIALIZED: Result := 'An attempt was made to invoke an interface member of a DirectDraw object created by CoCreateInstance() before it was initialized.'; + else Result := 'Unrecognized Error'; + end; +end; + +{$IFDEF DIRECTDRAW_DYNAMIC_LINK} +var + DirectDrawLib: THandle = 0; + +function DirectDrawLoaded: Boolean; +begin + Result:= DirectDrawLib <> 0; +end; + +function UnLoadDirectDraw: Boolean; +begin + Result:= True; + if DirectDrawLoaded then + begin + Result:= FreeLibrary(DirectDrawLib); + + DirectDrawEnumerateA := nil; + DirectDrawEnumerateW := nil; + DirectDrawEnumerate := nil; + + DirectDrawEnumerateExA := nil; + DirectDrawEnumerateExW := nil; + DirectDrawEnumerateEx := nil; + + DirectDrawCreate := nil; + DirectDrawCreateEx := nil; + DirectDrawCreateClipper := nil; + {$IFDEF WINNT} + NtDirectDrawCreate := nil; + {$ENDIF} + + DirectDrawLib:= 0; + end; +end; + +function LoadDirectDraw: Boolean; +begin + Result:= DirectDrawLoaded; + if (not Result) then + begin + DirectDrawLib:= LoadLibrary(DirectDrawDll); + if DirectDrawLoaded then + begin + DirectDrawEnumerateA := GetProcAddress(DirectDrawLib, 'DirectDrawEnumerateA'); + DirectDrawEnumerateW := GetProcAddress(DirectDrawLib, 'DirectDrawEnumerateW'); + {$IFDEF UNICODE} + DirectDrawEnumerate := GetProcAddress(DirectDrawLib, 'DirectDrawEnumerateW'); + {$ELSE} + DirectDrawEnumerate := GetProcAddress(DirectDrawLib, 'DirectDrawEnumerateA'); + {$ENDIF} + + DirectDrawEnumerateExA := GetProcAddress(DirectDrawLib, 'DirectDrawEnumerateExA'); + DirectDrawEnumerateExW := GetProcAddress(DirectDrawLib, 'DirectDrawEnumerateExW'); + {$IFDEF UNICODE} + DirectDrawEnumerateEx := GetProcAddress(DirectDrawLib, 'DirectDrawEnumerateExW'); + {$ELSE} + DirectDrawEnumerateEx := GetProcAddress(DirectDrawLib, 'DirectDrawEnumerateExA'); + {$ENDIF} + + DirectDrawCreate := GetProcAddress(DDrawDLL,'DirectDrawCreate'); + DirectDrawCreateEx := GetProcAddress(DDrawDLL,'DirectDrawCreateEx'); + DirectDrawCreateClipper := GetProcAddress(DDrawDLL,'DirectDrawCreateClipper'); + {$IFDEF WINNT} + NtDirectDrawCreate := GetProcAddress(DDrawDLL,'NtDirectDrawCreate'); + {$ENDIF} + + Result:= Assigned(DirectDrawCreate); // At least basic procedure is found! + if not Result then UnLoadDirectDraw; + end; + end; +end; +{$ELSE} +function DirectDrawLoaded: Boolean; +begin // Stub function for static linking + Result:= True; +end; + +function UnLoadDirectDraw: Boolean; +begin // Stub function for static linking + Result:= True; // should emulate "normal" behaviour +end; + +function LoadDirectDraw: Boolean; +begin // Stub function for static linking + Result:= True; +end; + +{$ENDIF} + +{$IFDEF DIRECTDRAW_DYNAMIC_LINK} +initialization +{$IFNDEF DIRECTDRAW_DYNAMIC_LINK_EXPLICIT} + LoadDirectDraw; +{$ENDIF} +finalization + UnLoadDirectDraw; +{$ENDIF} +end. + diff --git a/Pramougolnik/DirectX.inc b/Pramougolnik/DirectX.inc new file mode 100644 index 0000000..f7f29c2 --- /dev/null +++ b/Pramougolnik/DirectX.inc @@ -0,0 +1,29 @@ +{******************************************************************************} +{ } +{ The contents of this file are subject to the Mozilla Public License Version } +{ 1.1 (the "License"); you may not use this file except in compliance with the } +{ License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ } +{ } +{ Software distributed under the License is distributed on an "AS IS" basis, } +{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for } +{ the specific language governing rights and limitations under the License. } +{ } +{ The Original Code is DirectX.inc. } +{ } +{******************************************************************************} + +// Borland compilers support +{$INCLUDE Jedix.inc} + +{$DEFINE TYPE_IDENTITY} +{$DEFINE SUPPORTS_EXCEPTIONS} + +// Additional settings +{$MINENUMSIZE 4} +{$ALIGN ON} + +{$IFDEF COMPILER7_UP} + {$WARN UNSAFE_CODE OFF} + {$WARN UNSAFE_TYPE OFF} + {$WARN UNSAFE_CAST OFF} +{$ENDIF} diff --git a/Pramougolnik/GDIPAPI.dcu b/Pramougolnik/GDIPAPI.dcu new file mode 100644 index 0000000000000000000000000000000000000000..bb2d33976350e61c07f9206ea2c14f7f808369fe GIT binary patch literal 191354 zcma%k3t&{m)&D{QBqRYscq1s{imXCG1m(lmX0u6F@*=yuv{aX5ldNoZ!zK~pt5UT- z_^?`PTR&s1B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YfTg%TU@5K-Sc>Zdmg4$= zrMNy|DXtG#it7WG;`)H4xISPht`As>>jReJ`hcalK42-X4_J!p1D4|YfTg%TU@5K- zSc>Zdmg4$=rMNy|DXz~QPd=#N`eWDyOL2X`Qd}Rf6xRnV#q|M8aecs2TpySOJ+Ktl z2Q0<)0ZVaxz*1Zv_#TYFQd}Rf6xRnV#q|M8aecs2TpzF$*9R=c^#Mz9eZW#&AFveH z2Q0<)0ZVaxz*1ZvuoTw^EXDN!OL2X`Qd}Rf6xU}@pP&LCHtGYG;`+cr&;d(veZW#& zAFveH2Q0<)foaf#MbL+3Fo1P11WR#!z*1ZvuoTw^EXDN!OL2X`Qd}Rf6xRnV#q|M8 zaecs2TpzF$*9R=c^#Mz9eZW#&AFveH2Q0<)0ZVaxz*1ZvXg!53Sc>a&*E0+%uoTw^ zEXDN!OL2X`Qd}Rf6xRoupbM7b`hcalJ}?jZU@5K-Sc>Zdmg4$=rMNy|DXtG#it7WG z;`)H4xISPht`As>>jReJ`hcalK42-X4_J!p1D4|YfTg%TU@5K-w4T8VEXDN!OL2Xm z6Kug!T%X!&BdFjg*ab^*eZW#&AFveH2Q0<)0ZVaxz*1Zv_z?799`wOdTp#!r4B;|3 zfmJX9OL2Xm^&A>#2UEBgoWo%-150szpcgD)7<{Q;xd;kh>j&y9KtN{O?=Lb!u|5Xol$sLa%>ciN-mDV6Icg5*aXMW zI)=W#Y6pYz$>~uzDY-uirzJ;7VN@QuL<(==WiWSuppressBackgroundThread is FALSE. + + {$EXTERNALSYM GdiplusStartup} + function GdiplusStartup(out token: ULONG; input: PGdiplusStartupInput; + output: PGdiplusStartupOutput): Status; stdcall; + + // GDI+ termination. Must be called before GDI+ is unloaded. + // Must not be called from DllMain - can cause deadlock. + // + // GDI+ API's may not be called after GdiplusShutdown. Pay careful attention + // to GDI+ object destructors. + + {$EXTERNALSYM GdiplusShutdown} + procedure GdiplusShutdown(token: ULONG); stdcall; + + +(**************************************************************************\ +* +* Copyright (c) 1998-2001, Microsoft Corp. All Rights Reserved. +* Module Name: +* Gdiplus Pixel Formats +* Abstract: +* GDI+ Pixel Formats +* +\**************************************************************************) + +type + PARGB = ^ARGB; + ARGB = DWORD; + {$EXTERNALSYM ARGB} + ARGB64 = Int64; + {$EXTERNALSYM ARGB64} + +const + ALPHA_SHIFT = 24; + {$EXTERNALSYM ALPHA_SHIFT} + RED_SHIFT = 16; + {$EXTERNALSYM RED_SHIFT} + GREEN_SHIFT = 8; + {$EXTERNALSYM GREEN_SHIFT} + BLUE_SHIFT = 0; + {$EXTERNALSYM BLUE_SHIFT} + ALPHA_MASK = (ARGB($ff) shl ALPHA_SHIFT); + {$EXTERNALSYM ALPHA_MASK} + + // In-memory pixel data formats: + // bits 0-7 = format index + // bits 8-15 = pixel size (in bits) + // bits 16-23 = flags + // bits 24-31 = reserved + +type + PixelFormat = Integer; + {$EXTERNALSYM PixelFormat} + TPixelFormat = PixelFormat; + +const + PixelFormatIndexed = $00010000; // Indexes into a palette + {$EXTERNALSYM PixelFormatIndexed} + PixelFormatGDI = $00020000; // Is a GDI-supported format + {$EXTERNALSYM PixelFormatGDI} + PixelFormatAlpha = $00040000; // Has an alpha component + {$EXTERNALSYM PixelFormatAlpha} + PixelFormatPAlpha = $00080000; // Pre-multiplied alpha + {$EXTERNALSYM PixelFormatPAlpha} + PixelFormatExtended = $00100000; // Extended color 16 bits/channel + {$EXTERNALSYM PixelFormatExtended} + PixelFormatCanonical = $00200000; + {$EXTERNALSYM PixelFormatCanonical} + + PixelFormatUndefined = 0; + {$EXTERNALSYM PixelFormatUndefined} + PixelFormatDontCare = 0; + {$EXTERNALSYM PixelFormatDontCare} + + PixelFormat1bppIndexed = (1 or ( 1 shl 8) or PixelFormatIndexed or PixelFormatGDI); + {$EXTERNALSYM PixelFormat1bppIndexed} + PixelFormat4bppIndexed = (2 or ( 4 shl 8) or PixelFormatIndexed or PixelFormatGDI); + {$EXTERNALSYM PixelFormat4bppIndexed} + PixelFormat8bppIndexed = (3 or ( 8 shl 8) or PixelFormatIndexed or PixelFormatGDI); + {$EXTERNALSYM PixelFormat8bppIndexed} + PixelFormat16bppGrayScale = (4 or (16 shl 8) or PixelFormatExtended); + {$EXTERNALSYM PixelFormat16bppGrayScale} + PixelFormat16bppRGB555 = (5 or (16 shl 8) or PixelFormatGDI); + {$EXTERNALSYM PixelFormat16bppRGB555} + PixelFormat16bppRGB565 = (6 or (16 shl 8) or PixelFormatGDI); + {$EXTERNALSYM PixelFormat16bppRGB565} + PixelFormat16bppARGB1555 = (7 or (16 shl 8) or PixelFormatAlpha or PixelFormatGDI); + {$EXTERNALSYM PixelFormat16bppARGB1555} + PixelFormat24bppRGB = (8 or (24 shl 8) or PixelFormatGDI); + {$EXTERNALSYM PixelFormat24bppRGB} + PixelFormat32bppRGB = (9 or (32 shl 8) or PixelFormatGDI); + {$EXTERNALSYM PixelFormat32bppRGB} + PixelFormat32bppARGB = (10 or (32 shl 8) or PixelFormatAlpha or PixelFormatGDI or PixelFormatCanonical); + {$EXTERNALSYM PixelFormat32bppARGB} + PixelFormat32bppPARGB = (11 or (32 shl 8) or PixelFormatAlpha or PixelFormatPAlpha or PixelFormatGDI); + {$EXTERNALSYM PixelFormat32bppPARGB} + PixelFormat48bppRGB = (12 or (48 shl 8) or PixelFormatExtended); + {$EXTERNALSYM PixelFormat48bppRGB} + PixelFormat64bppARGB = (13 or (64 shl 8) or PixelFormatAlpha or PixelFormatCanonical or PixelFormatExtended); + {$EXTERNALSYM PixelFormat64bppARGB} + PixelFormat64bppPARGB = (14 or (64 shl 8) or PixelFormatAlpha or PixelFormatPAlpha or PixelFormatExtended); + {$EXTERNALSYM PixelFormat64bppPARGB} + PixelFormatMax = 15; + {$EXTERNALSYM PixelFormatMax} + +{$EXTERNALSYM GetPixelFormatSize} +function GetPixelFormatSize(pixfmt: PixelFormat): UINT; +{$EXTERNALSYM IsIndexedPixelFormat} +function IsIndexedPixelFormat(pixfmt: PixelFormat): BOOL; +{$EXTERNALSYM IsAlphaPixelFormat} +function IsAlphaPixelFormat(pixfmt: PixelFormat): BOOL; +{$EXTERNALSYM IsExtendedPixelFormat} +function IsExtendedPixelFormat(pixfmt: PixelFormat): BOOL; + +//-------------------------------------------------------------------------- +// Determine if the Pixel Format is Canonical format: +// PixelFormat32bppARGB +// PixelFormat32bppPARGB +// PixelFormat64bppARGB +// PixelFormat64bppPARGB +//-------------------------------------------------------------------------- + +{$EXTERNALSYM IsCanonicalPixelFormat} +function IsCanonicalPixelFormat(pixfmt: PixelFormat): BOOL; + +{$IFDEF DELPHI6_UP} +type + {$EXTERNALSYM PaletteFlags} + PaletteFlags = ( + PaletteFlagsHasAlpha = $0001, + PaletteFlagsGrayScale = $0002, + PaletteFlagsHalftone = $0004 + ); + TPaletteFlags = PaletteFlags; +{$ELSE} +type + {$EXTERNALSYM PaletteFlags} + PaletteFlags = Integer; + const + PaletteFlagsHasAlpha = $0001; + PaletteFlagsGrayScale = $0002; + PaletteFlagsHalftone = $0004; + +type + TPaletteFlags = PaletteFlags; +{$ENDIF} + + {$EXTERNALSYM ColorPalette} + ColorPalette = packed record + Flags : UINT ; // Palette flags + Count : UINT ; // Number of color entries + Entries: array [0..0] of ARGB ; // Palette color entries + end; + + TColorPalette = ColorPalette; + PColorPalette = ^TColorPalette; + +(**************************************************************************\ +* +* GDI+ Color Object +* +\**************************************************************************) + +//---------------------------------------------------------------------------- +// Color mode +//---------------------------------------------------------------------------- + + {$EXTERNALSYM ColorMode} + ColorMode = ( + ColorModeARGB32, + ColorModeARGB64 + ); + TColorMode = ColorMode; + +//---------------------------------------------------------------------------- +// Color Channel flags +//---------------------------------------------------------------------------- + + {$EXTERNALSYM ColorChannelFlags} + ColorChannelFlags = ( + ColorChannelFlagsC, + ColorChannelFlagsM, + ColorChannelFlagsY, + ColorChannelFlagsK, + ColorChannelFlagsLast + ); + TColorChannelFlags = ColorChannelFlags; + +//---------------------------------------------------------------------------- +// Color +//---------------------------------------------------------------------------- + + // Common color constants +const + aclAliceBlue = $FFF0F8FF; + aclAntiqueWhite = $FFFAEBD7; + aclAqua = $FF00FFFF; + aclAquamarine = $FF7FFFD4; + aclAzure = $FFF0FFFF; + aclBeige = $FFF5F5DC; + aclBisque = $FFFFE4C4; + aclBlack = $FF000000; + aclBlanchedAlmond = $FFFFEBCD; + aclBlue = $FF0000FF; + aclBlueViolet = $FF8A2BE2; + aclBrown = $FFA52A2A; + aclBurlyWood = $FFDEB887; + aclCadetBlue = $FF5F9EA0; + aclChartreuse = $FF7FFF00; + aclChocolate = $FFD2691E; + aclCoral = $FFFF7F50; + aclCornflowerBlue = $FF6495ED; + aclCornsilk = $FFFFF8DC; + aclCrimson = $FFDC143C; + aclCyan = $FF00FFFF; + aclDarkBlue = $FF00008B; + aclDarkCyan = $FF008B8B; + aclDarkGoldenrod = $FFB8860B; + aclDarkGray = $FFA9A9A9; + aclDarkGreen = $FF006400; + aclDarkKhaki = $FFBDB76B; + aclDarkMagenta = $FF8B008B; + aclDarkOliveGreen = $FF556B2F; + aclDarkOrange = $FFFF8C00; + aclDarkOrchid = $FF9932CC; + aclDarkRed = $FF8B0000; + aclDarkSalmon = $FFE9967A; + aclDarkSeaGreen = $FF8FBC8B; + aclDarkSlateBlue = $FF483D8B; + aclDarkSlateGray = $FF2F4F4F; + aclDarkTurquoise = $FF00CED1; + aclDarkViolet = $FF9400D3; + aclDeepPink = $FFFF1493; + aclDeepSkyBlue = $FF00BFFF; + aclDimGray = $FF696969; + aclDodgerBlue = $FF1E90FF; + aclFirebrick = $FFB22222; + aclFloralWhite = $FFFFFAF0; + aclForestGreen = $FF228B22; + aclFuchsia = $FFFF00FF; + aclGainsboro = $FFDCDCDC; + aclGhostWhite = $FFF8F8FF; + aclGold = $FFFFD700; + aclGoldenrod = $FFDAA520; + aclGray = $FF808080; + aclGreen = $FF008000; + aclGreenYellow = $FFADFF2F; + aclHoneydew = $FFF0FFF0; + aclHotPink = $FFFF69B4; + aclIndianRed = $FFCD5C5C; + aclIndigo = $FF4B0082; + aclIvory = $FFFFFFF0; + aclKhaki = $FFF0E68C; + aclLavender = $FFE6E6FA; + aclLavenderBlush = $FFFFF0F5; + aclLawnGreen = $FF7CFC00; + aclLemonChiffon = $FFFFFACD; + aclLightBlue = $FFADD8E6; + aclLightCoral = $FFF08080; + aclLightCyan = $FFE0FFFF; + aclLightGoldenrodYellow = $FFFAFAD2; + aclLightGray = $FFD3D3D3; + aclLightGreen = $FF90EE90; + aclLightPink = $FFFFB6C1; + aclLightSalmon = $FFFFA07A; + aclLightSeaGreen = $FF20B2AA; + aclLightSkyBlue = $FF87CEFA; + aclLightSlateGray = $FF778899; + aclLightSteelBlue = $FFB0C4DE; + aclLightYellow = $FFFFFFE0; + aclLime = $FF00FF00; + aclLimeGreen = $FF32CD32; + aclLinen = $FFFAF0E6; + aclMagenta = $FFFF00FF; + aclMaroon = $FF800000; + aclMediumAquamarine = $FF66CDAA; + aclMediumBlue = $FF0000CD; + aclMediumOrchid = $FFBA55D3; + aclMediumPurple = $FF9370DB; + aclMediumSeaGreen = $FF3CB371; + aclMediumSlateBlue = $FF7B68EE; + aclMediumSpringGreen = $FF00FA9A; + aclMediumTurquoise = $FF48D1CC; + aclMediumVioletRed = $FFC71585; + aclMidnightBlue = $FF191970; + aclMintCream = $FFF5FFFA; + aclMistyRose = $FFFFE4E1; + aclMoccasin = $FFFFE4B5; + aclNavajoWhite = $FFFFDEAD; + aclNavy = $FF000080; + aclOldLace = $FFFDF5E6; + aclOlive = $FF808000; + aclOliveDrab = $FF6B8E23; + aclOrange = $FFFFA500; + aclOrangeRed = $FFFF4500; + aclOrchid = $FFDA70D6; + aclPaleGoldenrod = $FFEEE8AA; + aclPaleGreen = $FF98FB98; + aclPaleTurquoise = $FFAFEEEE; + aclPaleVioletRed = $FFDB7093; + aclPapayaWhip = $FFFFEFD5; + aclPeachPuff = $FFFFDAB9; + aclPeru = $FFCD853F; + aclPink = $FFFFC0CB; + aclPlum = $FFDDA0DD; + aclPowderBlue = $FFB0E0E6; + aclPurple = $FF800080; + aclRed = $FFFF0000; + aclRosyBrown = $FFBC8F8F; + aclRoyalBlue = $FF4169E1; + aclSaddleBrown = $FF8B4513; + aclSalmon = $FFFA8072; + aclSandyBrown = $FFF4A460; + aclSeaGreen = $FF2E8B57; + aclSeaShell = $FFFFF5EE; + aclSienna = $FFA0522D; + aclSilver = $FFC0C0C0; + aclSkyBlue = $FF87CEEB; + aclSlateBlue = $FF6A5ACD; + aclSlateGray = $FF708090; + aclSnow = $FFFFFAFA; + aclSpringGreen = $FF00FF7F; + aclSteelBlue = $FF4682B4; + aclTan = $FFD2B48C; + aclTeal = $FF008080; + aclThistle = $FFD8BFD8; + aclTomato = $FFFF6347; + aclTransparent = $00FFFFFF; + aclTurquoise = $FF40E0D0; + aclViolet = $FFEE82EE; + aclWheat = $FFF5DEB3; + aclWhite = $FFFFFFFF; + aclWhiteSmoke = $FFF5F5F5; + aclYellow = $FFFFFF00; + aclYellowGreen = $FF9ACD32; + + // Shift count and bit mask for A, R, G, B components + AlphaShift = 24; + {$EXTERNALSYM AlphaShift} + RedShift = 16; + {$EXTERNALSYM RedShift} + GreenShift = 8; + {$EXTERNALSYM GreenShift} + BlueShift = 0; + {$EXTERNALSYM BlueShift} + + AlphaMask = $ff000000; + {$EXTERNALSYM AlphaMask} + RedMask = $00ff0000; + {$EXTERNALSYM RedMask} + GreenMask = $0000ff00; + {$EXTERNALSYM GreenMask} + BlueMask = $000000ff; + {$EXTERNALSYM BlueMask} + + +type +{ TGPColor = class + protected + Argb: ARGB; + public + constructor Create; overload; + constructor Create(r, g, b: Byte); overload; + constructor Create(a, r, g, b: Byte); overload; + constructor Create(Value: ARGB); overload; + function GetAlpha: BYTE; + function GetA: BYTE; + function GetRed: BYTE; + function GetR: BYTE; + function GetGreen: Byte; + function GetG: Byte; + function GetBlue: Byte; + function GetB: Byte; + function GetValue: ARGB; + procedure SetValue(Value: ARGB); + procedure SetFromCOLORREF(rgb: COLORREF); + function ToCOLORREF: COLORREF; + function MakeARGB(a, r, g, b: Byte): ARGB; + end; } + + PGPColor = ^TGPColor; + TGPColor = ARGB; + TColorDynArray = array of TGPColor; + + function MakeColor(r, g, b: Byte): ARGB; overload; + function MakeColor(a, r, g, b: Byte): ARGB; overload; + function GetAlpha(color: ARGB): BYTE; + function GetRed(color: ARGB): BYTE; + function GetGreen(color: ARGB): BYTE; + function GetBlue(color: ARGB): BYTE; + function ColorRefToARGB(rgb: COLORREF): ARGB; + function ARGBToColorRef(Color: ARGB): COLORREF; + + +(**************************************************************************\ +* +* GDI+ Metafile Related Structures +* +\**************************************************************************) + +type + { from Windef.h } + RECTL = Windows.TRect; + SIZEL = Windows.TSize; + + {$EXTERNALSYM ENHMETAHEADER3} + ENHMETAHEADER3 = packed record + iType : DWORD; // Record type EMR_HEADER + nSize : DWORD; // Record size in bytes. This may be greater + // than the sizeof(ENHMETAHEADER). + rclBounds : RECTL; // Inclusive-inclusive bounds in device units + rclFrame : RECTL; // Inclusive-inclusive Picture Frame .01mm unit + dSignature : DWORD; // Signature. Must be ENHMETA_SIGNATURE. + nVersion : DWORD; // Version number + nBytes : DWORD; // Size of the metafile in bytes + nRecords : DWORD; // Number of records in the metafile + nHandles : WORD; // Number of handles in the handle table + // Handle index zero is reserved. + sReserved : WORD; // Reserved. Must be zero. + nDescription : DWORD; // Number of chars in the unicode desc string + // This is 0 if there is no description string + offDescription : DWORD; // Offset to the metafile description record. + // This is 0 if there is no description string + nPalEntries : DWORD; // Number of entries in the metafile palette. + szlDevice : SIZEL; // Size of the reference device in pels + szlMillimeters : SIZEL; // Size of the reference device in millimeters + end; + TENHMETAHEADER3 = ENHMETAHEADER3; + PENHMETAHEADER3 = ^TENHMETAHEADER3; + + // Placeable WMFs + + // Placeable Metafiles were created as a non-standard way of specifying how + // a metafile is mapped and scaled on an output device. + // Placeable metafiles are quite wide-spread, but not directly supported by + // the Windows API. To playback a placeable metafile using the Windows API, + // you will first need to strip the placeable metafile header from the file. + // This is typically performed by copying the metafile to a temporary file + // starting at file offset 22 (0x16). The contents of the temporary file may + // then be used as input to the Windows GetMetaFile(), PlayMetaFile(), + // CopyMetaFile(), etc. GDI functions. + + // Each placeable metafile begins with a 22-byte header, + // followed by a standard metafile: + + {$EXTERNALSYM PWMFRect16} + PWMFRect16 = packed record + Left : INT16; + Top : INT16; + Right : INT16; + Bottom : INT16; + end; + TPWMFRect16 = PWMFRect16; + PPWMFRect16 = ^TPWMFRect16; + + {$EXTERNALSYM WmfPlaceableFileHeader} + WmfPlaceableFileHeader = packed record + Key : UINT32; // GDIP_WMF_PLACEABLEKEY + Hmf : INT16; // Metafile HANDLE number (always 0) + BoundingBox : PWMFRect16; // Coordinates in metafile units + Inch : INT16; // Number of metafile units per inch + Reserved : UINT32; // Reserved (always 0) + Checksum : INT16; // Checksum value for previous 10 WORDs + end; + TWmfPlaceableFileHeader = WmfPlaceableFileHeader; + PWmfPlaceableFileHeader = ^TWmfPlaceableFileHeader; + + // Key contains a special identification value that indicates the presence + // of a placeable metafile header and is always 0x9AC6CDD7. + + // Handle is used to stored the handle of the metafile in memory. When written + // to disk, this field is not used and will always contains the value 0. + + // Left, Top, Right, and Bottom contain the coordinates of the upper-left + // and lower-right corners of the image on the output device. These are + // measured in twips. + + // A twip (meaning "twentieth of a point") is the logical unit of measurement + // used in Windows Metafiles. A twip is equal to 1/1440 of an inch. Thus 720 + // twips equal 1/2 inch, while 32,768 twips is 22.75 inches. + + // Inch contains the number of twips per inch used to represent the image. + // Normally, there are 1440 twips per inch; however, this number may be + // changed to scale the image. A value of 720 indicates that the image is + // double its normal size, or scaled to a factor of 2:1. A value of 360 + // indicates a scale of 4:1, while a value of 2880 indicates that the image + // is scaled down in size by a factor of two. A value of 1440 indicates + // a 1:1 scale ratio. + + // Reserved is not used and is always set to 0. + + // Checksum contains a checksum value for the previous 10 WORDs in the header. + // This value can be used in an attempt to detect if the metafile has become + // corrupted. The checksum is calculated by XORing each WORD value to an + // initial value of 0. + + // If the metafile was recorded with a reference Hdc that was a display. + +const + GDIP_EMFPLUSFLAGS_DISPLAY = $00000001; + {$EXTERNALSYM GDIP_EMFPLUSFLAGS_DISPLAY} + +type + TMetafileHeader = packed class + public + Type_ : TMetafileType; + Size : UINT; // Size of the metafile (in bytes) + Version : UINT; // EMF+, EMF, or WMF version + EmfPlusFlags : UINT; + DpiX : Single; + DpiY : Single; + X : Integer; // Bounds in device units + Y : Integer; + Width : Integer; + Height : Integer; + Header : record + case integer of + 0: (WmfHeader: TMETAHEADER;); + 1: (EmfHeader: TENHMETAHEADER3); + end; + EmfPlusHeaderSize : Integer; // size of the EMF+ header in file + LogicalDpiX : Integer; // Logical Dpi of reference Hdc + LogicalDpiY : Integer; // usually valid only for EMF+ + public + property GetType: TMetafileType read Type_; + property GetMetafileSize: UINT read Size; + // If IsEmfPlus, this is the EMF+ version; else it is the WMF or EMF ver + property GetVersion: UINT read Version; + // Get the EMF+ flags associated with the metafile + property GetEmfPlusFlags: UINT read EmfPlusFlags; + property GetDpiX: Single read DpiX; + property GetDpiY: Single read DpiY; + procedure GetBounds(out Rect: TGPRect); + // Is it any type of WMF (standard or Placeable Metafile)? + function IsWmf: BOOL; + // Is this an Placeable Metafile? + function IsWmfPlaceable: BOOL; + // Is this an EMF (not an EMF+)? + function IsEmf: BOOL; + // Is this an EMF or EMF+ file? + function IsEmfOrEmfPlus: BOOL; + // Is this an EMF+ file? + function IsEmfPlus: BOOL; + // Is this an EMF+ dual (has dual, down-level records) file? + function IsEmfPlusDual: BOOL; + // Is this an EMF+ only (no dual records) file? + function IsEmfPlusOnly: BOOL; + // If it's an EMF+ file, was it recorded against a display Hdc? + function IsDisplay: BOOL; + // Get the WMF header of the metafile (if it is a WMF) + function GetWmfHeader: PMetaHeader; + // Get the EMF header of the metafile (if it is an EMF) + function GetEmfHeader: PENHMETAHEADER3; + end; + +(**************************************************************************\ +* +* GDI+ Imaging GUIDs +* +\**************************************************************************) + +//--------------------------------------------------------------------------- +// Image file format identifiers +//--------------------------------------------------------------------------- + +const + ImageFormatUndefined : TGUID = '{b96b3ca9-0728-11d3-9d7b-0000f81ef32e}'; + {$EXTERNALSYM ImageFormatUndefined} + ImageFormatMemoryBMP : TGUID = '{b96b3caa-0728-11d3-9d7b-0000f81ef32e}'; + {$EXTERNALSYM ImageFormatMemoryBMP} + ImageFormatBMP : TGUID = '{b96b3cab-0728-11d3-9d7b-0000f81ef32e}'; + {$EXTERNALSYM ImageFormatBMP} + ImageFormatEMF : TGUID = '{b96b3cac-0728-11d3-9d7b-0000f81ef32e}'; + {$EXTERNALSYM ImageFormatEMF} + ImageFormatWMF : TGUID = '{b96b3cad-0728-11d3-9d7b-0000f81ef32e}'; + {$EXTERNALSYM ImageFormatWMF} + ImageFormatJPEG : TGUID = '{b96b3cae-0728-11d3-9d7b-0000f81ef32e}'; + {$EXTERNALSYM ImageFormatJPEG} + ImageFormatPNG : TGUID = '{b96b3caf-0728-11d3-9d7b-0000f81ef32e}'; + {$EXTERNALSYM ImageFormatPNG} + ImageFormatGIF : TGUID = '{b96b3cb0-0728-11d3-9d7b-0000f81ef32e}'; + {$EXTERNALSYM ImageFormatGIF} + ImageFormatTIFF : TGUID = '{b96b3cb1-0728-11d3-9d7b-0000f81ef32e}'; + {$EXTERNALSYM ImageFormatTIFF} + ImageFormatEXIF : TGUID = '{b96b3cb2-0728-11d3-9d7b-0000f81ef32e}'; + {$EXTERNALSYM ImageFormatEXIF} + ImageFormatIcon : TGUID = '{b96b3cb5-0728-11d3-9d7b-0000f81ef32e}'; + {$EXTERNALSYM ImageFormatIcon} + +//--------------------------------------------------------------------------- +// Predefined multi-frame dimension IDs +//--------------------------------------------------------------------------- + + FrameDimensionTime : TGUID = '{6aedbd6d-3fb5-418a-83a6-7f45229dc872}'; + {$EXTERNALSYM FrameDimensionTime} + FrameDimensionResolution : TGUID = '{84236f7b-3bd3-428f-8dab-4ea1439ca315}'; + {$EXTERNALSYM FrameDimensionResolution} + FrameDimensionPage : TGUID = '{7462dc86-6180-4c7e-8e3f-ee7333a7a483}'; + {$EXTERNALSYM FrameDimensionPage} + +//--------------------------------------------------------------------------- +// Property sets +//--------------------------------------------------------------------------- + + FormatIDImageInformation : TGUID = '{e5836cbe-5eef-4f1d-acde-ae4c43b608ce}'; + {$EXTERNALSYM FormatIDImageInformation} + FormatIDJpegAppHeaders : TGUID = '{1c4afdcd-6177-43cf-abc7-5f51af39ee85}'; + {$EXTERNALSYM FormatIDJpegAppHeaders} + +//--------------------------------------------------------------------------- +// Encoder parameter sets +//--------------------------------------------------------------------------- + + EncoderCompression : TGUID = '{e09d739d-ccd4-44ee-8eba-3fbf8be4fc58}'; + {$EXTERNALSYM EncoderCompression} + EncoderColorDepth : TGUID = '{66087055-ad66-4c7c-9a18-38a2310b8337}'; + {$EXTERNALSYM EncoderColorDepth} + EncoderScanMethod : TGUID = '{3a4e2661-3109-4e56-8536-42c156e7dcfa}'; + {$EXTERNALSYM EncoderScanMethod} + EncoderVersion : TGUID = '{24d18c76-814a-41a4-bf53-1c219cccf797}'; + {$EXTERNALSYM EncoderVersion} + EncoderRenderMethod : TGUID = '{6d42c53a-229a-4825-8bb7-5c99e2b9a8b8}'; + {$EXTERNALSYM EncoderRenderMethod} + EncoderQuality : TGUID = '{1d5be4b5-fa4a-452d-9cdd-5db35105e7eb}'; + {$EXTERNALSYM EncoderQuality} + EncoderTransformation : TGUID = '{8d0eb2d1-a58e-4ea8-aa14-108074b7b6f9}'; + {$EXTERNALSYM EncoderTransformation} + EncoderLuminanceTable : TGUID = '{edb33bce-0266-4a77-b904-27216099e717}'; + {$EXTERNALSYM EncoderLuminanceTable} + EncoderChrominanceTable : TGUID = '{f2e455dc-09b3-4316-8260-676ada32481c}'; + {$EXTERNALSYM EncoderChrominanceTable} + EncoderSaveFlag : TGUID = '{292266fc-ac40-47bf-8cfc-a85b89a655de}'; + {$EXTERNALSYM EncoderSaveFlag} + + CodecIImageBytes : TGUID = '{025d1823-6c7d-447b-bbdb-a3cbc3dfa2fc}'; + {$EXTERNALSYM CodecIImageBytes} + +type + {$EXTERNALSYM IImageBytes} + IImageBytes = Interface(IUnknown) + ['{025D1823-6C7D-447B-BBDB-A3CBC3DFA2FC}'] + // Return total number of bytes in the IStream + function CountBytes(out pcb: UINT): HRESULT; stdcall; + // Locks "cb" bytes, starting from "ulOffset" in the stream, and returns the + // pointer to the beginning of the locked memory chunk in "ppvBytes" + function LockBytes(cb: UINT; ulOffset: ULONG; out ppvBytes: pointer): HRESULT; stdcall; + // Unlocks "cb" bytes, pointed by "pvBytes", starting from "ulOffset" in the + // stream + function UnlockBytes(pvBytes: pointer; cb: UINT; ulOffset: ULONG): HRESULT; stdcall; + end; + +//-------------------------------------------------------------------------- +// ImageCodecInfo structure +//-------------------------------------------------------------------------- + + {$EXTERNALSYM ImageCodecInfo} + ImageCodecInfo = packed record + Clsid : TGUID; + FormatID : TGUID; + CodecName : PWCHAR; + DllName : PWCHAR; + FormatDescription : PWCHAR; + FilenameExtension : PWCHAR; + MimeType : PWCHAR; + Flags : DWORD; + Version : DWORD; + SigCount : DWORD; + SigSize : DWORD; + SigPattern : PBYTE; + SigMask : PBYTE; + end; + TImageCodecInfo = ImageCodecInfo; + PImageCodecInfo = ^TImageCodecInfo; + +//-------------------------------------------------------------------------- +// Information flags about image codecs +//-------------------------------------------------------------------------- +{$IFDEF DELPHI6_UP} + {$EXTERNALSYM ImageCodecFlags} + ImageCodecFlags = ( + ImageCodecFlagsEncoder = $00000001, + ImageCodecFlagsDecoder = $00000002, + ImageCodecFlagsSupportBitmap = $00000004, + ImageCodecFlagsSupportVector = $00000008, + ImageCodecFlagsSeekableEncode = $00000010, + ImageCodecFlagsBlockingDecode = $00000020, + + ImageCodecFlagsBuiltin = $00010000, + ImageCodecFlagsSystem = $00020000, + ImageCodecFlagsUser = $00040000 + ); + TImageCodecFlags = ImageCodecFlags; +{$ELSE} + {$EXTERNALSYM ImageCodecFlags} + ImageCodecFlags = Integer; + const + ImageCodecFlagsEncoder = $00000001; + ImageCodecFlagsDecoder = $00000002; + ImageCodecFlagsSupportBitmap = $00000004; + ImageCodecFlagsSupportVector = $00000008; + ImageCodecFlagsSeekableEncode = $00000010; + ImageCodecFlagsBlockingDecode = $00000020; + + ImageCodecFlagsBuiltin = $00010000; + ImageCodecFlagsSystem = $00020000; + ImageCodecFlagsUser = $00040000; + +type + TImageCodecFlags = ImageCodecFlags; +{$ENDIF} +//--------------------------------------------------------------------------- +// Access modes used when calling Image::LockBits +//--------------------------------------------------------------------------- + + {$EXTERNALSYM ImageLockMode} + ImageLockMode = Integer; + const + ImageLockModeRead = $0001; + ImageLockModeWrite = $0002; + ImageLockModeUserInputBuf = $0004; +type + TImageLockMode = ImageLockMode; + +//--------------------------------------------------------------------------- +// Information about image pixel data +//--------------------------------------------------------------------------- + + {$EXTERNALSYM BitmapData} + BitmapData = packed record + Width : UINT; + Height : UINT; + Stride : Integer; + PixelFormat : PixelFormat; + Scan0 : Pointer; + Reserved : UINT; + end; + TBitmapData = BitmapData; + PBitmapData = ^TBitmapData; + +//--------------------------------------------------------------------------- +// Image flags +//--------------------------------------------------------------------------- +{$IFDEF DELPHI6_UP} + {$EXTERNALSYM ImageFlags} + ImageFlags = ( + ImageFlagsNone = 0, + + // Low-word: shared with SINKFLAG_x + + ImageFlagsScalable = $0001, + ImageFlagsHasAlpha = $0002, + ImageFlagsHasTranslucent = $0004, + ImageFlagsPartiallyScalable = $0008, + + // Low-word: color space definition + + ImageFlagsColorSpaceRGB = $0010, + ImageFlagsColorSpaceCMYK = $0020, + ImageFlagsColorSpaceGRAY = $0040, + ImageFlagsColorSpaceYCBCR = $0080, + ImageFlagsColorSpaceYCCK = $0100, + + // Low-word: image size info + + ImageFlagsHasRealDPI = $1000, + ImageFlagsHasRealPixelSize = $2000, + + // High-word + + ImageFlagsReadOnly = $00010000, + ImageFlagsCaching = $00020000 + ); + TImageFlags = ImageFlags; +{$ELSE} + {$EXTERNALSYM ImageFlags} + ImageFlags = Integer; + const + ImageFlagsNone = 0; + + // Low-word: shared with SINKFLAG_x + + ImageFlagsScalable = $0001; + ImageFlagsHasAlpha = $0002; + ImageFlagsHasTranslucent = $0004; + ImageFlagsPartiallyScalable = $0008; + + // Low-word: color space definition + + ImageFlagsColorSpaceRGB = $0010; + ImageFlagsColorSpaceCMYK = $0020; + ImageFlagsColorSpaceGRAY = $0040; + ImageFlagsColorSpaceYCBCR = $0080; + ImageFlagsColorSpaceYCCK = $0100; + + // Low-word: image size info + + ImageFlagsHasRealDPI = $1000; + ImageFlagsHasRealPixelSize = $2000; + + // High-word + + ImageFlagsReadOnly = $00010000; + ImageFlagsCaching = $00020000; + +type + TImageFlags = ImageFlags; +{$ENDIF} + + +{$IFDEF DELPHI6_UP} + {$EXTERNALSYM RotateFlipType} + RotateFlipType = ( + RotateNoneFlipNone = 0, + Rotate90FlipNone = 1, + Rotate180FlipNone = 2, + Rotate270FlipNone = 3, + + RotateNoneFlipX = 4, + Rotate90FlipX = 5, + Rotate180FlipX = 6, + Rotate270FlipX = 7, + + RotateNoneFlipY = Rotate180FlipX, + Rotate90FlipY = Rotate270FlipX, + Rotate180FlipY = RotateNoneFlipX, + Rotate270FlipY = Rotate90FlipX, + + RotateNoneFlipXY = Rotate180FlipNone, + Rotate90FlipXY = Rotate270FlipNone, + Rotate180FlipXY = RotateNoneFlipNone, + Rotate270FlipXY = Rotate90FlipNone + ); + TRotateFlipType = RotateFlipType; +{$ELSE} + {$EXTERNALSYM RotateFlipType} + RotateFlipType = ( + RotateNoneFlipNone, // = 0, + Rotate90FlipNone, // = 1, + Rotate180FlipNone, // = 2, + Rotate270FlipNone, // = 3, + + RotateNoneFlipX, // = 4, + Rotate90FlipX, // = 5, + Rotate180FlipX, // = 6, + Rotate270FlipX // = 7, + ); + const + RotateNoneFlipY = Rotate180FlipX; + Rotate90FlipY = Rotate270FlipX; + Rotate180FlipY = RotateNoneFlipX; + Rotate270FlipY = Rotate90FlipX; + + RotateNoneFlipXY = Rotate180FlipNone; + Rotate90FlipXY = Rotate270FlipNone; + Rotate180FlipXY = RotateNoneFlipNone; + Rotate270FlipXY = Rotate90FlipNone; + +type + TRotateFlipType = RotateFlipType; +{$ENDIF} + +//--------------------------------------------------------------------------- +// Encoder Parameter structure +//--------------------------------------------------------------------------- + + {$EXTERNALSYM EncoderParameter} + EncoderParameter = packed record + Guid : TGUID; // GUID of the parameter + NumberOfValues : ULONG; // Number of the parameter values + Type_ : ULONG; // Value type, like ValueTypeLONG etc. + Value : Pointer; // A pointer to the parameter values + end; + TEncoderParameter = EncoderParameter; + PEncoderParameter = ^TEncoderParameter; + +//--------------------------------------------------------------------------- +// Encoder Parameters structure +//--------------------------------------------------------------------------- + + {$EXTERNALSYM EncoderParameters} + EncoderParameters = packed record + Count : UINT; // Number of parameters in this structure + Parameter : array[0..0] of TEncoderParameter; // Parameter values + end; + TEncoderParameters = EncoderParameters; + PEncoderParameters = ^TEncoderParameters; + +//--------------------------------------------------------------------------- +// Property Item +//--------------------------------------------------------------------------- + + {$EXTERNALSYM PropertyItem} + PropertyItem = record // NOT PACKED !! + id : PROPID; // ID of this property + length : ULONG; // Length of the property value, in bytes + type_ : WORD; // Type of the value, as one of TAG_TYPE_XXX + value : Pointer; // property value + end; + TPropertyItem = PropertyItem; + PPropertyItem = ^TPropertyItem; + +//--------------------------------------------------------------------------- +// Image property types +//--------------------------------------------------------------------------- + +const + PropertyTagTypeByte : Integer = 1; + {$EXTERNALSYM PropertyTagTypeByte} + PropertyTagTypeASCII : Integer = 2; + {$EXTERNALSYM PropertyTagTypeASCII} + PropertyTagTypeShort : Integer = 3; + {$EXTERNALSYM PropertyTagTypeShort} + PropertyTagTypeLong : Integer = 4; + {$EXTERNALSYM PropertyTagTypeLong} + PropertyTagTypeRational : Integer = 5; + {$EXTERNALSYM PropertyTagTypeRational} + PropertyTagTypeUndefined : Integer = 7; + {$EXTERNALSYM PropertyTagTypeUndefined} + PropertyTagTypeSLONG : Integer = 9; + {$EXTERNALSYM PropertyTagTypeSLONG} + PropertyTagTypeSRational : Integer = 10; + {$EXTERNALSYM PropertyTagTypeSRational} + +//--------------------------------------------------------------------------- +// Image property ID tags +//--------------------------------------------------------------------------- + + PropertyTagExifIFD = $8769; + {$EXTERNALSYM PropertyTagExifIFD} + PropertyTagGpsIFD = $8825; + {$EXTERNALSYM PropertyTagGpsIFD} + + PropertyTagNewSubfileType = $00FE; + {$EXTERNALSYM PropertyTagNewSubfileType} + PropertyTagSubfileType = $00FF; + {$EXTERNALSYM PropertyTagSubfileType} + PropertyTagImageWidth = $0100; + {$EXTERNALSYM PropertyTagImageWidth} + PropertyTagImageHeight = $0101; + {$EXTERNALSYM PropertyTagImageHeight} + PropertyTagBitsPerSample = $0102; + {$EXTERNALSYM PropertyTagBitsPerSample} + PropertyTagCompression = $0103; + {$EXTERNALSYM PropertyTagCompression} + PropertyTagPhotometricInterp = $0106; + {$EXTERNALSYM PropertyTagPhotometricInterp} + PropertyTagThreshHolding = $0107; + {$EXTERNALSYM PropertyTagThreshHolding} + PropertyTagCellWidth = $0108; + {$EXTERNALSYM PropertyTagCellWidth} + PropertyTagCellHeight = $0109; + {$EXTERNALSYM PropertyTagCellHeight} + PropertyTagFillOrder = $010A; + {$EXTERNALSYM PropertyTagFillOrder} + PropertyTagDocumentName = $010D; + {$EXTERNALSYM PropertyTagDocumentName} + PropertyTagImageDescription = $010E; + {$EXTERNALSYM PropertyTagImageDescription} + PropertyTagEquipMake = $010F; + {$EXTERNALSYM PropertyTagEquipMake} + PropertyTagEquipModel = $0110; + {$EXTERNALSYM PropertyTagEquipModel} + PropertyTagStripOffsets = $0111; + {$EXTERNALSYM PropertyTagStripOffsets} + PropertyTagOrientation = $0112; + {$EXTERNALSYM PropertyTagOrientation} + PropertyTagSamplesPerPixel = $0115; + {$EXTERNALSYM PropertyTagSamplesPerPixel} + PropertyTagRowsPerStrip = $0116; + {$EXTERNALSYM PropertyTagRowsPerStrip} + PropertyTagStripBytesCount = $0117; + {$EXTERNALSYM PropertyTagStripBytesCount} + PropertyTagMinSampleValue = $0118; + {$EXTERNALSYM PropertyTagMinSampleValue} + PropertyTagMaxSampleValue = $0119; + {$EXTERNALSYM PropertyTagMaxSampleValue} + PropertyTagXResolution = $011A; // Image resolution in width direction + {$EXTERNALSYM PropertyTagXResolution} + PropertyTagYResolution = $011B; // Image resolution in height direction + {$EXTERNALSYM PropertyTagYResolution} + PropertyTagPlanarConfig = $011C; // Image data arrangement + {$EXTERNALSYM PropertyTagPlanarConfig} + PropertyTagPageName = $011D; + {$EXTERNALSYM PropertyTagPageName} + PropertyTagXPosition = $011E; + {$EXTERNALSYM PropertyTagXPosition} + PropertyTagYPosition = $011F; + {$EXTERNALSYM PropertyTagYPosition} + PropertyTagFreeOffset = $0120; + {$EXTERNALSYM PropertyTagFreeOffset} + PropertyTagFreeByteCounts = $0121; + {$EXTERNALSYM PropertyTagFreeByteCounts} + PropertyTagGrayResponseUnit = $0122; + {$EXTERNALSYM PropertyTagGrayResponseUnit} + PropertyTagGrayResponseCurve = $0123; + {$EXTERNALSYM PropertyTagGrayResponseCurve} + PropertyTagT4Option = $0124; + {$EXTERNALSYM PropertyTagT4Option} + PropertyTagT6Option = $0125; + {$EXTERNALSYM PropertyTagT6Option} + PropertyTagResolutionUnit = $0128; // Unit of X and Y resolution + {$EXTERNALSYM PropertyTagResolutionUnit} + PropertyTagPageNumber = $0129; + {$EXTERNALSYM PropertyTagPageNumber} + PropertyTagTransferFuncition = $012D; + {$EXTERNALSYM PropertyTagTransferFuncition} + PropertyTagSoftwareUsed = $0131; + {$EXTERNALSYM PropertyTagSoftwareUsed} + PropertyTagDateTime = $0132; + {$EXTERNALSYM PropertyTagDateTime} + PropertyTagArtist = $013B; + {$EXTERNALSYM PropertyTagArtist} + PropertyTagHostComputer = $013C; + {$EXTERNALSYM PropertyTagHostComputer} + PropertyTagPredictor = $013D; + {$EXTERNALSYM PropertyTagPredictor} + PropertyTagWhitePoint = $013E; + {$EXTERNALSYM PropertyTagWhitePoint} + PropertyTagPrimaryChromaticities = $013F; + {$EXTERNALSYM PropertyTagPrimaryChromaticities} + PropertyTagColorMap = $0140; + {$EXTERNALSYM PropertyTagColorMap} + PropertyTagHalftoneHints = $0141; + {$EXTERNALSYM PropertyTagHalftoneHints} + PropertyTagTileWidth = $0142; + {$EXTERNALSYM PropertyTagTileWidth} + PropertyTagTileLength = $0143; + {$EXTERNALSYM PropertyTagTileLength} + PropertyTagTileOffset = $0144; + {$EXTERNALSYM PropertyTagTileOffset} + PropertyTagTileByteCounts = $0145; + {$EXTERNALSYM PropertyTagTileByteCounts} + PropertyTagInkSet = $014C; + {$EXTERNALSYM PropertyTagInkSet} + PropertyTagInkNames = $014D; + {$EXTERNALSYM PropertyTagInkNames} + PropertyTagNumberOfInks = $014E; + {$EXTERNALSYM PropertyTagNumberOfInks} + PropertyTagDotRange = $0150; + {$EXTERNALSYM PropertyTagDotRange} + PropertyTagTargetPrinter = $0151; + {$EXTERNALSYM PropertyTagTargetPrinter} + PropertyTagExtraSamples = $0152; + {$EXTERNALSYM PropertyTagExtraSamples} + PropertyTagSampleFormat = $0153; + {$EXTERNALSYM PropertyTagSampleFormat} + PropertyTagSMinSampleValue = $0154; + {$EXTERNALSYM PropertyTagSMinSampleValue} + PropertyTagSMaxSampleValue = $0155; + {$EXTERNALSYM PropertyTagSMaxSampleValue} + PropertyTagTransferRange = $0156; + {$EXTERNALSYM PropertyTagTransferRange} + + PropertyTagJPEGProc = $0200; + {$EXTERNALSYM PropertyTagJPEGProc} + PropertyTagJPEGInterFormat = $0201; + {$EXTERNALSYM PropertyTagJPEGInterFormat} + PropertyTagJPEGInterLength = $0202; + {$EXTERNALSYM PropertyTagJPEGInterLength} + PropertyTagJPEGRestartInterval = $0203; + {$EXTERNALSYM PropertyTagJPEGRestartInterval} + PropertyTagJPEGLosslessPredictors = $0205; + {$EXTERNALSYM PropertyTagJPEGLosslessPredictors} + PropertyTagJPEGPointTransforms = $0206; + {$EXTERNALSYM PropertyTagJPEGPointTransforms} + PropertyTagJPEGQTables = $0207; + {$EXTERNALSYM PropertyTagJPEGQTables} + PropertyTagJPEGDCTables = $0208; + {$EXTERNALSYM PropertyTagJPEGDCTables} + PropertyTagJPEGACTables = $0209; + {$EXTERNALSYM PropertyTagJPEGACTables} + + PropertyTagYCbCrCoefficients = $0211; + {$EXTERNALSYM PropertyTagYCbCrCoefficients} + PropertyTagYCbCrSubsampling = $0212; + {$EXTERNALSYM PropertyTagYCbCrSubsampling} + PropertyTagYCbCrPositioning = $0213; + {$EXTERNALSYM PropertyTagYCbCrPositioning} + PropertyTagREFBlackWhite = $0214; + {$EXTERNALSYM PropertyTagREFBlackWhite} + + PropertyTagICCProfile = $8773; // This TAG is defined by ICC + {$EXTERNALSYM PropertyTagICCProfile} + // for embedded ICC in TIFF + PropertyTagGamma = $0301; + {$EXTERNALSYM PropertyTagGamma} + PropertyTagICCProfileDescriptor = $0302; + {$EXTERNALSYM PropertyTagICCProfileDescriptor} + PropertyTagSRGBRenderingIntent = $0303; + {$EXTERNALSYM PropertyTagSRGBRenderingIntent} + + PropertyTagImageTitle = $0320; + {$EXTERNALSYM PropertyTagImageTitle} + PropertyTagCopyright = $8298; + {$EXTERNALSYM PropertyTagCopyright} + +// Extra TAGs (Like Adobe Image Information tags etc.) + + PropertyTagResolutionXUnit = $5001; + {$EXTERNALSYM PropertyTagResolutionXUnit} + PropertyTagResolutionYUnit = $5002; + {$EXTERNALSYM PropertyTagResolutionYUnit} + PropertyTagResolutionXLengthUnit = $5003; + {$EXTERNALSYM PropertyTagResolutionXLengthUnit} + PropertyTagResolutionYLengthUnit = $5004; + {$EXTERNALSYM PropertyTagResolutionYLengthUnit} + PropertyTagPrintFlags = $5005; + {$EXTERNALSYM PropertyTagPrintFlags} + PropertyTagPrintFlagsVersion = $5006; + {$EXTERNALSYM PropertyTagPrintFlagsVersion} + PropertyTagPrintFlagsCrop = $5007; + {$EXTERNALSYM PropertyTagPrintFlagsCrop} + PropertyTagPrintFlagsBleedWidth = $5008; + {$EXTERNALSYM PropertyTagPrintFlagsBleedWidth} + PropertyTagPrintFlagsBleedWidthScale = $5009; + {$EXTERNALSYM PropertyTagPrintFlagsBleedWidthScale} + PropertyTagHalftoneLPI = $500A; + {$EXTERNALSYM PropertyTagHalftoneLPI} + PropertyTagHalftoneLPIUnit = $500B; + {$EXTERNALSYM PropertyTagHalftoneLPIUnit} + PropertyTagHalftoneDegree = $500C; + {$EXTERNALSYM PropertyTagHalftoneDegree} + PropertyTagHalftoneShape = $500D; + {$EXTERNALSYM PropertyTagHalftoneShape} + PropertyTagHalftoneMisc = $500E; + {$EXTERNALSYM PropertyTagHalftoneMisc} + PropertyTagHalftoneScreen = $500F; + {$EXTERNALSYM PropertyTagHalftoneScreen} + PropertyTagJPEGQuality = $5010; + {$EXTERNALSYM PropertyTagJPEGQuality} + PropertyTagGridSize = $5011; + {$EXTERNALSYM PropertyTagGridSize} + PropertyTagThumbnailFormat = $5012; // 1 = JPEG, 0 = RAW RGB + {$EXTERNALSYM PropertyTagThumbnailFormat} + PropertyTagThumbnailWidth = $5013; + {$EXTERNALSYM PropertyTagThumbnailWidth} + PropertyTagThumbnailHeight = $5014; + {$EXTERNALSYM PropertyTagThumbnailHeight} + PropertyTagThumbnailColorDepth = $5015; + {$EXTERNALSYM PropertyTagThumbnailColorDepth} + PropertyTagThumbnailPlanes = $5016; + {$EXTERNALSYM PropertyTagThumbnailPlanes} + PropertyTagThumbnailRawBytes = $5017; + {$EXTERNALSYM PropertyTagThumbnailRawBytes} + PropertyTagThumbnailSize = $5018; + {$EXTERNALSYM PropertyTagThumbnailSize} + PropertyTagThumbnailCompressedSize = $5019; + {$EXTERNALSYM PropertyTagThumbnailCompressedSize} + PropertyTagColorTransferFunction = $501A; + {$EXTERNALSYM PropertyTagColorTransferFunction} + PropertyTagThumbnailData = $501B; // RAW thumbnail bits in + {$EXTERNALSYM PropertyTagThumbnailData} + // JPEG format or RGB format + // depends on + // PropertyTagThumbnailFormat + + // Thumbnail related TAGs + + PropertyTagThumbnailImageWidth = $5020; // Thumbnail width + {$EXTERNALSYM PropertyTagThumbnailImageWidth} + PropertyTagThumbnailImageHeight = $5021; // Thumbnail height + {$EXTERNALSYM PropertyTagThumbnailImageHeight} + PropertyTagThumbnailBitsPerSample = $5022; // Number of bits per + {$EXTERNALSYM PropertyTagThumbnailBitsPerSample} + // component + PropertyTagThumbnailCompression = $5023; // Compression Scheme + {$EXTERNALSYM PropertyTagThumbnailCompression} + PropertyTagThumbnailPhotometricInterp = $5024; // Pixel composition + {$EXTERNALSYM PropertyTagThumbnailPhotometricInterp} + PropertyTagThumbnailImageDescription = $5025; // Image Tile + {$EXTERNALSYM PropertyTagThumbnailImageDescription} + PropertyTagThumbnailEquipMake = $5026; // Manufacturer of Image + {$EXTERNALSYM PropertyTagThumbnailEquipMake} + // Input equipment + PropertyTagThumbnailEquipModel = $5027; // Model of Image input + {$EXTERNALSYM PropertyTagThumbnailEquipModel} + // equipment + PropertyTagThumbnailStripOffsets = $5028; // Image data location + {$EXTERNALSYM PropertyTagThumbnailStripOffsets} + PropertyTagThumbnailOrientation = $5029; // Orientation of image + {$EXTERNALSYM PropertyTagThumbnailOrientation} + PropertyTagThumbnailSamplesPerPixel = $502A; // Number of components + {$EXTERNALSYM PropertyTagThumbnailSamplesPerPixel} + PropertyTagThumbnailRowsPerStrip = $502B; // Number of rows per strip + {$EXTERNALSYM PropertyTagThumbnailRowsPerStrip} + PropertyTagThumbnailStripBytesCount = $502C; // Bytes per compressed + {$EXTERNALSYM PropertyTagThumbnailStripBytesCount} + // strip + PropertyTagThumbnailResolutionX = $502D; // Resolution in width + {$EXTERNALSYM PropertyTagThumbnailResolutionX} + // direction + PropertyTagThumbnailResolutionY = $502E; // Resolution in height + {$EXTERNALSYM PropertyTagThumbnailResolutionY} + // direction + PropertyTagThumbnailPlanarConfig = $502F; // Image data arrangement + {$EXTERNALSYM PropertyTagThumbnailPlanarConfig} + PropertyTagThumbnailResolutionUnit = $5030; // Unit of X and Y + {$EXTERNALSYM PropertyTagThumbnailResolutionUnit} + // Resolution + PropertyTagThumbnailTransferFunction = $5031; // Transfer function + {$EXTERNALSYM PropertyTagThumbnailTransferFunction} + PropertyTagThumbnailSoftwareUsed = $5032; // Software used + {$EXTERNALSYM PropertyTagThumbnailSoftwareUsed} + PropertyTagThumbnailDateTime = $5033; // File change date and + {$EXTERNALSYM PropertyTagThumbnailDateTime} + // time + PropertyTagThumbnailArtist = $5034; // Person who created the + {$EXTERNALSYM PropertyTagThumbnailArtist} + // image + PropertyTagThumbnailWhitePoint = $5035; // White point chromaticity + {$EXTERNALSYM PropertyTagThumbnailWhitePoint} + PropertyTagThumbnailPrimaryChromaticities = $5036; + {$EXTERNALSYM PropertyTagThumbnailPrimaryChromaticities} + // Chromaticities of + // primaries + PropertyTagThumbnailYCbCrCoefficients = $5037; // Color space transforma- + {$EXTERNALSYM PropertyTagThumbnailYCbCrCoefficients} + // tion coefficients + PropertyTagThumbnailYCbCrSubsampling = $5038; // Subsampling ratio of Y + {$EXTERNALSYM PropertyTagThumbnailYCbCrSubsampling} + // to C + PropertyTagThumbnailYCbCrPositioning = $5039; // Y and C position + {$EXTERNALSYM PropertyTagThumbnailYCbCrPositioning} + PropertyTagThumbnailRefBlackWhite = $503A; // Pair of black and white + {$EXTERNALSYM PropertyTagThumbnailRefBlackWhite} + // reference values + PropertyTagThumbnailCopyRight = $503B; // CopyRight holder + {$EXTERNALSYM PropertyTagThumbnailCopyRight} + + PropertyTagLuminanceTable = $5090; + {$EXTERNALSYM PropertyTagLuminanceTable} + PropertyTagChrominanceTable = $5091; + {$EXTERNALSYM PropertyTagChrominanceTable} + + PropertyTagFrameDelay = $5100; + {$EXTERNALSYM PropertyTagFrameDelay} + PropertyTagLoopCount = $5101; + {$EXTERNALSYM PropertyTagLoopCount} + + PropertyTagPixelUnit = $5110; // Unit specifier for pixel/unit + {$EXTERNALSYM PropertyTagPixelUnit} + PropertyTagPixelPerUnitX = $5111; // Pixels per unit in X + {$EXTERNALSYM PropertyTagPixelPerUnitX} + PropertyTagPixelPerUnitY = $5112; // Pixels per unit in Y + {$EXTERNALSYM PropertyTagPixelPerUnitY} + PropertyTagPaletteHistogram = $5113; // Palette histogram + {$EXTERNALSYM PropertyTagPaletteHistogram} + + // EXIF specific tag + + PropertyTagExifExposureTime = $829A; + {$EXTERNALSYM PropertyTagExifExposureTime} + PropertyTagExifFNumber = $829D; + {$EXTERNALSYM PropertyTagExifFNumber} + + PropertyTagExifExposureProg = $8822; + {$EXTERNALSYM PropertyTagExifExposureProg} + PropertyTagExifSpectralSense = $8824; + {$EXTERNALSYM PropertyTagExifSpectralSense} + PropertyTagExifISOSpeed = $8827; + {$EXTERNALSYM PropertyTagExifISOSpeed} + PropertyTagExifOECF = $8828; + {$EXTERNALSYM PropertyTagExifOECF} + + PropertyTagExifVer = $9000; + {$EXTERNALSYM PropertyTagExifVer} + PropertyTagExifDTOrig = $9003; // Date & time of original + {$EXTERNALSYM PropertyTagExifDTOrig} + PropertyTagExifDTDigitized = $9004; // Date & time of digital data generation + {$EXTERNALSYM PropertyTagExifDTDigitized} + + PropertyTagExifCompConfig = $9101; + {$EXTERNALSYM PropertyTagExifCompConfig} + PropertyTagExifCompBPP = $9102; + {$EXTERNALSYM PropertyTagExifCompBPP} + + PropertyTagExifShutterSpeed = $9201; + {$EXTERNALSYM PropertyTagExifShutterSpeed} + PropertyTagExifAperture = $9202; + {$EXTERNALSYM PropertyTagExifAperture} + PropertyTagExifBrightness = $9203; + {$EXTERNALSYM PropertyTagExifBrightness} + PropertyTagExifExposureBias = $9204; + {$EXTERNALSYM PropertyTagExifExposureBias} + PropertyTagExifMaxAperture = $9205; + {$EXTERNALSYM PropertyTagExifMaxAperture} + PropertyTagExifSubjectDist = $9206; + {$EXTERNALSYM PropertyTagExifSubjectDist} + PropertyTagExifMeteringMode = $9207; + {$EXTERNALSYM PropertyTagExifMeteringMode} + PropertyTagExifLightSource = $9208; + {$EXTERNALSYM PropertyTagExifLightSource} + PropertyTagExifFlash = $9209; + {$EXTERNALSYM PropertyTagExifFlash} + PropertyTagExifFocalLength = $920A; + {$EXTERNALSYM PropertyTagExifFocalLength} + PropertyTagExifMakerNote = $927C; + {$EXTERNALSYM PropertyTagExifMakerNote} + PropertyTagExifUserComment = $9286; + {$EXTERNALSYM PropertyTagExifUserComment} + PropertyTagExifDTSubsec = $9290; // Date & Time subseconds + {$EXTERNALSYM PropertyTagExifDTSubsec} + PropertyTagExifDTOrigSS = $9291; // Date & Time original subseconds + {$EXTERNALSYM PropertyTagExifDTOrigSS} + PropertyTagExifDTDigSS = $9292; // Date & TIme digitized subseconds + {$EXTERNALSYM PropertyTagExifDTDigSS} + + PropertyTagExifFPXVer = $A000; + {$EXTERNALSYM PropertyTagExifFPXVer} + PropertyTagExifColorSpace = $A001; + {$EXTERNALSYM PropertyTagExifColorSpace} + PropertyTagExifPixXDim = $A002; + {$EXTERNALSYM PropertyTagExifPixXDim} + PropertyTagExifPixYDim = $A003; + {$EXTERNALSYM PropertyTagExifPixYDim} + PropertyTagExifRelatedWav = $A004; // related sound file + {$EXTERNALSYM PropertyTagExifRelatedWav} + PropertyTagExifInterop = $A005; + {$EXTERNALSYM PropertyTagExifInterop} + PropertyTagExifFlashEnergy = $A20B; + {$EXTERNALSYM PropertyTagExifFlashEnergy} + PropertyTagExifSpatialFR = $A20C; // Spatial Frequency Response + {$EXTERNALSYM PropertyTagExifSpatialFR} + PropertyTagExifFocalXRes = $A20E; // Focal Plane X Resolution + {$EXTERNALSYM PropertyTagExifFocalXRes} + PropertyTagExifFocalYRes = $A20F; // Focal Plane Y Resolution + {$EXTERNALSYM PropertyTagExifFocalYRes} + PropertyTagExifFocalResUnit = $A210; // Focal Plane Resolution Unit + {$EXTERNALSYM PropertyTagExifFocalResUnit} + PropertyTagExifSubjectLoc = $A214; + {$EXTERNALSYM PropertyTagExifSubjectLoc} + PropertyTagExifExposureIndex = $A215; + {$EXTERNALSYM PropertyTagExifExposureIndex} + PropertyTagExifSensingMethod = $A217; + {$EXTERNALSYM PropertyTagExifSensingMethod} + PropertyTagExifFileSource = $A300; + {$EXTERNALSYM PropertyTagExifFileSource} + PropertyTagExifSceneType = $A301; + {$EXTERNALSYM PropertyTagExifSceneType} + PropertyTagExifCfaPattern = $A302; + {$EXTERNALSYM PropertyTagExifCfaPattern} + + PropertyTagGpsVer = $0000; + {$EXTERNALSYM PropertyTagGpsVer} + PropertyTagGpsLatitudeRef = $0001; + {$EXTERNALSYM PropertyTagGpsLatitudeRef} + PropertyTagGpsLatitude = $0002; + {$EXTERNALSYM PropertyTagGpsLatitude} + PropertyTagGpsLongitudeRef = $0003; + {$EXTERNALSYM PropertyTagGpsLongitudeRef} + PropertyTagGpsLongitude = $0004; + {$EXTERNALSYM PropertyTagGpsLongitude} + PropertyTagGpsAltitudeRef = $0005; + {$EXTERNALSYM PropertyTagGpsAltitudeRef} + PropertyTagGpsAltitude = $0006; + {$EXTERNALSYM PropertyTagGpsAltitude} + PropertyTagGpsGpsTime = $0007; + {$EXTERNALSYM PropertyTagGpsGpsTime} + PropertyTagGpsGpsSatellites = $0008; + {$EXTERNALSYM PropertyTagGpsGpsSatellites} + PropertyTagGpsGpsStatus = $0009; + {$EXTERNALSYM PropertyTagGpsGpsStatus} + PropertyTagGpsGpsMeasureMode = $00A; + {$EXTERNALSYM PropertyTagGpsGpsMeasureMode} + PropertyTagGpsGpsDop = $000B; // Measurement precision + {$EXTERNALSYM PropertyTagGpsGpsDop} + PropertyTagGpsSpeedRef = $000C; + {$EXTERNALSYM PropertyTagGpsSpeedRef} + PropertyTagGpsSpeed = $000D; + {$EXTERNALSYM PropertyTagGpsSpeed} + PropertyTagGpsTrackRef = $000E; + {$EXTERNALSYM PropertyTagGpsTrackRef} + PropertyTagGpsTrack = $000F; + {$EXTERNALSYM PropertyTagGpsTrack} + PropertyTagGpsImgDirRef = $0010; + {$EXTERNALSYM PropertyTagGpsImgDirRef} + PropertyTagGpsImgDir = $0011; + {$EXTERNALSYM PropertyTagGpsImgDir} + PropertyTagGpsMapDatum = $0012; + {$EXTERNALSYM PropertyTagGpsMapDatum} + PropertyTagGpsDestLatRef = $0013; + {$EXTERNALSYM PropertyTagGpsDestLatRef} + PropertyTagGpsDestLat = $0014; + {$EXTERNALSYM PropertyTagGpsDestLat} + PropertyTagGpsDestLongRef = $0015; + {$EXTERNALSYM PropertyTagGpsDestLongRef} + PropertyTagGpsDestLong = $0016; + {$EXTERNALSYM PropertyTagGpsDestLong} + PropertyTagGpsDestBearRef = $0017; + {$EXTERNALSYM PropertyTagGpsDestBearRef} + PropertyTagGpsDestBear = $0018; + {$EXTERNALSYM PropertyTagGpsDestBear} + PropertyTagGpsDestDistRef = $0019; + {$EXTERNALSYM PropertyTagGpsDestDistRef} + PropertyTagGpsDestDist = $001A; + {$EXTERNALSYM PropertyTagGpsDestDist} + +(**************************************************************************\ +* +* GDI+ Color Matrix object, used with Graphics.DrawImage +* +\**************************************************************************) + +//---------------------------------------------------------------------------- +// Color matrix +//---------------------------------------------------------------------------- + +type + {$EXTERNALSYM ColorMatrix} + ColorMatrix = packed array[0..4, 0..4] of Single; + TColorMatrix = ColorMatrix; + PColorMatrix = ^TColorMatrix; + +//---------------------------------------------------------------------------- +// Color Matrix flags +//---------------------------------------------------------------------------- + + {$EXTERNALSYM ColorMatrixFlags} + ColorMatrixFlags = ( + ColorMatrixFlagsDefault, + ColorMatrixFlagsSkipGrays, + ColorMatrixFlagsAltGray + ); + TColorMatrixFlags = ColorMatrixFlags; + +//---------------------------------------------------------------------------- +// Color Adjust Type +//---------------------------------------------------------------------------- + + {$EXTERNALSYM ColorAdjustType} + ColorAdjustType = ( + ColorAdjustTypeDefault, + ColorAdjustTypeBitmap, + ColorAdjustTypeBrush, + ColorAdjustTypePen, + ColorAdjustTypeText, + ColorAdjustTypeCount, + ColorAdjustTypeAny // Reserved + ); + TColorAdjustType = ColorAdjustType; + +//---------------------------------------------------------------------------- +// Color Map +//---------------------------------------------------------------------------- + + {$EXTERNALSYM ColorMap} + ColorMap = packed record + oldColor: TGPColor; + newColor: TGPColor; + end; + TColorMap = ColorMap; + PColorMap = ^TColorMap; + +//--------------------------------------------------------------------------- +// Private GDI+ classes for internal type checking +//--------------------------------------------------------------------------- + + GpGraphics = Pointer; + + GpBrush = Pointer; + GpTexture = Pointer; + GpSolidFill = Pointer; + GpLineGradient = Pointer; + GpPathGradient = Pointer; + GpHatch = Pointer; + + GpPen = Pointer; + GpCustomLineCap = Pointer; + GpAdjustableArrowCap = Pointer; + + GpImage = Pointer; + GpBitmap = Pointer; + GpMetafile = Pointer; + GpImageAttributes = Pointer; + + GpPath = Pointer; + GpRegion = Pointer; + GpPathIterator = Pointer; + + GpFontFamily = Pointer; + GpFont = Pointer; + GpStringFormat = Pointer; + GpFontCollection = Pointer; + GpCachedBitmap = Pointer; + + GpStatus = TStatus; + GpFillMode = TFillMode; + GpWrapMode = TWrapMode; + GpUnit = TUnit; + GpCoordinateSpace = TCoordinateSpace; + GpPointF = PGPPointF; + GpPoint = PGPPoint; + GpRectF = PGPRectF; + GpRect = PGPRect; + GpSizeF = PGPSizeF; + GpHatchStyle = THatchStyle; + GpDashStyle = TDashStyle; + GpLineCap = TLineCap; + GpDashCap = TDashCap; + + GpPenAlignment = TPenAlignment; + + GpLineJoin = TLineJoin; + GpPenType = TPenType; + + GpMatrix = Pointer; + GpBrushType = TBrushType; + GpMatrixOrder = TMatrixOrder; + GpFlushIntention = TFlushIntention; + GpPathData = TPathData; + +(**************************************************************************\ +* +* Copyright (c) 1998-2001, Microsoft Corp. All Rights Reserved. +* Module Name: +* GdiplusFlat.h +* Abstract: +* Private GDI+ header file. +* +\**************************************************************************) + + function GdipCreatePath(brushMode: GPFILLMODE; + out path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreatePath} + + function GdipCreatePath2(v1: GPPOINTF; v2: PBYTE; v3: Integer; v4: GPFILLMODE; + out path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreatePath2} + + function GdipCreatePath2I(v1: GPPOINT; v2: PBYTE; v3: Integer; v4: GPFILLMODE; + out path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreatePath2I} + + function GdipClonePath(path: GPPATH; + out clonePath: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipClonePath} + + function GdipDeletePath(path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeletePath} + + function GdipResetPath(path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipResetPath} + + function GdipGetPointCount(path: GPPATH; + out count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPointCount} + + function GdipGetPathTypes(path: GPPATH; types: PBYTE; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathTypes} + + function GdipGetPathPoints(v1: GPPATH; points: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathPoints} + + function GdipGetPathPointsI(v1: GPPATH; points: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathPointsI} + + function GdipGetPathFillMode(path: GPPATH; + var fillmode: GPFILLMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathFillMode} + + function GdipSetPathFillMode(path: GPPATH; + fillmode: GPFILLMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathFillMode} + + function GdipGetPathData(path: GPPATH; + pathData: Pointer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathData} + + function GdipStartPathFigure(path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipStartPathFigure} + + function GdipClosePathFigure(path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipClosePathFigure} + + function GdipClosePathFigures(path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipClosePathFigures} + + function GdipSetPathMarker(path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathMarker} + + function GdipClearPathMarkers(path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipClearPathMarkers} + + function GdipReversePath(path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipReversePath} + + function GdipGetPathLastPoint(path: GPPATH; + lastPoint: GPPOINTF): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathLastPoint} + + function GdipAddPathLine(path: GPPATH; + x1, y1, x2, y2: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathLine} + + function GdipAddPathLine2(path: GPPATH; points: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathLine2} + + function GdipAddPathArc(path: GPPATH; x, y, width, height, startAngle, + sweepAngle: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathArc} + + function GdipAddPathBezier(path: GPPATH; + x1, y1, x2, y2, x3, y3, x4, y4: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathBezier} + + function GdipAddPathBeziers(path: GPPATH; points: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathBeziers} + + function GdipAddPathCurve(path: GPPATH; points: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathCurve} + + function GdipAddPathCurve2(path: GPPATH; points: GPPOINTF; count: Integer; + tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathCurve2} + + function GdipAddPathCurve3(path: GPPATH; points: GPPOINTF; count: Integer; + offset: Integer; numberOfSegments: Integer; + tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathCurve3} + + function GdipAddPathClosedCurve(path: GPPATH; points: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathClosedCurve} + + function GdipAddPathClosedCurve2(path: GPPATH; points: GPPOINTF; + count: Integer; tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathClosedCurve2} + + function GdipAddPathRectangle(path: GPPATH; x: Single; y: Single; + width: Single; height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathRectangle} + + function GdipAddPathRectangles(path: GPPATH; rects: GPRECTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathRectangles} + + function GdipAddPathEllipse(path: GPPATH; x: Single; y: Single; + width: Single; height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathEllipse} + + function GdipAddPathPie(path: GPPATH; x: Single; y: Single; width: Single; + height: Single; startAngle: Single; sweepAngle: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathPie} + + function GdipAddPathPolygon(path: GPPATH; points: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathPolygon} + + function GdipAddPathPath(path: GPPATH; addingPath: GPPATH; + connect: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathPath} + + function GdipAddPathString(path: GPPATH; string_: PWCHAR; length: Integer; + family: GPFONTFAMILY; style: Integer; emSize: Single; layoutRect: PGPRectF; + format: GPSTRINGFORMAT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathString} + + function GdipAddPathStringI(path: GPPATH; string_: PWCHAR; length: Integer; + family: GPFONTFAMILY; style: Integer; emSize: Single; layoutRect: PGPRect; + format: GPSTRINGFORMAT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathStringI} + + function GdipAddPathLineI(path: GPPATH; x1: Integer; y1: Integer; x2: Integer; + y2: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathLineI} + + function GdipAddPathLine2I(path: GPPATH; points: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathLine2I} + + function GdipAddPathArcI(path: GPPATH; x: Integer; y: Integer; width: Integer; + height: Integer; startAngle: Single; sweepAngle: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathArcI} + + function GdipAddPathBezierI(path: GPPATH; x1: Integer; y1: Integer; + x2: Integer; y2: Integer; x3: Integer; y3: Integer; x4: Integer; + y4: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathBezierI} + + function GdipAddPathBeziersI(path: GPPATH; points: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathBeziersI} + + function GdipAddPathCurveI(path: GPPATH; points: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathCurveI} + + function GdipAddPathCurve2I(path: GPPATH; points: GPPOINT; count: Integer; + tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathCurve2I} + + function GdipAddPathCurve3I(path: GPPATH; points: GPPOINT; count: Integer; + offset: Integer; numberOfSegments: Integer; + tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathCurve3I} + + function GdipAddPathClosedCurveI(path: GPPATH; points: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathClosedCurveI} + + function GdipAddPathClosedCurve2I(path: GPPATH; points: GPPOINT; + count: Integer; tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathClosedCurve2I} + + function GdipAddPathRectangleI(path: GPPATH; x: Integer; y: Integer; + width: Integer; height: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathRectangleI} + + function GdipAddPathRectanglesI(path: GPPATH; rects: GPRECT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathRectanglesI} + + function GdipAddPathEllipseI(path: GPPATH; x: Integer; y: Integer; + width: Integer; height: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathEllipseI} + + function GdipAddPathPieI(path: GPPATH; x: Integer; y: Integer; width: Integer; + height: Integer; startAngle: Single; sweepAngle: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathPieI} + + function GdipAddPathPolygonI(path: GPPATH; points: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipAddPathPolygonI} + + function GdipFlattenPath(path: GPPATH; matrix: GPMATRIX; + flatness: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFlattenPath} + + function GdipWindingModeOutline(path: GPPATH; matrix: GPMATRIX; + flatness: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipWindingModeOutline} + + function GdipWidenPath(nativePath: GPPATH; pen: GPPEN; matrix: GPMATRIX; + flatness: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipWidenPath} + + function GdipWarpPath(path: GPPATH; matrix: GPMATRIX; points: GPPOINTF; + count: Integer; srcx: Single; srcy: Single; srcwidth: Single; + srcheight: Single; warpMode: WARPMODE; flatness: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipWarpPath} + + function GdipTransformPath(path: GPPATH; matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTransformPath} + + function GdipGetPathWorldBounds(path: GPPATH; bounds: GPRECTF; + matrix: GPMATRIX; pen: GPPEN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathWorldBounds} + + function GdipGetPathWorldBoundsI(path: GPPATH; bounds: GPRECT; + matrix: GPMATRIX; pen: GPPEN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathWorldBoundsI} + + function GdipIsVisiblePathPoint(path: GPPATH; x: Single; y: Single; + graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsVisiblePathPoint} + + function GdipIsVisiblePathPointI(path: GPPATH; x: Integer; y: Integer; + graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsVisiblePathPointI} + + function GdipIsOutlineVisiblePathPoint(path: GPPATH; x: Single; y: Single; + pen: GPPEN; graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsOutlineVisiblePathPoint} + + function GdipIsOutlineVisiblePathPointI(path: GPPATH; x: Integer; y: Integer; + pen: GPPEN; graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsOutlineVisiblePathPointI} + +//---------------------------------------------------------------------------- +// PathIterator APIs +//---------------------------------------------------------------------------- + + function GdipCreatePathIter(out iterator: GPPATHITERATOR; + path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreatePathIter} + + function GdipDeletePathIter(iterator: GPPATHITERATOR): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeletePathIter} + + function GdipPathIterNextSubpath(iterator: GPPATHITERATOR; + var resultCount: Integer; var startIndex: Integer; var endIndex: Integer; + out isClosed: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterNextSubpath} + + function GdipPathIterNextSubpathPath(iterator: GPPATHITERATOR; + var resultCount: Integer; path: GPPATH; + out isClosed: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterNextSubpathPath} + + function GdipPathIterNextPathType(iterator: GPPATHITERATOR; + var resultCount: Integer; pathType: PBYTE; var startIndex: Integer; + var endIndex: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterNextPathType} + + function GdipPathIterNextMarker(iterator: GPPATHITERATOR; + var resultCount: Integer; var startIndex: Integer; + var endIndex: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterNextMarker} + + function GdipPathIterNextMarkerPath(iterator: GPPATHITERATOR; + var resultCount: Integer; path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterNextMarkerPath} + + function GdipPathIterGetCount(iterator: GPPATHITERATOR; + out count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterGetCount} + + function GdipPathIterGetSubpathCount(iterator: GPPATHITERATOR; + out count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterGetSubpathCount} + + function GdipPathIterIsValid(iterator: GPPATHITERATOR; + out valid: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterIsValid} + + function GdipPathIterHasCurve(iterator: GPPATHITERATOR; + out hasCurve: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterHasCurve} + + function GdipPathIterRewind(iterator: GPPATHITERATOR): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterRewind} + + function GdipPathIterEnumerate(iterator: GPPATHITERATOR; + var resultCount: Integer; points: GPPOINTF; types: PBYTE; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterEnumerate} + + function GdipPathIterCopyData(iterator: GPPATHITERATOR; + var resultCount: Integer; points: GPPOINTF; types: PBYTE; + startIndex: Integer; endIndex: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPathIterCopyData} + +//---------------------------------------------------------------------------- +// Matrix APIs +//---------------------------------------------------------------------------- + + function GdipCreateMatrix(out matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateMatrix} + + function GdipCreateMatrix2(m11: Single; m12: Single; m21: Single; m22: Single; + dx: Single; dy: Single; out matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateMatrix2} + + function GdipCreateMatrix3(rect: GPRECTF; dstplg: GPPOINTF; + out matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateMatrix3} + + function GdipCreateMatrix3I(rect: GPRECT; dstplg: GPPOINT; + out matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateMatrix3I} + + function GdipCloneMatrix(matrix: GPMATRIX; + out cloneMatrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCloneMatrix} + + function GdipDeleteMatrix(matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeleteMatrix} + + function GdipSetMatrixElements(matrix: GPMATRIX; m11: Single; m12: Single; + m21: Single; m22: Single; dx: Single; dy: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetMatrixElements} + + function GdipMultiplyMatrix(matrix: GPMATRIX; matrix2: GPMATRIX; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipMultiplyMatrix} + + function GdipTranslateMatrix(matrix: GPMATRIX; offsetX: Single; + offsetY: Single; order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTranslateMatrix} + + function GdipScaleMatrix(matrix: GPMATRIX; scaleX: Single; scaleY: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipScaleMatrix} + + function GdipRotateMatrix(matrix: GPMATRIX; angle: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRotateMatrix} + + function GdipShearMatrix(matrix: GPMATRIX; shearX: Single; shearY: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipShearMatrix} + + function GdipInvertMatrix(matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipInvertMatrix} + + function GdipTransformMatrixPoints(matrix: GPMATRIX; pts: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTransformMatrixPoints} + + function GdipTransformMatrixPointsI(matrix: GPMATRIX; pts: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTransformMatrixPointsI} + + function GdipVectorTransformMatrixPoints(matrix: GPMATRIX; pts: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipVectorTransformMatrixPoints} + + function GdipVectorTransformMatrixPointsI(matrix: GPMATRIX; pts: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipVectorTransformMatrixPointsI} + + function GdipGetMatrixElements(matrix: GPMATRIX; + matrixOut: PSingle): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetMatrixElements} + + function GdipIsMatrixInvertible(matrix: GPMATRIX; + out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsMatrixInvertible} + + function GdipIsMatrixIdentity(matrix: GPMATRIX; + out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsMatrixIdentity} + + function GdipIsMatrixEqual(matrix: GPMATRIX; matrix2: GPMATRIX; + out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsMatrixEqual} + +//---------------------------------------------------------------------------- +// Region APIs +//---------------------------------------------------------------------------- + + function GdipCreateRegion(out region: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateRegion} + + function GdipCreateRegionRect(rect: GPRECTF; + out region: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateRegionRect} + + function GdipCreateRegionRectI(rect: GPRECT; + out region: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateRegionRectI} + + function GdipCreateRegionPath(path: GPPATH; + out region: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateRegionPath} + + function GdipCreateRegionRgnData(regionData: PBYTE; size: Integer; + out region: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateRegionRgnData} + + function GdipCreateRegionHrgn(hRgn: HRGN; + out region: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateRegionHrgn} + + function GdipCloneRegion(region: GPREGION; + out cloneRegion: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCloneRegion} + + function GdipDeleteRegion(region: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeleteRegion} + + function GdipSetInfinite(region: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetInfinite} + + function GdipSetEmpty(region: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetEmpty} + + function GdipCombineRegionRect(region: GPREGION; rect: GPRECTF; + combineMode: COMBINEMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCombineRegionRect} + + function GdipCombineRegionRectI(region: GPREGION; rect: GPRECT; + combineMode: COMBINEMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCombineRegionRectI} + + function GdipCombineRegionPath(region: GPREGION; path: GPPATH; + combineMode: COMBINEMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCombineRegionPath} + + function GdipCombineRegionRegion(region: GPREGION; region2: GPREGION; + combineMode: COMBINEMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCombineRegionRegion} + + function GdipTranslateRegion(region: GPREGION; dx: Single; + dy: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTranslateRegion} + + function GdipTranslateRegionI(region: GPREGION; dx: Integer; + dy: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTranslateRegionI} + + function GdipTransformRegion(region: GPREGION; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTransformRegion} + + function GdipGetRegionBounds(region: GPREGION; graphics: GPGRAPHICS; + rect: GPRECTF): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetRegionBounds} + + function GdipGetRegionBoundsI(region: GPREGION; graphics: GPGRAPHICS; + rect: GPRECT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetRegionBoundsI} + + function GdipGetRegionHRgn(region: GPREGION; graphics: GPGRAPHICS; + out hRgn: HRGN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetRegionHRgn} + + function GdipIsEmptyRegion(region: GPREGION; graphics: GPGRAPHICS; + out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsEmptyRegion} + + function GdipIsInfiniteRegion(region: GPREGION; graphics: GPGRAPHICS; + out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsInfiniteRegion} + + function GdipIsEqualRegion(region: GPREGION; region2: GPREGION; + graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsEqualRegion} + + function GdipGetRegionDataSize(region: GPREGION; + out bufferSize: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetRegionDataSize} + + function GdipGetRegionData(region: GPREGION; buffer: PBYTE; + bufferSize: UINT; sizeFilled: PUINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetRegionData} + + function GdipIsVisibleRegionPoint(region: GPREGION; x: Single; y: Single; + graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsVisibleRegionPoint} + + function GdipIsVisibleRegionPointI(region: GPREGION; x: Integer; y: Integer; + graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsVisibleRegionPointI} + + function GdipIsVisibleRegionRect(region: GPREGION; x: Single; y: Single; + width: Single; height: Single; graphics: GPGRAPHICS; + out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsVisibleRegionRect} + + function GdipIsVisibleRegionRectI(region: GPREGION; x: Integer; y: Integer; + width: Integer; height: Integer; graphics: GPGRAPHICS; + out result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsVisibleRegionRectI} + + function GdipGetRegionScansCount(region: GPREGION; out count: UINT; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetRegionScansCount} + + function GdipGetRegionScans(region: GPREGION; rects: GPRECTF; + out count: Integer; matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetRegionScans} + + function GdipGetRegionScansI(region: GPREGION; rects: GPRECT; + out count: Integer; matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetRegionScansI} + +//---------------------------------------------------------------------------- +// Brush APIs +//---------------------------------------------------------------------------- + + function GdipCloneBrush(brush: GPBRUSH; + out cloneBrush: GPBRUSH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCloneBrush} + + function GdipDeleteBrush(brush: GPBRUSH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeleteBrush} + + function GdipGetBrushType(brush: GPBRUSH; + out type_: GPBRUSHTYPE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetBrushType} + +//---------------------------------------------------------------------------- +// HatchBrush APIs +//---------------------------------------------------------------------------- + + function GdipCreateHatchBrush(hatchstyle: Integer; forecol: ARGB; + backcol: ARGB; out brush: GPHATCH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateHatchBrush} + + function GdipGetHatchStyle(brush: GPHATCH; + out hatchstyle: GPHATCHSTYLE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetHatchStyle} + + function GdipGetHatchForegroundColor(brush: GPHATCH; + out forecol: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetHatchForegroundColor} + + function GdipGetHatchBackgroundColor(brush: GPHATCH; + out backcol: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetHatchBackgroundColor} + +//---------------------------------------------------------------------------- +// TextureBrush APIs +//---------------------------------------------------------------------------- + + + function GdipCreateTexture(image: GPIMAGE; wrapmode: GPWRAPMODE; + var texture: GPTEXTURE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateTexture} + + function GdipCreateTexture2(image: GPIMAGE; wrapmode: GPWRAPMODE; + x: Single; y: Single; width: Single; height: Single; + out texture: GPTEXTURE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateTexture2} + + function GdipCreateTextureIA(image: GPIMAGE; + imageAttributes: GPIMAGEATTRIBUTES; x: Single; y: Single; width: Single; + height: Single; out texture: GPTEXTURE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateTextureIA} + + function GdipCreateTexture2I(image: GPIMAGE; wrapmode: GPWRAPMODE; x: Integer; + y: Integer; width: Integer; height: Integer; + out texture: GPTEXTURE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateTexture2I} + + function GdipCreateTextureIAI(image: GPIMAGE; + imageAttributes: GPIMAGEATTRIBUTES; x: Integer; y: Integer; width: Integer; + height: Integer; out texture: GPTEXTURE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateTextureIAI} + + function GdipGetTextureTransform(brush: GPTEXTURE; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetTextureTransform} + + function GdipSetTextureTransform(brush: GPTEXTURE; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetTextureTransform} + + function GdipResetTextureTransform(brush: GPTEXTURE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipResetTextureTransform} + + function GdipMultiplyTextureTransform(brush: GPTEXTURE; matrix: GPMATRIX; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipMultiplyTextureTransform} + + function GdipTranslateTextureTransform(brush: GPTEXTURE; dx: Single; + dy: Single; order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTranslateTextureTransform} + + function GdipScaleTextureTransform(brush: GPTEXTURE; sx: Single; sy: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipScaleTextureTransform} + + function GdipRotateTextureTransform(brush: GPTEXTURE; angle: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRotateTextureTransform} + + function GdipSetTextureWrapMode(brush: GPTEXTURE; + wrapmode: GPWRAPMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetTextureWrapMode} + + function GdipGetTextureWrapMode(brush: GPTEXTURE; + var wrapmode: GPWRAPMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetTextureWrapMode} + + function GdipGetTextureImage(brush: GPTEXTURE; + out image: GPIMAGE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetTextureImage} + +//---------------------------------------------------------------------------- +// SolidBrush APIs +//---------------------------------------------------------------------------- + + function GdipCreateSolidFill(color: ARGB; + out brush: GPSOLIDFILL): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateSolidFill} + + function GdipSetSolidFillColor(brush: GPSOLIDFILL; + color: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetSolidFillColor} + + function GdipGetSolidFillColor(brush: GPSOLIDFILL; + out color: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetSolidFillColor} + +//---------------------------------------------------------------------------- +// LineBrush APIs +//---------------------------------------------------------------------------- + + function GdipCreateLineBrush(point1: GPPOINTF; point2: GPPOINTF; color1: ARGB; + color2: ARGB; wrapMode: GPWRAPMODE; + out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateLineBrush} + + function GdipCreateLineBrushI(point1: GPPOINT; point2: GPPOINT; color1: ARGB; + color2: ARGB; wrapMode: GPWRAPMODE; + out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateLineBrushI} + + function GdipCreateLineBrushFromRect(rect: GPRECTF; color1: ARGB; + color2: ARGB; mode: LINEARGRADIENTMODE; wrapMode: GPWRAPMODE; + out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateLineBrushFromRect} + + function GdipCreateLineBrushFromRectI(rect: GPRECT; color1: ARGB; + color2: ARGB; mode: LINEARGRADIENTMODE; wrapMode: GPWRAPMODE; + out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateLineBrushFromRectI} + + function GdipCreateLineBrushFromRectWithAngle(rect: GPRECTF; color1: ARGB; + color2: ARGB; angle: Single; isAngleScalable: Bool; wrapMode: GPWRAPMODE; + out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateLineBrushFromRectWithAngle} + + function GdipCreateLineBrushFromRectWithAngleI(rect: GPRECT; color1: ARGB; + color2: ARGB; angle: Single; isAngleScalable: Bool; wrapMode: GPWRAPMODE; + out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateLineBrushFromRectWithAngleI} + + function GdipSetLineColors(brush: GPLINEGRADIENT; color1: ARGB; + color2: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetLineColors} + + function GdipGetLineColors(brush: GPLINEGRADIENT; + colors: PARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLineColors} + + function GdipGetLineRect(brush: GPLINEGRADIENT; + rect: GPRECTF): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLineRect} + + function GdipGetLineRectI(brush: GPLINEGRADIENT; + rect: GPRECT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLineRectI} + + function GdipSetLineGammaCorrection(brush: GPLINEGRADIENT; + useGammaCorrection: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetLineGammaCorrection} + + function GdipGetLineGammaCorrection(brush: GPLINEGRADIENT; + out useGammaCorrection: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLineGammaCorrection} + + function GdipGetLineBlendCount(brush: GPLINEGRADIENT; + out count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLineBlendCount} + + function GdipGetLineBlend(brush: GPLINEGRADIENT; blend: PSingle; + positions: PSingle; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLineBlend} + + function GdipSetLineBlend(brush: GPLINEGRADIENT; blend: PSingle; + positions: PSingle; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetLineBlend} + + function GdipGetLinePresetBlendCount(brush: GPLINEGRADIENT; + out count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLinePresetBlendCount} + + function GdipGetLinePresetBlend(brush: GPLINEGRADIENT; blend: PARGB; + positions: PSingle; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLinePresetBlend} + + function GdipSetLinePresetBlend(brush: GPLINEGRADIENT; blend: PARGB; + positions: PSingle; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetLinePresetBlend} + + function GdipSetLineSigmaBlend(brush: GPLINEGRADIENT; focus: Single; + scale: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetLineSigmaBlend} + + function GdipSetLineLinearBlend(brush: GPLINEGRADIENT; focus: Single; + scale: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetLineLinearBlend} + + function GdipSetLineWrapMode(brush: GPLINEGRADIENT; + wrapmode: GPWRAPMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetLineWrapMode} + + function GdipGetLineWrapMode(brush: GPLINEGRADIENT; + out wrapmode: GPWRAPMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLineWrapMode} + + function GdipGetLineTransform(brush: GPLINEGRADIENT; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLineTransform} + + function GdipSetLineTransform(brush: GPLINEGRADIENT; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetLineTransform} + + function GdipResetLineTransform(brush: GPLINEGRADIENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipResetLineTransform} + + function GdipMultiplyLineTransform(brush: GPLINEGRADIENT; matrix: GPMATRIX; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipMultiplyLineTransform} + + function GdipTranslateLineTransform(brush: GPLINEGRADIENT; dx: Single; + dy: Single; order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTranslateLineTransform} + + function GdipScaleLineTransform(brush: GPLINEGRADIENT; sx: Single; sy: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipScaleLineTransform} + + function GdipRotateLineTransform(brush: GPLINEGRADIENT; angle: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRotateLineTransform} + +//---------------------------------------------------------------------------- +// PathGradientBrush APIs +//---------------------------------------------------------------------------- + + function GdipCreatePathGradient(points: GPPOINTF; count: Integer; + wrapMode: GPWRAPMODE; out polyGradient: GPPATHGRADIENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreatePathGradient} + + function GdipCreatePathGradientI(points: GPPOINT; count: Integer; + wrapMode: GPWRAPMODE; out polyGradient: GPPATHGRADIENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreatePathGradientI} + + function GdipCreatePathGradientFromPath(path: GPPATH; + out polyGradient: GPPATHGRADIENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreatePathGradientFromPath} + + function GdipGetPathGradientCenterColor(brush: GPPATHGRADIENT; + out colors: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientCenterColor} + + function GdipSetPathGradientCenterColor(brush: GPPATHGRADIENT; + colors: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientCenterColor} + + function GdipGetPathGradientSurroundColorsWithCount(brush: GPPATHGRADIENT; + color: PARGB; var count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientSurroundColorsWithCount} + + function GdipSetPathGradientSurroundColorsWithCount(brush: GPPATHGRADIENT; + color: PARGB; var count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientSurroundColorsWithCount} + + function GdipGetPathGradientPath(brush: GPPATHGRADIENT; + path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientPath} + + function GdipSetPathGradientPath(brush: GPPATHGRADIENT; + path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientPath} + + function GdipGetPathGradientCenterPoint(brush: GPPATHGRADIENT; + points: GPPOINTF): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientCenterPoint} + + function GdipGetPathGradientCenterPointI(brush: GPPATHGRADIENT; + points: GPPOINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientCenterPointI} + + function GdipSetPathGradientCenterPoint(brush: GPPATHGRADIENT; + points: GPPOINTF): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientCenterPoint} + + function GdipSetPathGradientCenterPointI(brush: GPPATHGRADIENT; + points: GPPOINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientCenterPointI} + + function GdipGetPathGradientRect(brush: GPPATHGRADIENT; + rect: GPRECTF): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientRect} + + function GdipGetPathGradientRectI(brush: GPPATHGRADIENT; + rect: GPRECT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientRectI} + + function GdipGetPathGradientPointCount(brush: GPPATHGRADIENT; + var count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientPointCount} + + function GdipGetPathGradientSurroundColorCount(brush: GPPATHGRADIENT; + var count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientSurroundColorCount} + + function GdipSetPathGradientGammaCorrection(brush: GPPATHGRADIENT; + useGammaCorrection: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientGammaCorrection} + + function GdipGetPathGradientGammaCorrection(brush: GPPATHGRADIENT; + var useGammaCorrection: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientGammaCorrection} + + function GdipGetPathGradientBlendCount(brush: GPPATHGRADIENT; + var count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientBlendCount} + + function GdipGetPathGradientBlend(brush: GPPATHGRADIENT; + blend: PSingle; positions: PSingle; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientBlend} + + function GdipSetPathGradientBlend(brush: GPPATHGRADIENT; + blend: PSingle; positions: PSingle; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientBlend} + + function GdipGetPathGradientPresetBlendCount(brush: GPPATHGRADIENT; + var count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientPresetBlendCount} + + function GdipGetPathGradientPresetBlend(brush: GPPATHGRADIENT; + blend: PARGB; positions: PSingle; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientPresetBlend} + + function GdipSetPathGradientPresetBlend(brush: GPPATHGRADIENT; + blend: PARGB; positions: PSingle; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientPresetBlend} + + function GdipSetPathGradientSigmaBlend(brush: GPPATHGRADIENT; + focus: Single; scale: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientSigmaBlend} + + function GdipSetPathGradientLinearBlend(brush: GPPATHGRADIENT; + focus: Single; scale: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientLinearBlend} + + function GdipGetPathGradientWrapMode(brush: GPPATHGRADIENT; + var wrapmode: GPWRAPMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientWrapMode} + + function GdipSetPathGradientWrapMode(brush: GPPATHGRADIENT; + wrapmode: GPWRAPMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientWrapMode} + + function GdipGetPathGradientTransform(brush: GPPATHGRADIENT; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientTransform} + + function GdipSetPathGradientTransform(brush: GPPATHGRADIENT; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientTransform} + + function GdipResetPathGradientTransform( + brush: GPPATHGRADIENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipResetPathGradientTransform} + + function GdipMultiplyPathGradientTransform(brush: GPPATHGRADIENT; + matrix: GPMATRIX; order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipMultiplyPathGradientTransform} + + function GdipTranslatePathGradientTransform(brush: GPPATHGRADIENT; + dx: Single; dy: Single; order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTranslatePathGradientTransform} + + function GdipScalePathGradientTransform(brush: GPPATHGRADIENT; + sx: Single; sy: Single; order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipScalePathGradientTransform} + + function GdipRotatePathGradientTransform(brush: GPPATHGRADIENT; + angle: Single; order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRotatePathGradientTransform} + + function GdipGetPathGradientFocusScales(brush: GPPATHGRADIENT; + var xScale: Single; var yScale: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPathGradientFocusScales} + + function GdipSetPathGradientFocusScales(brush: GPPATHGRADIENT; + xScale: Single; yScale: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPathGradientFocusScales} + +//---------------------------------------------------------------------------- +// Pen APIs +//---------------------------------------------------------------------------- + + function GdipCreatePen1(color: ARGB; width: Single; unit_: GPUNIT; + out pen: GPPEN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreatePen1} + + function GdipCreatePen2(brush: GPBRUSH; width: Single; unit_: GPUNIT; + out pen: GPPEN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreatePen2} + + function GdipClonePen(pen: GPPEN; out clonepen: GPPEN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipClonePen} + + function GdipDeletePen(pen: GPPEN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeletePen} + + function GdipSetPenWidth(pen: GPPEN; width: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenWidth} + + function GdipGetPenWidth(pen: GPPEN; out width: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenWidth} + + function GdipSetPenUnit(pen: GPPEN; unit_: GPUNIT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenUnit} + + function GdipGetPenUnit(pen: GPPEN; var unit_: GPUNIT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenUnit} + + function GdipSetPenLineCap197819(pen: GPPEN; startCap: GPLINECAP; + endCap: GPLINECAP; dashCap: GPDASHCAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenLineCap197819} + + function GdipSetPenStartCap(pen: GPPEN; + startCap: GPLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenStartCap} + + function GdipSetPenEndCap(pen: GPPEN; endCap: GPLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenEndCap} + + function GdipSetPenDashCap197819(pen: GPPEN; + dashCap: GPDASHCAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenDashCap197819} + + function GdipGetPenStartCap(pen: GPPEN; + out startCap: GPLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenStartCap} + + function GdipGetPenEndCap(pen: GPPEN; + out endCap: GPLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenEndCap} + + function GdipGetPenDashCap197819(pen: GPPEN; + out dashCap: GPDASHCAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenDashCap197819} + + function GdipSetPenLineJoin(pen: GPPEN; + lineJoin: GPLINEJOIN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenLineJoin} + + function GdipGetPenLineJoin(pen: GPPEN; + var lineJoin: GPLINEJOIN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenLineJoin} + + function GdipSetPenCustomStartCap(pen: GPPEN; + customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenCustomStartCap} + + function GdipGetPenCustomStartCap(pen: GPPEN; + out customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenCustomStartCap} + + function GdipSetPenCustomEndCap(pen: GPPEN; + customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenCustomEndCap} + + function GdipGetPenCustomEndCap(pen: GPPEN; + out customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenCustomEndCap} + + function GdipSetPenMiterLimit(pen: GPPEN; + miterLimit: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenMiterLimit} + + function GdipGetPenMiterLimit(pen: GPPEN; + out miterLimit: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenMiterLimit} + + function GdipSetPenMode(pen: GPPEN; + penMode: GPPENALIGNMENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenMode} + + function GdipGetPenMode(pen: GPPEN; + var penMode: GPPENALIGNMENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenMode} + + function GdipSetPenTransform(pen: GPPEN; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenTransform} + + function GdipGetPenTransform(pen: GPPEN; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenTransform} + + function GdipResetPenTransform(pen: GPPEN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipResetPenTransform} + + function GdipMultiplyPenTransform(pen: GPPEN; matrix: GPMATRIX; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipMultiplyPenTransform} + + function GdipTranslatePenTransform(pen: GPPEN; dx: Single; dy: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTranslatePenTransform} + + function GdipScalePenTransform(pen: GPPEN; sx: Single; sy: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipScalePenTransform} + + function GdipRotatePenTransform(pen: GPPEN; angle: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRotatePenTransform} + + function GdipSetPenColor(pen: GPPEN; argb: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenColor} + + function GdipGetPenColor(pen: GPPEN; out argb: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenColor} + + function GdipSetPenBrushFill(pen: GPPEN; brush: GPBRUSH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenBrushFill} + + function GdipGetPenBrushFill(pen: GPPEN; + out brush: GPBRUSH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenBrushFill} + + function GdipGetPenFillType(pen: GPPEN; + out type_: GPPENTYPE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenFillType} + + function GdipGetPenDashStyle(pen: GPPEN; + out dashstyle: GPDASHSTYLE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenDashStyle} + + function GdipSetPenDashStyle(pen: GPPEN; + dashstyle: GPDASHSTYLE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenDashStyle} + + function GdipGetPenDashOffset(pen: GPPEN; + out offset: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenDashOffset} + + function GdipSetPenDashOffset(pen: GPPEN; offset: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenDashOffset} + + function GdipGetPenDashCount(pen: GPPEN; + var count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenDashCount} + + function GdipSetPenDashArray(pen: GPPEN; dash: PSingle; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenDashArray} + + function GdipGetPenDashArray(pen: GPPEN; dash: PSingle; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenDashArray} + + function GdipGetPenCompoundCount(pen: GPPEN; + out count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenCompoundCount} + + function GdipSetPenCompoundArray(pen: GPPEN; dash: PSingle; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPenCompoundArray} + + function GdipGetPenCompoundArray(pen: GPPEN; dash: PSingle; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPenCompoundArray} + +//---------------------------------------------------------------------------- +// CustomLineCap APIs +//---------------------------------------------------------------------------- + + function GdipCreateCustomLineCap(fillPath: GPPATH; strokePath: GPPATH; + baseCap: GPLINECAP; baseInset: Single; + out customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateCustomLineCap} + + function GdipDeleteCustomLineCap( + customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeleteCustomLineCap} + + function GdipCloneCustomLineCap(customCap: GPCUSTOMLINECAP; + out clonedCap: GPCUSTOMLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCloneCustomLineCap} + + function GdipGetCustomLineCapType(customCap: GPCUSTOMLINECAP; + var capType: CUSTOMLINECAPTYPE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetCustomLineCapType} + + function GdipSetCustomLineCapStrokeCaps(customCap: GPCUSTOMLINECAP; + startCap: GPLINECAP; endCap: GPLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetCustomLineCapStrokeCaps} + + function GdipGetCustomLineCapStrokeCaps(customCap: GPCUSTOMLINECAP; + var startCap: GPLINECAP; var endCap: GPLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetCustomLineCapStrokeCaps} + + function GdipSetCustomLineCapStrokeJoin(customCap: GPCUSTOMLINECAP; + lineJoin: GPLINEJOIN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetCustomLineCapStrokeJoin} + + function GdipGetCustomLineCapStrokeJoin(customCap: GPCUSTOMLINECAP; + var lineJoin: GPLINEJOIN): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetCustomLineCapStrokeJoin} + + function GdipSetCustomLineCapBaseCap(customCap: GPCUSTOMLINECAP; + baseCap: GPLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetCustomLineCapBaseCap} + + function GdipGetCustomLineCapBaseCap(customCap: GPCUSTOMLINECAP; + var baseCap: GPLINECAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetCustomLineCapBaseCap} + + function GdipSetCustomLineCapBaseInset(customCap: GPCUSTOMLINECAP; + inset: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetCustomLineCapBaseInset} + + function GdipGetCustomLineCapBaseInset(customCap: GPCUSTOMLINECAP; + var inset: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetCustomLineCapBaseInset} + + function GdipSetCustomLineCapWidthScale(customCap: GPCUSTOMLINECAP; + widthScale: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetCustomLineCapWidthScale} + + function GdipGetCustomLineCapWidthScale(customCap: GPCUSTOMLINECAP; + var widthScale: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetCustomLineCapWidthScale} + +//---------------------------------------------------------------------------- +// AdjustableArrowCap APIs +//---------------------------------------------------------------------------- + + function GdipCreateAdjustableArrowCap(height: Single; + width: Single; + isFilled: Bool; + out cap: GPADJUSTABLEARROWCAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateAdjustableArrowCap} + + function GdipSetAdjustableArrowCapHeight(cap: GPADJUSTABLEARROWCAP; + height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetAdjustableArrowCapHeight} + + function GdipGetAdjustableArrowCapHeight(cap: GPADJUSTABLEARROWCAP; + var height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetAdjustableArrowCapHeight} + + function GdipSetAdjustableArrowCapWidth(cap: GPADJUSTABLEARROWCAP; + width: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetAdjustableArrowCapWidth} + + function GdipGetAdjustableArrowCapWidth(cap: GPADJUSTABLEARROWCAP; + var width: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetAdjustableArrowCapWidth} + + function GdipSetAdjustableArrowCapMiddleInset(cap: GPADJUSTABLEARROWCAP; + middleInset: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetAdjustableArrowCapMiddleInset} + + function GdipGetAdjustableArrowCapMiddleInset(cap: GPADJUSTABLEARROWCAP; + var middleInset: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetAdjustableArrowCapMiddleInset} + + function GdipSetAdjustableArrowCapFillState(cap: GPADJUSTABLEARROWCAP; + fillState: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetAdjustableArrowCapFillState} + + function GdipGetAdjustableArrowCapFillState(cap: GPADJUSTABLEARROWCAP; + var fillState: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetAdjustableArrowCapFillState} + +//---------------------------------------------------------------------------- +// Image APIs +//---------------------------------------------------------------------------- + + function GdipLoadImageFromStream(stream: ISTREAM; + out image: GPIMAGE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipLoadImageFromStream} + + function GdipLoadImageFromFile(filename: PWCHAR; + out image: GPIMAGE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipLoadImageFromFile} + + function GdipLoadImageFromStreamICM(stream: ISTREAM; + out image: GPIMAGE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipLoadImageFromStreamICM} + + function GdipLoadImageFromFileICM(filename: PWCHAR; + out image: GPIMAGE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipLoadImageFromFileICM} + + function GdipCloneImage(image: GPIMAGE; + out cloneImage: GPIMAGE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCloneImage} + + function GdipDisposeImage(image: GPIMAGE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDisposeImage} + + function GdipSaveImageToFile(image: GPIMAGE; + filename: PWCHAR; + clsidEncoder: PGUID; + encoderParams: PENCODERPARAMETERS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSaveImageToFile} + + function GdipSaveImageToStream(image: GPIMAGE; + stream: ISTREAM; + clsidEncoder: PGUID; + encoderParams: PENCODERPARAMETERS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSaveImageToStream} + + function GdipSaveAdd(image: GPIMAGE; + encoderParams: PENCODERPARAMETERS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSaveAdd} + + function GdipSaveAddImage(image: GPIMAGE; + newImage: GPIMAGE; + encoderParams: PENCODERPARAMETERS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSaveAddImage} + + function GdipGetImageGraphicsContext(image: GPIMAGE; + out graphics: GPGRAPHICS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageGraphicsContext} + + function GdipGetImageBounds(image: GPIMAGE; + srcRect: GPRECTF; + var srcUnit: GPUNIT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageBounds} + + function GdipGetImageDimension(image: GPIMAGE; + var width: Single; + var height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageDimension} + + function GdipGetImageType(image: GPIMAGE; + var type_: IMAGETYPE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageType} + + function GdipGetImageWidth(image: GPIMAGE; + var width: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageWidth} + + function GdipGetImageHeight(image: GPIMAGE; + var height: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageHeight} + + function GdipGetImageHorizontalResolution(image: GPIMAGE; + var resolution: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageHorizontalResolution} + + function GdipGetImageVerticalResolution(image: GPIMAGE; + var resolution: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageVerticalResolution} + + function GdipGetImageFlags(image: GPIMAGE; + var flags: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageFlags} + + function GdipGetImageRawFormat(image: GPIMAGE; + format: PGUID): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageRawFormat} + + function GdipGetImagePixelFormat(image: GPIMAGE; + out format: TPIXELFORMAT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImagePixelFormat} + + function GdipGetImageThumbnail(image: GPIMAGE; thumbWidth: UINT; + thumbHeight: UINT; out thumbImage: GPIMAGE; + callback: GETTHUMBNAILIMAGEABORT; callbackData: Pointer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageThumbnail} + + function GdipGetEncoderParameterListSize(image: GPIMAGE; + clsidEncoder: PGUID; out size: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetEncoderParameterListSize} + + function GdipGetEncoderParameterList(image: GPIMAGE; clsidEncoder: PGUID; + size: UINT; buffer: PENCODERPARAMETERS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetEncoderParameterList} + + function GdipImageGetFrameDimensionsCount(image: GPIMAGE; + var count: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipImageGetFrameDimensionsCount} + + function GdipImageGetFrameDimensionsList(image: GPIMAGE; dimensionIDs: PGUID; + count: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipImageGetFrameDimensionsList} + + function GdipImageGetFrameCount(image: GPIMAGE; dimensionID: PGUID; + var count: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipImageGetFrameCount} + + function GdipImageSelectActiveFrame(image: GPIMAGE; dimensionID: PGUID; + frameIndex: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipImageSelectActiveFrame} + + function GdipImageRotateFlip(image: GPIMAGE; + rfType: ROTATEFLIPTYPE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipImageRotateFlip} + + function GdipGetImagePalette(image: GPIMAGE; palette: PCOLORPALETTE; + size: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImagePalette} + + function GdipSetImagePalette(image: GPIMAGE; + palette: PCOLORPALETTE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImagePalette} + + function GdipGetImagePaletteSize(image: GPIMAGE; + var size: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImagePaletteSize} + + function GdipGetPropertyCount(image: GPIMAGE; + var numOfProperty: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPropertyCount} + + function GdipGetPropertyIdList(image: GPIMAGE; numOfProperty: UINT; + list: PPROPID): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPropertyIdList} + + function GdipGetPropertyItemSize(image: GPIMAGE; propId: PROPID; + var size: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPropertyItemSize} + + function GdipGetPropertyItem(image: GPIMAGE; propId: PROPID; propSize: UINT; + buffer: PPROPERTYITEM): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPropertyItem} + + function GdipGetPropertySize(image: GPIMAGE; var totalBufferSize: UINT; + var numProperties: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPropertySize} + + function GdipGetAllPropertyItems(image: GPIMAGE; totalBufferSize: UINT; + numProperties: UINT; allItems: PPROPERTYITEM): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetAllPropertyItems} + + function GdipRemovePropertyItem(image: GPIMAGE; + propId: PROPID): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRemovePropertyItem} + + function GdipSetPropertyItem(image: GPIMAGE; + item: PPROPERTYITEM): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPropertyItem} + + function GdipImageForceValidation(image: GPIMAGE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipImageForceValidation} + +//---------------------------------------------------------------------------- +// Bitmap APIs +//---------------------------------------------------------------------------- + + function GdipCreateBitmapFromStream(stream: ISTREAM; + out bitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateBitmapFromStream} + + function GdipCreateBitmapFromFile(filename: PWCHAR; + out bitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateBitmapFromFile} + + function GdipCreateBitmapFromStreamICM(stream: ISTREAM; + out bitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateBitmapFromStreamICM} + + function GdipCreateBitmapFromFileICM(filename: PWCHAR; + var bitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateBitmapFromFileICM} + + function GdipCreateBitmapFromScan0(width: Integer; height: Integer; + stride: Integer; format: PIXELFORMAT; scan0: PBYTE; + out bitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateBitmapFromScan0} + + function GdipCreateBitmapFromGraphics(width: Integer; height: Integer; + target: GPGRAPHICS; out bitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateBitmapFromGraphics} + + function GdipCreateBitmapFromGdiDib(gdiBitmapInfo: PBitmapInfo; + gdiBitmapData: Pointer; out bitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateBitmapFromGdiDib} + + function GdipCreateBitmapFromHBITMAP(hbm: HBITMAP; hpal: HPALETTE; + out bitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateBitmapFromHBITMAP} + + function GdipCreateHBITMAPFromBitmap(bitmap: GPBITMAP; out hbmReturn: HBITMAP; + background: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateHBITMAPFromBitmap} + + function GdipCreateBitmapFromHICON(hicon: HICON; + out bitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateBitmapFromHICON} + + function GdipCreateHICONFromBitmap(bitmap: GPBITMAP; + out hbmReturn: HICON): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateHICONFromBitmap} + + function GdipCreateBitmapFromResource(hInstance: HMODULE; + lpBitmapName: PWCHAR; out bitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateBitmapFromResource} + + function GdipCloneBitmapArea(x: Single; y: Single; width: Single; + height: Single; format: PIXELFORMAT; srcBitmap: GPBITMAP; + out dstBitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCloneBitmapArea} + + function GdipCloneBitmapAreaI(x: Integer; y: Integer; width: Integer; + height: Integer; format: PIXELFORMAT; srcBitmap: GPBITMAP; + out dstBitmap: GPBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCloneBitmapAreaI} + + function GdipBitmapLockBits(bitmap: GPBITMAP; rect: GPRECT; flags: UINT; + format: PIXELFORMAT; lockedBitmapData: PBITMAPDATA): GPSTATUS; stdcall; + {$EXTERNALSYM GdipBitmapLockBits} + + function GdipBitmapUnlockBits(bitmap: GPBITMAP; + lockedBitmapData: PBITMAPDATA): GPSTATUS; stdcall; + {$EXTERNALSYM GdipBitmapUnlockBits} + + function GdipBitmapGetPixel(bitmap: GPBITMAP; x: Integer; y: Integer; + var color: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipBitmapGetPixel} + + function GdipBitmapSetPixel(bitmap: GPBITMAP; x: Integer; y: Integer; + color: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipBitmapSetPixel} + + function GdipBitmapSetResolution(bitmap: GPBITMAP; xdpi: Single; + ydpi: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipBitmapSetResolution} + +//---------------------------------------------------------------------------- +// ImageAttributes APIs +//---------------------------------------------------------------------------- + + function GdipCreateImageAttributes( + out imageattr: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateImageAttributes} + + function GdipCloneImageAttributes(imageattr: GPIMAGEATTRIBUTES; + out cloneImageattr: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCloneImageAttributes} + + function GdipDisposeImageAttributes( + imageattr: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDisposeImageAttributes} + + function GdipSetImageAttributesToIdentity(imageattr: GPIMAGEATTRIBUTES; + type_: COLORADJUSTTYPE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImageAttributesToIdentity} + + function GdipResetImageAttributes(imageattr: GPIMAGEATTRIBUTES; + type_: COLORADJUSTTYPE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipResetImageAttributes} + + function GdipSetImageAttributesColorMatrix(imageattr: GPIMAGEATTRIBUTES; + type_: COLORADJUSTTYPE; enableFlag: Bool; colorMatrix: PCOLORMATRIX; + grayMatrix: PCOLORMATRIX; flags: COLORMATRIXFLAGS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImageAttributesColorMatrix} + + function GdipSetImageAttributesThreshold(imageattr: GPIMAGEATTRIBUTES; + type_: COLORADJUSTTYPE; enableFlag: Bool; + threshold: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImageAttributesThreshold} + + function GdipSetImageAttributesGamma(imageattr: GPIMAGEATTRIBUTES; + type_: COLORADJUSTTYPE; enableFlag: Bool; gamma: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImageAttributesGamma} + + function GdipSetImageAttributesNoOp(imageattr: GPIMAGEATTRIBUTES; + type_: COLORADJUSTTYPE; enableFlag: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImageAttributesNoOp} + + function GdipSetImageAttributesColorKeys(imageattr: GPIMAGEATTRIBUTES; + type_: COLORADJUSTTYPE; enableFlag: Bool; colorLow: ARGB; + colorHigh: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImageAttributesColorKeys} + + function GdipSetImageAttributesOutputChannel(imageattr: GPIMAGEATTRIBUTES; + type_: COLORADJUSTTYPE; enableFlag: Bool; + channelFlags: COLORCHANNELFLAGS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImageAttributesOutputChannel} + + function GdipSetImageAttributesOutputChannelColorProfile(imageattr: GPIMAGEATTRIBUTES; + type_: COLORADJUSTTYPE; enableFlag: Bool; + colorProfileFilename: PWCHAR): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImageAttributesOutputChannelColorProfile} + + function GdipSetImageAttributesRemapTable(imageattr: GPIMAGEATTRIBUTES; + type_: COLORADJUSTTYPE; enableFlag: Bool; mapSize: UINT; + map: PCOLORMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImageAttributesRemapTable} + + function GdipSetImageAttributesWrapMode(imageAttr: GPIMAGEATTRIBUTES; + wrap: WRAPMODE; argb: ARGB; clamp: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImageAttributesWrapMode} + + function GdipSetImageAttributesICMMode(imageAttr: GPIMAGEATTRIBUTES; + on_: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetImageAttributesICMMode} + + function GdipGetImageAttributesAdjustedPalette(imageAttr: GPIMAGEATTRIBUTES; + colorPalette: PCOLORPALETTE; + colorAdjustType: COLORADJUSTTYPE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageAttributesAdjustedPalette} + +//---------------------------------------------------------------------------- +// Graphics APIs +//---------------------------------------------------------------------------- + + function GdipFlush(graphics: GPGRAPHICS; + intention: GPFLUSHINTENTION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFlush} + + function GdipCreateFromHDC(hdc: HDC; + out graphics: GPGRAPHICS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateFromHDC} + + function GdipCreateFromHDC2(hdc: HDC; hDevice: THandle; + out graphics: GPGRAPHICS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateFromHDC2} + + function GdipCreateFromHWND(hwnd: HWND; + out graphics: GPGRAPHICS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateFromHWND} + + function GdipCreateFromHWNDICM(hwnd: HWND; + out graphics: GPGRAPHICS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateFromHWNDICM} + + function GdipDeleteGraphics(graphics: GPGRAPHICS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeleteGraphics} + + function GdipGetDC(graphics: GPGRAPHICS; var hdc: HDC): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetDC} + + function GdipReleaseDC(graphics: GPGRAPHICS; hdc: HDC): GPSTATUS; stdcall; + {$EXTERNALSYM GdipReleaseDC} + + function GdipSetCompositingMode(graphics: GPGRAPHICS; + compositingMode: COMPOSITINGMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetCompositingMode} + + function GdipGetCompositingMode(graphics: GPGRAPHICS; + var compositingMode: COMPOSITINGMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetCompositingMode} + + function GdipSetRenderingOrigin(graphics: GPGRAPHICS; x: Integer; + y: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetRenderingOrigin} + + function GdipGetRenderingOrigin(graphics: GPGRAPHICS; var x: Integer; + var y: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetRenderingOrigin} + + function GdipSetCompositingQuality(graphics: GPGRAPHICS; + compositingQuality: COMPOSITINGQUALITY): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetCompositingQuality} + + function GdipGetCompositingQuality(graphics: GPGRAPHICS; + var compositingQuality: COMPOSITINGQUALITY): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetCompositingQuality} + + function GdipSetSmoothingMode(graphics: GPGRAPHICS; + smoothingMode: SMOOTHINGMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetSmoothingMode} + + function GdipGetSmoothingMode(graphics: GPGRAPHICS; + var smoothingMode: SMOOTHINGMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetSmoothingMode} + + function GdipSetPixelOffsetMode(graphics: GPGRAPHICS; + pixelOffsetMode: PIXELOFFSETMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPixelOffsetMode} + + function GdipGetPixelOffsetMode(graphics: GPGRAPHICS; + var pixelOffsetMode: PIXELOFFSETMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPixelOffsetMode} + + function GdipSetTextRenderingHint(graphics: GPGRAPHICS; + mode: TEXTRENDERINGHINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetTextRenderingHint} + + function GdipGetTextRenderingHint(graphics: GPGRAPHICS; + var mode: TEXTRENDERINGHINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetTextRenderingHint} + + function GdipSetTextContrast(graphics: GPGRAPHICS; + contrast: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetTextContrast} + + function GdipGetTextContrast(graphics: GPGRAPHICS; + var contrast: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetTextContrast} + + function GdipSetInterpolationMode(graphics: GPGRAPHICS; + interpolationMode: INTERPOLATIONMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetInterpolationMode} + + function GdipGetInterpolationMode(graphics: GPGRAPHICS; + var interpolationMode: INTERPOLATIONMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetInterpolationMode} + + function GdipSetWorldTransform(graphics: GPGRAPHICS; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetWorldTransform} + + function GdipResetWorldTransform(graphics: GPGRAPHICS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipResetWorldTransform} + + function GdipMultiplyWorldTransform(graphics: GPGRAPHICS; matrix: GPMATRIX; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipMultiplyWorldTransform} + + function GdipTranslateWorldTransform(graphics: GPGRAPHICS; dx: Single; + dy: Single; order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTranslateWorldTransform} + + function GdipScaleWorldTransform(graphics: GPGRAPHICS; sx: Single; sy: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipScaleWorldTransform} + + function GdipRotateWorldTransform(graphics: GPGRAPHICS; angle: Single; + order: GPMATRIXORDER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRotateWorldTransform} + + function GdipGetWorldTransform(graphics: GPGRAPHICS; + matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetWorldTransform} + + function GdipResetPageTransform(graphics: GPGRAPHICS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipResetPageTransform} + + function GdipGetPageUnit(graphics: GPGRAPHICS; + var unit_: GPUNIT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPageUnit} + + function GdipGetPageScale(graphics: GPGRAPHICS; + var scale: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetPageScale} + + function GdipSetPageUnit(graphics: GPGRAPHICS; + unit_: GPUNIT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPageUnit} + + function GdipSetPageScale(graphics: GPGRAPHICS; + scale: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetPageScale} + + function GdipGetDpiX(graphics: GPGRAPHICS; + var dpi: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetDpiX} + + function GdipGetDpiY(graphics: GPGRAPHICS; + var dpi: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetDpiY} + + function GdipTransformPoints(graphics: GPGRAPHICS; + destSpace: GPCOORDINATESPACE; srcSpace: GPCOORDINATESPACE; + points: GPPOINTF; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTransformPoints} + + function GdipTransformPointsI(graphics: GPGRAPHICS; + destSpace: GPCOORDINATESPACE; srcSpace: GPCOORDINATESPACE; + points: GPPOINT; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTransformPointsI} + + function GdipGetNearestColor(graphics: GPGRAPHICS; + argb: PARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetNearestColor} + +// Creates the Win9x Halftone Palette (even on NT) with correct Desktop colors + + function GdipCreateHalftonePalette: HPALETTE; stdcall; + {$EXTERNALSYM GdipCreateHalftonePalette} + + function GdipDrawLine(graphics: GPGRAPHICS; pen: GPPEN; x1: Single; + y1: Single; x2: Single; y2: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawLine} + + function GdipDrawLineI(graphics: GPGRAPHICS; pen: GPPEN; x1: Integer; + y1: Integer; x2: Integer; y2: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawLineI} + + function GdipDrawLines(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawLines} + + function GdipDrawLinesI(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawLinesI} + + function GdipDrawArc(graphics: GPGRAPHICS; pen: GPPEN; x: Single; y: Single; + width: Single; height: Single; startAngle: Single; + sweepAngle: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawArc} + + function GdipDrawArcI(graphics: GPGRAPHICS; pen: GPPEN; x: Integer; + y: Integer; width: Integer; height: Integer; startAngle: Single; + sweepAngle: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawArcI} + + function GdipDrawBezier(graphics: GPGRAPHICS; pen: GPPEN; x1: Single; + y1: Single; x2: Single; y2: Single; x3: Single; y3: Single; x4: Single; + y4: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawBezier} + + function GdipDrawBezierI(graphics: GPGRAPHICS; pen: GPPEN; x1: Integer; + y1: Integer; x2: Integer; y2: Integer; x3: Integer; y3: Integer; + x4: Integer; y4: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawBezierI} + + function GdipDrawBeziers(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawBeziers} + + function GdipDrawBeziersI(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawBeziersI} + + function GdipDrawRectangle(graphics: GPGRAPHICS; pen: GPPEN; x: Single; + y: Single; width: Single; height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawRectangle} + + function GdipDrawRectangleI(graphics: GPGRAPHICS; pen: GPPEN; x: Integer; + y: Integer; width: Integer; height: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawRectangleI} + + function GdipDrawRectangles(graphics: GPGRAPHICS; pen: GPPEN; rects: GPRECTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawRectangles} + + function GdipDrawRectanglesI(graphics: GPGRAPHICS; pen: GPPEN; rects: GPRECT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawRectanglesI} + + function GdipDrawEllipse(graphics: GPGRAPHICS; pen: GPPEN; x: Single; + y: Single; width: Single; height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawEllipse} + + function GdipDrawEllipseI(graphics: GPGRAPHICS; pen: GPPEN; x: Integer; + y: Integer; width: Integer; height: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawEllipseI} + + function GdipDrawPie(graphics: GPGRAPHICS; pen: GPPEN; x: Single; y: Single; + width: Single; height: Single; startAngle: Single; + sweepAngle: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawPie} + + function GdipDrawPieI(graphics: GPGRAPHICS; pen: GPPEN; x: Integer; + y: Integer; width: Integer; height: Integer; startAngle: Single; + sweepAngle: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawPieI} + + function GdipDrawPolygon(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawPolygon} + + function GdipDrawPolygonI(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawPolygonI} + + function GdipDrawPath(graphics: GPGRAPHICS; pen: GPPEN; + path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawPath} + + function GdipDrawCurve(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawCurve} + + function GdipDrawCurveI(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT; + count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawCurveI} + + function GdipDrawCurve2(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF; + count: Integer; tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawCurve2} + + function GdipDrawCurve2I(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT; + count: Integer; tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawCurve2I} + + function GdipDrawCurve3(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF; + count: Integer; offset: Integer; numberOfSegments: Integer; + tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawCurve3} + + function GdipDrawCurve3I(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT; + count: Integer; offset: Integer; numberOfSegments: Integer; + tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawCurve3I} + + function GdipDrawClosedCurve(graphics: GPGRAPHICS; pen: GPPEN; + points: GPPOINTF; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawClosedCurve} + + function GdipDrawClosedCurveI(graphics: GPGRAPHICS; pen: GPPEN; + points: GPPOINT; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawClosedCurveI} + + function GdipDrawClosedCurve2(graphics: GPGRAPHICS; pen: GPPEN; + points: GPPOINTF; count: Integer; tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawClosedCurve2} + + function GdipDrawClosedCurve2I(graphics: GPGRAPHICS; pen: GPPEN; + points: GPPOINT; count: Integer; tension: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawClosedCurve2I} + + function GdipGraphicsClear(graphics: GPGRAPHICS; + color: ARGB): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGraphicsClear} + + function GdipFillRectangle(graphics: GPGRAPHICS; brush: GPBRUSH; x: Single; + y: Single; width: Single; height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillRectangle} + + function GdipFillRectangleI(graphics: GPGRAPHICS; brush: GPBRUSH; x: Integer; + y: Integer; width: Integer; height: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillRectangleI} + + function GdipFillRectangles(graphics: GPGRAPHICS; brush: GPBRUSH; + rects: GPRECTF; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillRectangles} + + function GdipFillRectanglesI(graphics: GPGRAPHICS; brush: GPBRUSH; + rects: GPRECT; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillRectanglesI} + + function GdipFillPolygon(graphics: GPGRAPHICS; brush: GPBRUSH; + points: GPPOINTF; count: Integer; fillMode: GPFILLMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillPolygon} + + function GdipFillPolygonI(graphics: GPGRAPHICS; brush: GPBRUSH; + points: GPPOINT; count: Integer; fillMode: GPFILLMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillPolygonI} + + function GdipFillPolygon2(graphics: GPGRAPHICS; brush: GPBRUSH; + points: GPPOINTF; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillPolygon2} + + function GdipFillPolygon2I(graphics: GPGRAPHICS; brush: GPBRUSH; + points: GPPOINT; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillPolygon2I} + + function GdipFillEllipse(graphics: GPGRAPHICS; brush: GPBRUSH; x: Single; + y: Single; width: Single; height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillEllipse} + + function GdipFillEllipseI(graphics: GPGRAPHICS; brush: GPBRUSH; x: Integer; + y: Integer; width: Integer; height: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillEllipseI} + + function GdipFillPie(graphics: GPGRAPHICS; brush: GPBRUSH; x: Single; + y: Single; width: Single; height: Single; startAngle: Single; + sweepAngle: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillPie} + + function GdipFillPieI(graphics: GPGRAPHICS; brush: GPBRUSH; x: Integer; + y: Integer; width: Integer; height: Integer; startAngle: Single; + sweepAngle: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillPieI} + + function GdipFillPath(graphics: GPGRAPHICS; brush: GPBRUSH; + path: GPPATH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillPath} + + function GdipFillClosedCurve(graphics: GPGRAPHICS; brush: GPBRUSH; + points: GPPOINTF; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillClosedCurve} + + function GdipFillClosedCurveI(graphics: GPGRAPHICS; brush: GPBRUSH; + points: GPPOINT; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillClosedCurveI} + + function GdipFillClosedCurve2(graphics: GPGRAPHICS; brush: GPBRUSH; + points: GPPOINTF; count: Integer; tension: Single; + fillMode: GPFILLMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillClosedCurve2} + + function GdipFillClosedCurve2I(graphics: GPGRAPHICS; brush: GPBRUSH; + points: GPPOINT; count: Integer; tension: Single; + fillMode: GPFILLMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillClosedCurve2I} + + function GdipFillRegion(graphics: GPGRAPHICS; brush: GPBRUSH; + region: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFillRegion} + + function GdipDrawImage(graphics: GPGRAPHICS; image: GPIMAGE; x: Single; + y: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImage} + + function GdipDrawImageI(graphics: GPGRAPHICS; image: GPIMAGE; x: Integer; + y: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImageI} + + function GdipDrawImageRect(graphics: GPGRAPHICS; image: GPIMAGE; x: Single; + y: Single; width: Single; height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImageRect} + + function GdipDrawImageRectI(graphics: GPGRAPHICS; image: GPIMAGE; x: Integer; + y: Integer; width: Integer; height: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImageRectI} + + function GdipDrawImagePoints(graphics: GPGRAPHICS; image: GPIMAGE; + dstpoints: GPPOINTF; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImagePoints} + + function GdipDrawImagePointsI(graphics: GPGRAPHICS; image: GPIMAGE; + dstpoints: GPPOINT; count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImagePointsI} + + function GdipDrawImagePointRect(graphics: GPGRAPHICS; image: GPIMAGE; + x: Single; y: Single; srcx: Single; srcy: Single; srcwidth: Single; + srcheight: Single; srcUnit: GPUNIT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImagePointRect} + + function GdipDrawImagePointRectI(graphics: GPGRAPHICS; image: GPIMAGE; + x: Integer; y: Integer; srcx: Integer; srcy: Integer; srcwidth: Integer; + srcheight: Integer; srcUnit: GPUNIT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImagePointRectI} + + function GdipDrawImageRectRect(graphics: GPGRAPHICS; image: GPIMAGE; + dstx: Single; dsty: Single; dstwidth: Single; dstheight: Single; + srcx: Single; srcy: Single; srcwidth: Single; srcheight: Single; + srcUnit: GPUNIT; imageAttributes: GPIMAGEATTRIBUTES; + callback: DRAWIMAGEABORT; callbackData: Pointer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImageRectRect} + + function GdipDrawImageRectRectI(graphics: GPGRAPHICS; image: GPIMAGE; + dstx: Integer; dsty: Integer; dstwidth: Integer; dstheight: Integer; + srcx: Integer; srcy: Integer; srcwidth: Integer; srcheight: Integer; + srcUnit: GPUNIT; imageAttributes: GPIMAGEATTRIBUTES; + callback: DRAWIMAGEABORT; callbackData: Pointer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImageRectRectI} + + function GdipDrawImagePointsRect(graphics: GPGRAPHICS; image: GPIMAGE; + points: GPPOINTF; count: Integer; srcx: Single; srcy: Single; + srcwidth: Single; srcheight: Single; srcUnit: GPUNIT; + imageAttributes: GPIMAGEATTRIBUTES; callback: DRAWIMAGEABORT; + callbackData: Pointer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImagePointsRect} + + function GdipDrawImagePointsRectI(graphics: GPGRAPHICS; image: GPIMAGE; + points: GPPOINT; count: Integer; srcx: Integer; srcy: Integer; + srcwidth: Integer; srcheight: Integer; srcUnit: GPUNIT; + imageAttributes: GPIMAGEATTRIBUTES; callback: DRAWIMAGEABORT; + callbackData: Pointer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawImagePointsRectI} + + function GdipEnumerateMetafileDestPoint(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destPoint: PGPPointF; callback: ENUMERATEMETAFILEPROC; + callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileDestPoint} + + function GdipEnumerateMetafileDestPointI(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destPoint: PGPPoint; callback: ENUMERATEMETAFILEPROC; + callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileDestPointI} + + function GdipEnumerateMetafileDestRect(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destRect: PGPRectF; callback: ENUMERATEMETAFILEPROC; + callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileDestRect} + + function GdipEnumerateMetafileDestRectI(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destRect: PGPRect; callback: ENUMERATEMETAFILEPROC; + callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileDestRectI} + + function GdipEnumerateMetafileDestPoints(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destPoints: PGPPointF; count: Integer; + callback: ENUMERATEMETAFILEPROC; callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileDestPoints} + + function GdipEnumerateMetafileDestPointsI(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destPoints: PGPPoint; count: Integer; + callback: ENUMERATEMETAFILEPROC; callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileDestPointsI} + + function GdipEnumerateMetafileSrcRectDestPoint(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destPoint: PGPPointF; srcRect: PGPRectF; srcUnit: TUNIT; + callback: ENUMERATEMETAFILEPROC; callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestPoint} + + function GdipEnumerateMetafileSrcRectDestPointI(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destPoint: PGPPoint; srcRect: PGPRect; srcUnit: TUNIT; + callback: ENUMERATEMETAFILEPROC; callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestPointI} + + function GdipEnumerateMetafileSrcRectDestRect(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destRect: PGPRectF; srcRect: PGPRectF; srcUnit: TUNIT; + callback: ENUMERATEMETAFILEPROC; callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestRect} + + function GdipEnumerateMetafileSrcRectDestRectI(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destRect: PGPRect; srcRect: PGPRect; srcUnit: TUNIT; + callback: ENUMERATEMETAFILEPROC; callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestRectI} + + function GdipEnumerateMetafileSrcRectDestPoints(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destPoints: PGPPointF; count: Integer; srcRect: PGPRectF; + srcUnit: TUNIT; callback: ENUMERATEMETAFILEPROC; callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestPoints} + + function GdipEnumerateMetafileSrcRectDestPointsI(graphics: GPGRAPHICS; + metafile: GPMETAFILE; destPoints: PGPPoint; count: Integer; srcRect: PGPRect; + srcUnit: TUNIT; callback: ENUMERATEMETAFILEPROC; callbackData: Pointer; + imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestPointsI} + + function GdipPlayMetafileRecord(metafile: GPMETAFILE; + recordType: EMFPLUSRECORDTYPE; flags: UINT; dataSize: UINT; + data: PBYTE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPlayMetafileRecord} + + function GdipSetClipGraphics(graphics: GPGRAPHICS; srcgraphics: GPGRAPHICS; + combineMode: COMBINEMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetClipGraphics} + + function GdipSetClipRect(graphics: GPGRAPHICS; x: Single; y: Single; + width: Single; height: Single; combineMode: COMBINEMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetClipRect} + + function GdipSetClipRectI(graphics: GPGRAPHICS; x: Integer; y: Integer; + width: Integer; height: Integer; + combineMode: COMBINEMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetClipRectI} + + function GdipSetClipPath(graphics: GPGRAPHICS; path: GPPATH; + combineMode: COMBINEMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetClipPath} + + function GdipSetClipRegion(graphics: GPGRAPHICS; region: GPREGION; + combineMode: COMBINEMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetClipRegion} + + function GdipSetClipHrgn(graphics: GPGRAPHICS; hRgn: HRGN; + combineMode: COMBINEMODE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetClipHrgn} + + function GdipResetClip(graphics: GPGRAPHICS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipResetClip} + + function GdipTranslateClip(graphics: GPGRAPHICS; dx: Single; + dy: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTranslateClip} + + function GdipTranslateClipI(graphics: GPGRAPHICS; dx: Integer; + dy: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipTranslateClipI} + + function GdipGetClip(graphics: GPGRAPHICS; + region: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetClip} + + function GdipGetClipBounds(graphics: GPGRAPHICS; + rect: GPRECTF): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetClipBounds} + + function GdipGetClipBoundsI(graphics: GPGRAPHICS; + rect: GPRECT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetClipBoundsI} + + function GdipIsClipEmpty(graphics: GPGRAPHICS; + result: PBool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsClipEmpty} + + function GdipGetVisibleClipBounds(graphics: GPGRAPHICS; + rect: GPRECTF): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetVisibleClipBounds} + + function GdipGetVisibleClipBoundsI(graphics: GPGRAPHICS; + rect: GPRECT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetVisibleClipBoundsI} + + function GdipIsVisibleClipEmpty(graphics: GPGRAPHICS; + var result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsVisibleClipEmpty} + + function GdipIsVisiblePoint(graphics: GPGRAPHICS; x: Single; y: Single; + var result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsVisiblePoint} + + function GdipIsVisiblePointI(graphics: GPGRAPHICS; x: Integer; y: Integer; + var result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsVisiblePointI} + + function GdipIsVisibleRect(graphics: GPGRAPHICS; x: Single; y: Single; + width: Single; height: Single; var result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsVisibleRect} + + function GdipIsVisibleRectI(graphics: GPGRAPHICS; x: Integer; y: Integer; + width: Integer; height: Integer; var result: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsVisibleRectI} + + function GdipSaveGraphics(graphics: GPGRAPHICS; + var state: GRAPHICSSTATE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSaveGraphics} + + function GdipRestoreGraphics(graphics: GPGRAPHICS; + state: GRAPHICSSTATE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRestoreGraphics} + + function GdipBeginContainer(graphics: GPGRAPHICS; dstrect: GPRECTF; + srcrect: GPRECTF; unit_: GPUNIT; + var state: GRAPHICSCONTAINER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipBeginContainer} + + function GdipBeginContainerI(graphics: GPGRAPHICS; dstrect: GPRECT; + srcrect: GPRECT; unit_: GPUNIT; + var state: GRAPHICSCONTAINER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipBeginContainerI} + + function GdipBeginContainer2(graphics: GPGRAPHICS; + var state: GRAPHICSCONTAINER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipBeginContainer2} + + function GdipEndContainer(graphics: GPGRAPHICS; + state: GRAPHICSCONTAINER): GPSTATUS; stdcall; + {$EXTERNALSYM GdipEndContainer} + + function GdipGetMetafileHeaderFromWmf(hWmf: HMETAFILE; + wmfPlaceableFileHeader: PWMFPLACEABLEFILEHEADER; + header: Pointer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetMetafileHeaderFromWmf} + + function GdipGetMetafileHeaderFromEmf(hEmf: HENHMETAFILE; + header: Pointer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetMetafileHeaderFromEmf} + + function GdipGetMetafileHeaderFromFile(filename: PWCHAR; + header: Pointer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetMetafileHeaderFromFile} + + function GdipGetMetafileHeaderFromStream(stream: ISTREAM; + header: Pointer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetMetafileHeaderFromStream} + + function GdipGetMetafileHeaderFromMetafile(metafile: GPMETAFILE; + header: Pointer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetMetafileHeaderFromMetafile} + + function GdipGetHemfFromMetafile(metafile: GPMETAFILE; + var hEmf: HENHMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetHemfFromMetafile} + + function GdipCreateStreamOnFile(filename: PWCHAR; access: UINT; + out stream: ISTREAM): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateStreamOnFile} + + function GdipCreateMetafileFromWmf(hWmf: HMETAFILE; deleteWmf: Bool; + wmfPlaceableFileHeader: PWMFPLACEABLEFILEHEADER; + out metafile: GPMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateMetafileFromWmf} + + function GdipCreateMetafileFromEmf(hEmf: HENHMETAFILE; deleteEmf: Bool; + out metafile: GPMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateMetafileFromEmf} + + function GdipCreateMetafileFromFile(file_: PWCHAR; + out metafile: GPMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateMetafileFromFile} + + function GdipCreateMetafileFromWmfFile(file_: PWCHAR; + wmfPlaceableFileHeader: PWMFPLACEABLEFILEHEADER; + out metafile: GPMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateMetafileFromWmfFile} + + function GdipCreateMetafileFromStream(stream: ISTREAM; + out metafile: GPMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateMetafileFromStream} + + function GdipRecordMetafile(referenceHdc: HDC; type_: EMFTYPE; + frameRect: GPRECTF; frameUnit: METAFILEFRAMEUNIT; + description: PWCHAR; out metafile: GPMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRecordMetafile} + + function GdipRecordMetafileI(referenceHdc: HDC; type_: EMFTYPE; + frameRect: GPRECT; frameUnit: METAFILEFRAMEUNIT; description: PWCHAR; + out metafile: GPMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRecordMetafileI} + + function GdipRecordMetafileFileName(fileName: PWCHAR; referenceHdc: HDC; + type_: EMFTYPE; frameRect: GPRECTF; frameUnit: METAFILEFRAMEUNIT; + description: PWCHAR; out metafile: GPMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRecordMetafileFileName} + + function GdipRecordMetafileFileNameI(fileName: PWCHAR; referenceHdc: HDC; + type_: EMFTYPE; frameRect: GPRECT; frameUnit: METAFILEFRAMEUNIT; + description: PWCHAR; out metafile: GPMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRecordMetafileFileNameI} + + function GdipRecordMetafileStream(stream: ISTREAM; referenceHdc: HDC; + type_: EMFTYPE; frameRect: GPRECTF; frameUnit: METAFILEFRAMEUNIT; + description: PWCHAR; out metafile: GPMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRecordMetafileStream} + + function GdipRecordMetafileStreamI(stream: ISTREAM; referenceHdc: HDC; + type_: EMFTYPE; frameRect: GPRECT; frameUnit: METAFILEFRAMEUNIT; + description: PWCHAR; out metafile: GPMETAFILE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipRecordMetafileStreamI} + + function GdipSetMetafileDownLevelRasterizationLimit(metafile: GPMETAFILE; + metafileRasterizationLimitDpi: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetMetafileDownLevelRasterizationLimit} + + function GdipGetMetafileDownLevelRasterizationLimit(metafile: GPMETAFILE; + var metafileRasterizationLimitDpi: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetMetafileDownLevelRasterizationLimit} + + function GdipGetImageDecodersSize(out numDecoders: UINT; + out size: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageDecodersSize} + + function GdipGetImageDecoders(numDecoders: UINT; size: UINT; + decoders: PIMAGECODECINFO): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageDecoders} + + function GdipGetImageEncodersSize(out numEncoders: UINT; + out size: UINT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageEncodersSize} + + function GdipGetImageEncoders(numEncoders: UINT; size: UINT; + encoders: PIMAGECODECINFO): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetImageEncoders} + + function GdipComment(graphics: GPGRAPHICS; sizeData: UINT; + data: PBYTE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipComment} + +//---------------------------------------------------------------------------- +// FontFamily APIs +//---------------------------------------------------------------------------- + + function GdipCreateFontFamilyFromName(name: PWCHAR; + fontCollection: GPFONTCOLLECTION; + out FontFamily: GPFONTFAMILY): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateFontFamilyFromName} + + function GdipDeleteFontFamily(FontFamily: GPFONTFAMILY): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeleteFontFamily} + + function GdipCloneFontFamily(FontFamily: GPFONTFAMILY; + out clonedFontFamily: GPFONTFAMILY): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCloneFontFamily} + + function GdipGetGenericFontFamilySansSerif( + out nativeFamily: GPFONTFAMILY): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetGenericFontFamilySansSerif} + + function GdipGetGenericFontFamilySerif( + out nativeFamily: GPFONTFAMILY): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetGenericFontFamilySerif} + + function GdipGetGenericFontFamilyMonospace( + out nativeFamily: GPFONTFAMILY): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetGenericFontFamilyMonospace} + + function GdipGetFamilyName(family: GPFONTFAMILY; name: PWideChar; + language: LANGID): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetFamilyName} + + function GdipIsStyleAvailable(family: GPFONTFAMILY; style: Integer; + var IsStyleAvailable: Bool): GPSTATUS; stdcall; + {$EXTERNALSYM GdipIsStyleAvailable} + + function GdipFontCollectionEnumerable(fontCollection: GPFONTCOLLECTION; + graphics: GPGRAPHICS; var numFound: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFontCollectionEnumerable} + + function GdipFontCollectionEnumerate(fontCollection: GPFONTCOLLECTION; + numSought: Integer; gpfamilies: array of GPFONTFAMILY; + var numFound: Integer; graphics: GPGRAPHICS): GPSTATUS; stdcall; + {$EXTERNALSYM GdipFontCollectionEnumerate} + + function GdipGetEmHeight(family: GPFONTFAMILY; style: Integer; + out EmHeight: UINT16): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetEmHeight} + + function GdipGetCellAscent(family: GPFONTFAMILY; style: Integer; + var CellAscent: UINT16): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetCellAscent} + + function GdipGetCellDescent(family: GPFONTFAMILY; style: Integer; + var CellDescent: UINT16): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetCellDescent} + + function GdipGetLineSpacing(family: GPFONTFAMILY; style: Integer; + var LineSpacing: UINT16): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLineSpacing} + +//---------------------------------------------------------------------------- +// Font APIs +//---------------------------------------------------------------------------- + + function GdipCreateFontFromDC(hdc: HDC; out font: GPFONT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateFontFromDC} + + function GdipCreateFontFromLogfontA(hdc: HDC; logfont: PLOGFONTA; + out font: GPFONT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateFontFromLogfontA} + + function GdipCreateFontFromLogfontW(hdc: HDC; logfont: PLOGFONTW; + out font: GPFONT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateFontFromLogfontW} + + function GdipCreateFont(fontFamily: GPFONTFAMILY; emSize: Single; + style: Integer; unit_: Integer; out font: GPFONT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateFont} + + function GdipCloneFont(font: GPFONT; + out cloneFont: GPFONT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCloneFont} + + function GdipDeleteFont(font: GPFONT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeleteFont} + + function GdipGetFamily(font: GPFONT; + out family: GPFONTFAMILY): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetFamily} + + function GdipGetFontStyle(font: GPFONT; + var style: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetFontStyle} + + function GdipGetFontSize(font: GPFONT; var size: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetFontSize} + + function GdipGetFontUnit(font: GPFONT; var unit_: TUNIT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetFontUnit} + + function GdipGetFontHeight(font: GPFONT; graphics: GPGRAPHICS; + var height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetFontHeight} + + function GdipGetFontHeightGivenDPI(font: GPFONT; dpi: Single; + var height: Single): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetFontHeightGivenDPI} + + function GdipGetLogFontA(font: GPFONT; graphics: GPGRAPHICS; + var logfontA: LOGFONTA): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLogFontA} + + function GdipGetLogFontW(font: GPFONT; graphics: GPGRAPHICS; + var logfontW: LOGFONTW): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetLogFontW} + + function GdipNewInstalledFontCollection( + out fontCollection: GPFONTCOLLECTION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipNewInstalledFontCollection} + + function GdipNewPrivateFontCollection( + out fontCollection: GPFONTCOLLECTION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipNewPrivateFontCollection} + + function GdipDeletePrivateFontCollection( + out fontCollection: GPFONTCOLLECTION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeletePrivateFontCollection} + + function GdipGetFontCollectionFamilyCount(fontCollection: GPFONTCOLLECTION; + var numFound: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetFontCollectionFamilyCount} + + function GdipGetFontCollectionFamilyList(fontCollection: GPFONTCOLLECTION; + numSought: Integer; gpfamilies: GPFONTFAMILY; + var numFound: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetFontCollectionFamilyList} + + function GdipPrivateAddFontFile(fontCollection: GPFONTCOLLECTION; + filename: PWCHAR): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPrivateAddFontFile} + + function GdipPrivateAddMemoryFont(fontCollection: GPFONTCOLLECTION; + memory: Pointer; length: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipPrivateAddMemoryFont} + +//---------------------------------------------------------------------------- +// Text APIs +//---------------------------------------------------------------------------- + + function GdipDrawString(graphics: GPGRAPHICS; string_: PWCHAR; + length: Integer; font: GPFONT; layoutRect: PGPRectF; + stringFormat: GPSTRINGFORMAT; brush: GPBRUSH): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawString} + + function GdipMeasureString(graphics: GPGRAPHICS; string_: PWCHAR; + length: Integer; font: GPFONT; layoutRect: PGPRectF; + stringFormat: GPSTRINGFORMAT; boundingBox: PGPRectF; + codepointsFitted: PInteger; linesFilled: PInteger): GPSTATUS; stdcall; + {$EXTERNALSYM GdipMeasureString} + + function GdipMeasureCharacterRanges(graphics: GPGRAPHICS; string_: PWCHAR; + length: Integer; font: GPFONT; layoutRect: PGPRectF; + stringFormat: GPSTRINGFORMAT; regionCount: Integer; + const regions: GPREGION): GPSTATUS; stdcall; + {$EXTERNALSYM GdipMeasureCharacterRanges} + + function GdipDrawDriverString(graphics: GPGRAPHICS; const text: PUINT16; + length: Integer; const font: GPFONT; const brush: GPBRUSH; + const positions: PGPPointF; flags: Integer; + const matrix: GPMATRIX): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawDriverString} + + function GdipMeasureDriverString(graphics: GPGRAPHICS; text: PUINT16; + length: Integer; font: GPFONT; positions: PGPPointF; flags: Integer; + matrix: GPMATRIX; boundingBox: PGPRectF): GPSTATUS; stdcall; + {$EXTERNALSYM GdipMeasureDriverString} + +//---------------------------------------------------------------------------- +// String format APIs +//---------------------------------------------------------------------------- + + function GdipCreateStringFormat(formatAttributes: Integer; language: LANGID; + out format: GPSTRINGFORMAT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateStringFormat} + + function GdipStringFormatGetGenericDefault( + out format: GPSTRINGFORMAT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipStringFormatGetGenericDefault} + + function GdipStringFormatGetGenericTypographic( + out format: GPSTRINGFORMAT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipStringFormatGetGenericTypographic} + + function GdipDeleteStringFormat(format: GPSTRINGFORMAT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeleteStringFormat} + + function GdipCloneStringFormat(format: GPSTRINGFORMAT; + out newFormat: GPSTRINGFORMAT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCloneStringFormat} + + function GdipSetStringFormatFlags(format: GPSTRINGFORMAT; + flags: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetStringFormatFlags} + + function GdipGetStringFormatFlags(format: GPSTRINGFORMAT; + out flags: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetStringFormatFlags} + + function GdipSetStringFormatAlign(format: GPSTRINGFORMAT; + align: STRINGALIGNMENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetStringFormatAlign} + + function GdipGetStringFormatAlign(format: GPSTRINGFORMAT; + out align: STRINGALIGNMENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetStringFormatAlign} + + function GdipSetStringFormatLineAlign(format: GPSTRINGFORMAT; + align: STRINGALIGNMENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetStringFormatLineAlign} + + function GdipGetStringFormatLineAlign(format: GPSTRINGFORMAT; + out align: STRINGALIGNMENT): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetStringFormatLineAlign} + + function GdipSetStringFormatTrimming(format: GPSTRINGFORMAT; + trimming: STRINGTRIMMING): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetStringFormatTrimming} + + function GdipGetStringFormatTrimming(format: GPSTRINGFORMAT; + out trimming: STRINGTRIMMING): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetStringFormatTrimming} + + function GdipSetStringFormatHotkeyPrefix(format: GPSTRINGFORMAT; + hotkeyPrefix: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetStringFormatHotkeyPrefix} + + function GdipGetStringFormatHotkeyPrefix(format: GPSTRINGFORMAT; + out hotkeyPrefix: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetStringFormatHotkeyPrefix} + + function GdipSetStringFormatTabStops(format: GPSTRINGFORMAT; + firstTabOffset: Single; count: Integer; + tabStops: PSingle): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetStringFormatTabStops} + + function GdipGetStringFormatTabStops(format: GPSTRINGFORMAT; + count: Integer; firstTabOffset: PSingle; + tabStops: PSingle): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetStringFormatTabStops} + + function GdipGetStringFormatTabStopCount(format: GPSTRINGFORMAT; + out count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetStringFormatTabStopCount} + + function GdipSetStringFormatDigitSubstitution(format: GPSTRINGFORMAT; + language: LANGID; + substitute: STRINGDIGITSUBSTITUTE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetStringFormatDigitSubstitution} + + function GdipGetStringFormatDigitSubstitution(format: GPSTRINGFORMAT; + language: PUINT; substitute: PSTRINGDIGITSUBSTITUTE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetStringFormatDigitSubstitution} + + function GdipGetStringFormatMeasurableCharacterRangeCount(format: GPSTRINGFORMAT; + out count: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipGetStringFormatMeasurableCharacterRangeCount} + + function GdipSetStringFormatMeasurableCharacterRanges(format: GPSTRINGFORMAT; + rangeCount: Integer; ranges: PCHARACTERRANGE): GPSTATUS; stdcall; + {$EXTERNALSYM GdipSetStringFormatMeasurableCharacterRanges} + +//---------------------------------------------------------------------------- +// Cached Bitmap APIs +//---------------------------------------------------------------------------- + + function GdipCreateCachedBitmap(bitmap: GPBITMAP; graphics: GPGRAPHICS; + out cachedBitmap: GPCACHEDBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipCreateCachedBitmap} + + function GdipDeleteCachedBitmap( + cachedBitmap: GPCACHEDBITMAP): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDeleteCachedBitmap} + + function GdipDrawCachedBitmap(graphics: GPGRAPHICS; + cachedBitmap: GPCACHEDBITMAP; x: Integer; + y: Integer): GPSTATUS; stdcall; + {$EXTERNALSYM GdipDrawCachedBitmap} + + function GdipEmfToWmfBits(hemf: HENHMETAFILE; cbData16: UINT; pData16: PBYTE; + iMapMode: Integer; eFlags: Integer): UINT; stdcall; + {$EXTERNALSYM GdipEmfToWmfBits} + +implementation + + function GdipAlloc; external WINGDIPDLL name 'GdipAlloc'; + procedure GdipFree; external WINGDIPDLL name 'GdipFree'; + function GdiplusStartup; external WINGDIPDLL name 'GdiplusStartup'; + procedure GdiplusShutdown; external WINGDIPDLL name 'GdiplusShutdown'; + + function GdipCreatePath; external WINGDIPDLL name 'GdipCreatePath'; + function GdipCreatePath2; external WINGDIPDLL name 'GdipCreatePath2'; + function GdipCreatePath2I; external WINGDIPDLL name 'GdipCreatePath2I'; + function GdipClonePath; external WINGDIPDLL name 'GdipClonePath'; + function GdipDeletePath; external WINGDIPDLL name 'GdipDeletePath'; + function GdipResetPath; external WINGDIPDLL name 'GdipResetPath'; + function GdipGetPointCount; external WINGDIPDLL name 'GdipGetPointCount'; + function GdipGetPathTypes; external WINGDIPDLL name 'GdipGetPathTypes'; + function GdipGetPathPoints; external WINGDIPDLL name 'GdipGetPathPoints'; + function GdipGetPathPointsI; external WINGDIPDLL name 'GdipGetPathPointsI'; + function GdipGetPathFillMode; external WINGDIPDLL name 'GdipGetPathFillMode'; + function GdipSetPathFillMode; external WINGDIPDLL name 'GdipSetPathFillMode'; + function GdipGetPathData; external WINGDIPDLL name 'GdipGetPathData'; + function GdipStartPathFigure; external WINGDIPDLL name 'GdipStartPathFigure'; + function GdipClosePathFigure; external WINGDIPDLL name 'GdipClosePathFigure'; + function GdipClosePathFigures; external WINGDIPDLL name 'GdipClosePathFigures'; + function GdipSetPathMarker; external WINGDIPDLL name 'GdipSetPathMarker'; + function GdipClearPathMarkers; external WINGDIPDLL name 'GdipClearPathMarkers'; + function GdipReversePath; external WINGDIPDLL name 'GdipReversePath'; + function GdipGetPathLastPoint; external WINGDIPDLL name 'GdipGetPathLastPoint'; + function GdipAddPathLine; external WINGDIPDLL name 'GdipAddPathLine'; + function GdipAddPathLine2; external WINGDIPDLL name 'GdipAddPathLine2'; + function GdipAddPathArc; external WINGDIPDLL name 'GdipAddPathArc'; + function GdipAddPathBezier; external WINGDIPDLL name 'GdipAddPathBezier'; + function GdipAddPathBeziers; external WINGDIPDLL name 'GdipAddPathBeziers'; + function GdipAddPathCurve; external WINGDIPDLL name 'GdipAddPathCurve'; + function GdipAddPathCurve2; external WINGDIPDLL name 'GdipAddPathCurve2'; + function GdipAddPathCurve3; external WINGDIPDLL name 'GdipAddPathCurve3'; + function GdipAddPathClosedCurve; external WINGDIPDLL name 'GdipAddPathClosedCurve'; + function GdipAddPathClosedCurve2; external WINGDIPDLL name 'GdipAddPathClosedCurve2'; + function GdipAddPathRectangle; external WINGDIPDLL name 'GdipAddPathRectangle'; + function GdipAddPathRectangles; external WINGDIPDLL name 'GdipAddPathRectangles'; + function GdipAddPathEllipse; external WINGDIPDLL name 'GdipAddPathEllipse'; + function GdipAddPathPie; external WINGDIPDLL name 'GdipAddPathPie'; + function GdipAddPathPolygon; external WINGDIPDLL name 'GdipAddPathPolygon'; + function GdipAddPathPath; external WINGDIPDLL name 'GdipAddPathPath'; + function GdipAddPathString; external WINGDIPDLL name 'GdipAddPathString'; + function GdipAddPathStringI; external WINGDIPDLL name 'GdipAddPathStringI'; + function GdipAddPathLineI; external WINGDIPDLL name 'GdipAddPathLineI'; + function GdipAddPathLine2I; external WINGDIPDLL name 'GdipAddPathLine2I'; + function GdipAddPathArcI; external WINGDIPDLL name 'GdipAddPathArcI'; + function GdipAddPathBezierI; external WINGDIPDLL name 'GdipAddPathBezierI'; + function GdipAddPathBeziersI; external WINGDIPDLL name 'GdipAddPathBeziersI'; + function GdipAddPathCurveI; external WINGDIPDLL name 'GdipAddPathCurveI'; + function GdipAddPathCurve2I; external WINGDIPDLL name 'GdipAddPathCurve2I'; + function GdipAddPathCurve3I; external WINGDIPDLL name 'GdipAddPathCurve3I'; + function GdipAddPathClosedCurveI; external WINGDIPDLL name 'GdipAddPathClosedCurveI'; + function GdipAddPathClosedCurve2I; external WINGDIPDLL name 'GdipAddPathClosedCurve2I'; + function GdipAddPathRectangleI; external WINGDIPDLL name 'GdipAddPathRectangleI'; + function GdipAddPathRectanglesI; external WINGDIPDLL name 'GdipAddPathRectanglesI'; + function GdipAddPathEllipseI; external WINGDIPDLL name 'GdipAddPathEllipseI'; + function GdipAddPathPieI; external WINGDIPDLL name 'GdipAddPathPieI'; + function GdipAddPathPolygonI; external WINGDIPDLL name 'GdipAddPathPolygonI'; + function GdipFlattenPath; external WINGDIPDLL name 'GdipFlattenPath'; + function GdipWindingModeOutline; external WINGDIPDLL name 'GdipWindingModeOutline'; + function GdipWidenPath; external WINGDIPDLL name 'GdipWidenPath'; + function GdipWarpPath; external WINGDIPDLL name 'GdipWarpPath'; + function GdipTransformPath; external WINGDIPDLL name 'GdipTransformPath'; + function GdipGetPathWorldBounds; external WINGDIPDLL name 'GdipGetPathWorldBounds'; + function GdipGetPathWorldBoundsI; external WINGDIPDLL name 'GdipGetPathWorldBoundsI'; + function GdipIsVisiblePathPoint; external WINGDIPDLL name 'GdipIsVisiblePathPoint'; + function GdipIsVisiblePathPointI; external WINGDIPDLL name 'GdipIsVisiblePathPointI'; + function GdipIsOutlineVisiblePathPoint; external WINGDIPDLL name 'GdipIsOutlineVisiblePathPoint'; + function GdipIsOutlineVisiblePathPointI; external WINGDIPDLL name 'GdipIsOutlineVisiblePathPointI'; + function GdipCreatePathIter; external WINGDIPDLL name 'GdipCreatePathIter'; + function GdipDeletePathIter; external WINGDIPDLL name 'GdipDeletePathIter'; + function GdipPathIterNextSubpath; external WINGDIPDLL name 'GdipPathIterNextSubpath'; + function GdipPathIterNextSubpathPath; external WINGDIPDLL name 'GdipPathIterNextSubpathPath'; + function GdipPathIterNextPathType; external WINGDIPDLL name 'GdipPathIterNextPathType'; + function GdipPathIterNextMarker; external WINGDIPDLL name 'GdipPathIterNextMarker'; + function GdipPathIterNextMarkerPath; external WINGDIPDLL name 'GdipPathIterNextMarkerPath'; + function GdipPathIterGetCount; external WINGDIPDLL name 'GdipPathIterGetCount'; + function GdipPathIterGetSubpathCount; external WINGDIPDLL name 'GdipPathIterGetSubpathCount'; + function GdipPathIterIsValid; external WINGDIPDLL name 'GdipPathIterIsValid'; + function GdipPathIterHasCurve; external WINGDIPDLL name 'GdipPathIterHasCurve'; + function GdipPathIterRewind; external WINGDIPDLL name 'GdipPathIterRewind'; + function GdipPathIterEnumerate; external WINGDIPDLL name 'GdipPathIterEnumerate'; + function GdipPathIterCopyData; external WINGDIPDLL name 'GdipPathIterCopyData'; + function GdipCreateMatrix; external WINGDIPDLL name 'GdipCreateMatrix'; + function GdipCreateMatrix2; external WINGDIPDLL name 'GdipCreateMatrix2'; + function GdipCreateMatrix3; external WINGDIPDLL name 'GdipCreateMatrix3'; + function GdipCreateMatrix3I; external WINGDIPDLL name 'GdipCreateMatrix3I'; + function GdipCloneMatrix; external WINGDIPDLL name 'GdipCloneMatrix'; + function GdipDeleteMatrix; external WINGDIPDLL name 'GdipDeleteMatrix'; + function GdipSetMatrixElements; external WINGDIPDLL name 'GdipSetMatrixElements'; + function GdipMultiplyMatrix; external WINGDIPDLL name 'GdipMultiplyMatrix'; + function GdipTranslateMatrix; external WINGDIPDLL name 'GdipTranslateMatrix'; + function GdipScaleMatrix; external WINGDIPDLL name 'GdipScaleMatrix'; + function GdipRotateMatrix; external WINGDIPDLL name 'GdipRotateMatrix'; + function GdipShearMatrix; external WINGDIPDLL name 'GdipShearMatrix'; + function GdipInvertMatrix; external WINGDIPDLL name 'GdipInvertMatrix'; + function GdipTransformMatrixPoints; external WINGDIPDLL name 'GdipTransformMatrixPoints'; + function GdipTransformMatrixPointsI; external WINGDIPDLL name 'GdipTransformMatrixPointsI'; + function GdipVectorTransformMatrixPoints; external WINGDIPDLL name 'GdipVectorTransformMatrixPoints'; + function GdipVectorTransformMatrixPointsI; external WINGDIPDLL name 'GdipVectorTransformMatrixPointsI'; + function GdipGetMatrixElements; external WINGDIPDLL name 'GdipGetMatrixElements'; + function GdipIsMatrixInvertible; external WINGDIPDLL name 'GdipIsMatrixInvertible'; + function GdipIsMatrixIdentity; external WINGDIPDLL name 'GdipIsMatrixIdentity'; + function GdipIsMatrixEqual; external WINGDIPDLL name 'GdipIsMatrixEqual'; + function GdipCreateRegion; external WINGDIPDLL name 'GdipCreateRegion'; + function GdipCreateRegionRect; external WINGDIPDLL name 'GdipCreateRegionRect'; + function GdipCreateRegionRectI; external WINGDIPDLL name 'GdipCreateRegionRectI'; + function GdipCreateRegionPath; external WINGDIPDLL name 'GdipCreateRegionPath'; + function GdipCreateRegionRgnData; external WINGDIPDLL name 'GdipCreateRegionRgnData'; + function GdipCreateRegionHrgn; external WINGDIPDLL name 'GdipCreateRegionHrgn'; + function GdipCloneRegion; external WINGDIPDLL name 'GdipCloneRegion'; + function GdipDeleteRegion; external WINGDIPDLL name 'GdipDeleteRegion'; + function GdipSetInfinite; external WINGDIPDLL name 'GdipSetInfinite'; + function GdipSetEmpty; external WINGDIPDLL name 'GdipSetEmpty'; + function GdipCombineRegionRect; external WINGDIPDLL name 'GdipCombineRegionRect'; + function GdipCombineRegionRectI; external WINGDIPDLL name 'GdipCombineRegionRectI'; + function GdipCombineRegionPath; external WINGDIPDLL name 'GdipCombineRegionPath'; + function GdipCombineRegionRegion; external WINGDIPDLL name 'GdipCombineRegionRegion'; + function GdipTranslateRegion; external WINGDIPDLL name 'GdipTranslateRegion'; + function GdipTranslateRegionI; external WINGDIPDLL name 'GdipTranslateRegionI'; + function GdipTransformRegion; external WINGDIPDLL name 'GdipTransformRegion'; + function GdipGetRegionBounds; external WINGDIPDLL name 'GdipGetRegionBounds'; + function GdipGetRegionBoundsI; external WINGDIPDLL name 'GdipGetRegionBoundsI'; + function GdipGetRegionHRgn; external WINGDIPDLL name 'GdipGetRegionHRgn'; + function GdipIsEmptyRegion; external WINGDIPDLL name 'GdipIsEmptyRegion'; + function GdipIsInfiniteRegion; external WINGDIPDLL name 'GdipIsInfiniteRegion'; + function GdipIsEqualRegion; external WINGDIPDLL name 'GdipIsEqualRegion'; + function GdipGetRegionDataSize; external WINGDIPDLL name 'GdipGetRegionDataSize'; + function GdipGetRegionData; external WINGDIPDLL name 'GdipGetRegionData'; + function GdipIsVisibleRegionPoint; external WINGDIPDLL name 'GdipIsVisibleRegionPoint'; + function GdipIsVisibleRegionPointI; external WINGDIPDLL name 'GdipIsVisibleRegionPointI'; + function GdipIsVisibleRegionRect; external WINGDIPDLL name 'GdipIsVisibleRegionRect'; + function GdipIsVisibleRegionRectI; external WINGDIPDLL name 'GdipIsVisibleRegionRectI'; + function GdipGetRegionScansCount; external WINGDIPDLL name 'GdipGetRegionScansCount'; + function GdipGetRegionScans; external WINGDIPDLL name 'GdipGetRegionScans'; + function GdipGetRegionScansI; external WINGDIPDLL name 'GdipGetRegionScansI'; + function GdipCloneBrush; external WINGDIPDLL name 'GdipCloneBrush'; + function GdipDeleteBrush; external WINGDIPDLL name 'GdipDeleteBrush'; + function GdipGetBrushType; external WINGDIPDLL name 'GdipGetBrushType'; + function GdipCreateHatchBrush; external WINGDIPDLL name 'GdipCreateHatchBrush'; + function GdipGetHatchStyle; external WINGDIPDLL name 'GdipGetHatchStyle'; + function GdipGetHatchForegroundColor; external WINGDIPDLL name 'GdipGetHatchForegroundColor'; + function GdipGetHatchBackgroundColor; external WINGDIPDLL name 'GdipGetHatchBackgroundColor'; + function GdipCreateTexture; external WINGDIPDLL name 'GdipCreateTexture'; + function GdipCreateTexture2; external WINGDIPDLL name 'GdipCreateTexture2'; + function GdipCreateTextureIA; external WINGDIPDLL name 'GdipCreateTextureIA'; + function GdipCreateTexture2I; external WINGDIPDLL name 'GdipCreateTexture2I'; + function GdipCreateTextureIAI; external WINGDIPDLL name 'GdipCreateTextureIAI'; + function GdipGetTextureTransform; external WINGDIPDLL name 'GdipGetTextureTransform'; + function GdipSetTextureTransform; external WINGDIPDLL name 'GdipSetTextureTransform'; + function GdipResetTextureTransform; external WINGDIPDLL name 'GdipResetTextureTransform'; + function GdipMultiplyTextureTransform; external WINGDIPDLL name 'GdipMultiplyTextureTransform'; + function GdipTranslateTextureTransform; external WINGDIPDLL name 'GdipTranslateTextureTransform'; + function GdipScaleTextureTransform; external WINGDIPDLL name 'GdipScaleTextureTransform'; + function GdipRotateTextureTransform; external WINGDIPDLL name 'GdipRotateTextureTransform'; + function GdipSetTextureWrapMode; external WINGDIPDLL name 'GdipSetTextureWrapMode'; + function GdipGetTextureWrapMode; external WINGDIPDLL name 'GdipGetTextureWrapMode'; + function GdipGetTextureImage; external WINGDIPDLL name 'GdipGetTextureImage'; + function GdipCreateSolidFill; external WINGDIPDLL name 'GdipCreateSolidFill'; + function GdipSetSolidFillColor; external WINGDIPDLL name 'GdipSetSolidFillColor'; + function GdipGetSolidFillColor; external WINGDIPDLL name 'GdipGetSolidFillColor'; + function GdipCreateLineBrush; external WINGDIPDLL name 'GdipCreateLineBrush'; + function GdipCreateLineBrushI; external WINGDIPDLL name 'GdipCreateLineBrushI'; + function GdipCreateLineBrushFromRect; external WINGDIPDLL name 'GdipCreateLineBrushFromRect'; + function GdipCreateLineBrushFromRectI; external WINGDIPDLL name 'GdipCreateLineBrushFromRectI'; + function GdipCreateLineBrushFromRectWithAngle; external WINGDIPDLL name 'GdipCreateLineBrushFromRectWithAngle'; + function GdipCreateLineBrushFromRectWithAngleI; external WINGDIPDLL name 'GdipCreateLineBrushFromRectWithAngleI'; + function GdipSetLineColors; external WINGDIPDLL name 'GdipSetLineColors'; + function GdipGetLineColors; external WINGDIPDLL name 'GdipGetLineColors'; + function GdipGetLineRect; external WINGDIPDLL name 'GdipGetLineRect'; + function GdipGetLineRectI; external WINGDIPDLL name 'GdipGetLineRectI'; + function GdipSetLineGammaCorrection; external WINGDIPDLL name 'GdipSetLineGammaCorrection'; + function GdipGetLineGammaCorrection; external WINGDIPDLL name 'GdipGetLineGammaCorrection'; + function GdipGetLineBlendCount; external WINGDIPDLL name 'GdipGetLineBlendCount'; + function GdipGetLineBlend; external WINGDIPDLL name 'GdipGetLineBlend'; + function GdipSetLineBlend; external WINGDIPDLL name 'GdipSetLineBlend'; + function GdipGetLinePresetBlendCount; external WINGDIPDLL name 'GdipGetLinePresetBlendCount'; + function GdipGetLinePresetBlend; external WINGDIPDLL name 'GdipGetLinePresetBlend'; + function GdipSetLinePresetBlend; external WINGDIPDLL name 'GdipSetLinePresetBlend'; + function GdipSetLineSigmaBlend; external WINGDIPDLL name 'GdipSetLineSigmaBlend'; + function GdipSetLineLinearBlend; external WINGDIPDLL name 'GdipSetLineLinearBlend'; + function GdipSetLineWrapMode; external WINGDIPDLL name 'GdipSetLineWrapMode'; + function GdipGetLineWrapMode; external WINGDIPDLL name 'GdipGetLineWrapMode'; + function GdipGetLineTransform; external WINGDIPDLL name 'GdipGetLineTransform'; + function GdipSetLineTransform; external WINGDIPDLL name 'GdipSetLineTransform'; + function GdipResetLineTransform; external WINGDIPDLL name 'GdipResetLineTransform'; + function GdipMultiplyLineTransform; external WINGDIPDLL name 'GdipMultiplyLineTransform'; + function GdipTranslateLineTransform; external WINGDIPDLL name 'GdipTranslateLineTransform'; + function GdipScaleLineTransform; external WINGDIPDLL name 'GdipScaleLineTransform'; + function GdipRotateLineTransform; external WINGDIPDLL name 'GdipRotateLineTransform'; + function GdipCreatePathGradient; external WINGDIPDLL name 'GdipCreatePathGradient'; + function GdipCreatePathGradientI; external WINGDIPDLL name 'GdipCreatePathGradientI'; + function GdipCreatePathGradientFromPath; external WINGDIPDLL name 'GdipCreatePathGradientFromPath'; + function GdipGetPathGradientCenterColor; external WINGDIPDLL name 'GdipGetPathGradientCenterColor'; + function GdipSetPathGradientCenterColor; external WINGDIPDLL name 'GdipSetPathGradientCenterColor'; + function GdipGetPathGradientSurroundColorsWithCount; external WINGDIPDLL name 'GdipGetPathGradientSurroundColorsWithCount'; + function GdipSetPathGradientSurroundColorsWithCount; external WINGDIPDLL name 'GdipSetPathGradientSurroundColorsWithCount'; + function GdipGetPathGradientPath; external WINGDIPDLL name 'GdipGetPathGradientPath'; + function GdipSetPathGradientPath; external WINGDIPDLL name 'GdipSetPathGradientPath'; + function GdipGetPathGradientCenterPoint; external WINGDIPDLL name 'GdipGetPathGradientCenterPoint'; + function GdipGetPathGradientCenterPointI; external WINGDIPDLL name 'GdipGetPathGradientCenterPointI'; + function GdipSetPathGradientCenterPoint; external WINGDIPDLL name 'GdipSetPathGradientCenterPoint'; + function GdipSetPathGradientCenterPointI; external WINGDIPDLL name 'GdipSetPathGradientCenterPointI'; + function GdipGetPathGradientRect; external WINGDIPDLL name 'GdipGetPathGradientRect'; + function GdipGetPathGradientRectI; external WINGDIPDLL name 'GdipGetPathGradientRectI'; + function GdipGetPathGradientPointCount; external WINGDIPDLL name 'GdipGetPathGradientPointCount'; + function GdipGetPathGradientSurroundColorCount; external WINGDIPDLL name 'GdipGetPathGradientSurroundColorCount'; + function GdipSetPathGradientGammaCorrection; external WINGDIPDLL name 'GdipSetPathGradientGammaCorrection'; + function GdipGetPathGradientGammaCorrection; external WINGDIPDLL name 'GdipGetPathGradientGammaCorrection'; + function GdipGetPathGradientBlendCount; external WINGDIPDLL name 'GdipGetPathGradientBlendCount'; + function GdipGetPathGradientBlend; external WINGDIPDLL name 'GdipGetPathGradientBlend'; + function GdipSetPathGradientBlend; external WINGDIPDLL name 'GdipSetPathGradientBlend'; + function GdipGetPathGradientPresetBlendCount; external WINGDIPDLL name 'GdipGetPathGradientPresetBlendCount'; + function GdipGetPathGradientPresetBlend; external WINGDIPDLL name 'GdipGetPathGradientPresetBlend'; + function GdipSetPathGradientPresetBlend; external WINGDIPDLL name 'GdipSetPathGradientPresetBlend'; + function GdipSetPathGradientSigmaBlend; external WINGDIPDLL name 'GdipSetPathGradientSigmaBlend'; + function GdipSetPathGradientLinearBlend; external WINGDIPDLL name 'GdipSetPathGradientLinearBlend'; + function GdipGetPathGradientWrapMode; external WINGDIPDLL name 'GdipGetPathGradientWrapMode'; + function GdipSetPathGradientWrapMode; external WINGDIPDLL name 'GdipSetPathGradientWrapMode'; + function GdipGetPathGradientTransform; external WINGDIPDLL name 'GdipGetPathGradientTransform'; + function GdipSetPathGradientTransform; external WINGDIPDLL name 'GdipSetPathGradientTransform'; + function GdipResetPathGradientTransform; external WINGDIPDLL name 'GdipResetPathGradientTransform'; + function GdipMultiplyPathGradientTransform; external WINGDIPDLL name 'GdipMultiplyPathGradientTransform'; + function GdipTranslatePathGradientTransform; external WINGDIPDLL name 'GdipTranslatePathGradientTransform'; + function GdipScalePathGradientTransform; external WINGDIPDLL name 'GdipScalePathGradientTransform'; + function GdipRotatePathGradientTransform; external WINGDIPDLL name 'GdipRotatePathGradientTransform'; + function GdipGetPathGradientFocusScales; external WINGDIPDLL name 'GdipGetPathGradientFocusScales'; + function GdipSetPathGradientFocusScales; external WINGDIPDLL name 'GdipSetPathGradientFocusScales'; + function GdipCreatePen1; external WINGDIPDLL name 'GdipCreatePen1'; + function GdipCreatePen2; external WINGDIPDLL name 'GdipCreatePen2'; + function GdipClonePen; external WINGDIPDLL name 'GdipClonePen'; + function GdipDeletePen; external WINGDIPDLL name 'GdipDeletePen'; + function GdipSetPenWidth; external WINGDIPDLL name 'GdipSetPenWidth'; + function GdipGetPenWidth; external WINGDIPDLL name 'GdipGetPenWidth'; + function GdipSetPenUnit; external WINGDIPDLL name 'GdipSetPenUnit'; + function GdipGetPenUnit; external WINGDIPDLL name 'GdipGetPenUnit'; + function GdipSetPenLineCap197819; external WINGDIPDLL name 'GdipSetPenLineCap197819'; + function GdipSetPenStartCap; external WINGDIPDLL name 'GdipSetPenStartCap'; + function GdipSetPenEndCap; external WINGDIPDLL name 'GdipSetPenEndCap'; + function GdipSetPenDashCap197819; external WINGDIPDLL name 'GdipSetPenDashCap197819'; + function GdipGetPenStartCap; external WINGDIPDLL name 'GdipGetPenStartCap'; + function GdipGetPenEndCap; external WINGDIPDLL name 'GdipGetPenEndCap'; + function GdipGetPenDashCap197819; external WINGDIPDLL name 'GdipGetPenDashCap197819'; + function GdipSetPenLineJoin; external WINGDIPDLL name 'GdipSetPenLineJoin'; + function GdipGetPenLineJoin; external WINGDIPDLL name 'GdipGetPenLineJoin'; + function GdipSetPenCustomStartCap; external WINGDIPDLL name 'GdipSetPenCustomStartCap'; + function GdipGetPenCustomStartCap; external WINGDIPDLL name 'GdipGetPenCustomStartCap'; + function GdipSetPenCustomEndCap; external WINGDIPDLL name 'GdipSetPenCustomEndCap'; + function GdipGetPenCustomEndCap; external WINGDIPDLL name 'GdipGetPenCustomEndCap'; + function GdipSetPenMiterLimit; external WINGDIPDLL name 'GdipSetPenMiterLimit'; + function GdipGetPenMiterLimit; external WINGDIPDLL name 'GdipGetPenMiterLimit'; + function GdipSetPenMode; external WINGDIPDLL name 'GdipSetPenMode'; + function GdipGetPenMode; external WINGDIPDLL name 'GdipGetPenMode'; + function GdipSetPenTransform; external WINGDIPDLL name 'GdipSetPenTransform'; + function GdipGetPenTransform; external WINGDIPDLL name 'GdipGetPenTransform'; + function GdipResetPenTransform; external WINGDIPDLL name 'GdipResetPenTransform'; + function GdipMultiplyPenTransform; external WINGDIPDLL name 'GdipMultiplyPenTransform'; + function GdipTranslatePenTransform; external WINGDIPDLL name 'GdipTranslatePenTransform'; + function GdipScalePenTransform; external WINGDIPDLL name 'GdipScalePenTransform'; + function GdipRotatePenTransform; external WINGDIPDLL name 'GdipRotatePenTransform'; + function GdipSetPenColor; external WINGDIPDLL name 'GdipSetPenColor'; + function GdipGetPenColor; external WINGDIPDLL name 'GdipGetPenColor'; + function GdipSetPenBrushFill; external WINGDIPDLL name 'GdipSetPenBrushFill'; + function GdipGetPenBrushFill; external WINGDIPDLL name 'GdipGetPenBrushFill'; + function GdipGetPenFillType; external WINGDIPDLL name 'GdipGetPenFillType'; + function GdipGetPenDashStyle; external WINGDIPDLL name 'GdipGetPenDashStyle'; + function GdipSetPenDashStyle; external WINGDIPDLL name 'GdipSetPenDashStyle'; + function GdipGetPenDashOffset; external WINGDIPDLL name 'GdipGetPenDashOffset'; + function GdipSetPenDashOffset; external WINGDIPDLL name 'GdipSetPenDashOffset'; + function GdipGetPenDashCount; external WINGDIPDLL name 'GdipGetPenDashCount'; + function GdipSetPenDashArray; external WINGDIPDLL name 'GdipSetPenDashArray'; + function GdipGetPenDashArray; external WINGDIPDLL name 'GdipGetPenDashArray'; + function GdipGetPenCompoundCount; external WINGDIPDLL name 'GdipGetPenCompoundCount'; + function GdipSetPenCompoundArray; external WINGDIPDLL name 'GdipSetPenCompoundArray'; + function GdipGetPenCompoundArray; external WINGDIPDLL name 'GdipGetPenCompoundArray'; + function GdipCreateCustomLineCap; external WINGDIPDLL name 'GdipCreateCustomLineCap'; + function GdipDeleteCustomLineCap; external WINGDIPDLL name 'GdipDeleteCustomLineCap'; + function GdipCloneCustomLineCap; external WINGDIPDLL name 'GdipCloneCustomLineCap'; + function GdipGetCustomLineCapType; external WINGDIPDLL name 'GdipGetCustomLineCapType'; + function GdipSetCustomLineCapStrokeCaps; external WINGDIPDLL name 'GdipSetCustomLineCapStrokeCaps'; + function GdipGetCustomLineCapStrokeCaps; external WINGDIPDLL name 'GdipGetCustomLineCapStrokeCaps'; + function GdipSetCustomLineCapStrokeJoin; external WINGDIPDLL name 'GdipSetCustomLineCapStrokeJoin'; + function GdipGetCustomLineCapStrokeJoin; external WINGDIPDLL name 'GdipGetCustomLineCapStrokeJoin'; + function GdipSetCustomLineCapBaseCap; external WINGDIPDLL name 'GdipSetCustomLineCapBaseCap'; + function GdipGetCustomLineCapBaseCap; external WINGDIPDLL name 'GdipGetCustomLineCapBaseCap'; + function GdipSetCustomLineCapBaseInset; external WINGDIPDLL name 'GdipSetCustomLineCapBaseInset'; + function GdipGetCustomLineCapBaseInset; external WINGDIPDLL name 'GdipGetCustomLineCapBaseInset'; + function GdipSetCustomLineCapWidthScale; external WINGDIPDLL name 'GdipSetCustomLineCapWidthScale'; + function GdipGetCustomLineCapWidthScale; external WINGDIPDLL name 'GdipGetCustomLineCapWidthScale'; + function GdipCreateAdjustableArrowCap; external WINGDIPDLL name 'GdipCreateAdjustableArrowCap'; + function GdipSetAdjustableArrowCapHeight; external WINGDIPDLL name 'GdipSetAdjustableArrowCapHeight'; + function GdipGetAdjustableArrowCapHeight; external WINGDIPDLL name 'GdipGetAdjustableArrowCapHeight'; + function GdipSetAdjustableArrowCapWidth; external WINGDIPDLL name 'GdipSetAdjustableArrowCapWidth'; + function GdipGetAdjustableArrowCapWidth; external WINGDIPDLL name 'GdipGetAdjustableArrowCapWidth'; + function GdipSetAdjustableArrowCapMiddleInset; external WINGDIPDLL name 'GdipSetAdjustableArrowCapMiddleInset'; + function GdipGetAdjustableArrowCapMiddleInset; external WINGDIPDLL name 'GdipGetAdjustableArrowCapMiddleInset'; + function GdipSetAdjustableArrowCapFillState; external WINGDIPDLL name 'GdipSetAdjustableArrowCapFillState'; + function GdipGetAdjustableArrowCapFillState; external WINGDIPDLL name 'GdipGetAdjustableArrowCapFillState'; + function GdipLoadImageFromStream; external WINGDIPDLL name 'GdipLoadImageFromStream'; + function GdipLoadImageFromFile; external WINGDIPDLL name 'GdipLoadImageFromFile'; + function GdipLoadImageFromStreamICM; external WINGDIPDLL name 'GdipLoadImageFromStreamICM'; + function GdipLoadImageFromFileICM; external WINGDIPDLL name 'GdipLoadImageFromFileICM'; + function GdipCloneImage; external WINGDIPDLL name 'GdipCloneImage'; + function GdipDisposeImage; external WINGDIPDLL name 'GdipDisposeImage'; + function GdipSaveImageToFile; external WINGDIPDLL name 'GdipSaveImageToFile'; + function GdipSaveImageToStream; external WINGDIPDLL name 'GdipSaveImageToStream'; + function GdipSaveAdd; external WINGDIPDLL name 'GdipSaveAdd'; + function GdipSaveAddImage; external WINGDIPDLL name 'GdipSaveAddImage'; + function GdipGetImageGraphicsContext; external WINGDIPDLL name 'GdipGetImageGraphicsContext'; + function GdipGetImageBounds; external WINGDIPDLL name 'GdipGetImageBounds'; + function GdipGetImageDimension; external WINGDIPDLL name 'GdipGetImageDimension'; + function GdipGetImageType; external WINGDIPDLL name 'GdipGetImageType'; + function GdipGetImageWidth; external WINGDIPDLL name 'GdipGetImageWidth'; + function GdipGetImageHeight; external WINGDIPDLL name 'GdipGetImageHeight'; + function GdipGetImageHorizontalResolution; external WINGDIPDLL name 'GdipGetImageHorizontalResolution'; + function GdipGetImageVerticalResolution; external WINGDIPDLL name 'GdipGetImageVerticalResolution'; + function GdipGetImageFlags; external WINGDIPDLL name 'GdipGetImageFlags'; + function GdipGetImageRawFormat; external WINGDIPDLL name 'GdipGetImageRawFormat'; + function GdipGetImagePixelFormat; external WINGDIPDLL name 'GdipGetImagePixelFormat'; + function GdipGetImageThumbnail; external WINGDIPDLL name 'GdipGetImageThumbnail'; + function GdipGetEncoderParameterListSize; external WINGDIPDLL name 'GdipGetEncoderParameterListSize'; + function GdipGetEncoderParameterList; external WINGDIPDLL name 'GdipGetEncoderParameterList'; + function GdipImageGetFrameDimensionsCount; external WINGDIPDLL name 'GdipImageGetFrameDimensionsCount'; + function GdipImageGetFrameDimensionsList; external WINGDIPDLL name 'GdipImageGetFrameDimensionsList'; + function GdipImageGetFrameCount; external WINGDIPDLL name 'GdipImageGetFrameCount'; + function GdipImageSelectActiveFrame; external WINGDIPDLL name 'GdipImageSelectActiveFrame'; + function GdipImageRotateFlip; external WINGDIPDLL name 'GdipImageRotateFlip'; + function GdipGetImagePalette; external WINGDIPDLL name 'GdipGetImagePalette'; + function GdipSetImagePalette; external WINGDIPDLL name 'GdipSetImagePalette'; + function GdipGetImagePaletteSize; external WINGDIPDLL name 'GdipGetImagePaletteSize'; + function GdipGetPropertyCount; external WINGDIPDLL name 'GdipGetPropertyCount'; + function GdipGetPropertyIdList; external WINGDIPDLL name 'GdipGetPropertyIdList'; + function GdipGetPropertyItemSize; external WINGDIPDLL name 'GdipGetPropertyItemSize'; + function GdipGetPropertyItem; external WINGDIPDLL name 'GdipGetPropertyItem'; + function GdipGetPropertySize; external WINGDIPDLL name 'GdipGetPropertySize'; + function GdipGetAllPropertyItems; external WINGDIPDLL name 'GdipGetAllPropertyItems'; + function GdipRemovePropertyItem; external WINGDIPDLL name 'GdipRemovePropertyItem'; + function GdipSetPropertyItem; external WINGDIPDLL name 'GdipSetPropertyItem'; + function GdipImageForceValidation; external WINGDIPDLL name 'GdipImageForceValidation'; + function GdipCreateBitmapFromStream; external WINGDIPDLL name 'GdipCreateBitmapFromStream'; + function GdipCreateBitmapFromFile; external WINGDIPDLL name 'GdipCreateBitmapFromFile'; + function GdipCreateBitmapFromStreamICM; external WINGDIPDLL name 'GdipCreateBitmapFromStreamICM'; + function GdipCreateBitmapFromFileICM; external WINGDIPDLL name 'GdipCreateBitmapFromFileICM'; + function GdipCreateBitmapFromScan0; external WINGDIPDLL name 'GdipCreateBitmapFromScan0'; + function GdipCreateBitmapFromGraphics; external WINGDIPDLL name 'GdipCreateBitmapFromGraphics'; + function GdipCreateBitmapFromGdiDib; external WINGDIPDLL name 'GdipCreateBitmapFromGdiDib'; + function GdipCreateBitmapFromHBITMAP; external WINGDIPDLL name 'GdipCreateBitmapFromHBITMAP'; + function GdipCreateHBITMAPFromBitmap; external WINGDIPDLL name 'GdipCreateHBITMAPFromBitmap'; + function GdipCreateBitmapFromHICON; external WINGDIPDLL name 'GdipCreateBitmapFromHICON'; + function GdipCreateHICONFromBitmap; external WINGDIPDLL name 'GdipCreateHICONFromBitmap'; + function GdipCreateBitmapFromResource; external WINGDIPDLL name 'GdipCreateBitmapFromResource'; + function GdipCloneBitmapArea; external WINGDIPDLL name 'GdipCloneBitmapArea'; + function GdipCloneBitmapAreaI; external WINGDIPDLL name 'GdipCloneBitmapAreaI'; + function GdipBitmapLockBits; external WINGDIPDLL name 'GdipBitmapLockBits'; + function GdipBitmapUnlockBits; external WINGDIPDLL name 'GdipBitmapUnlockBits'; + function GdipBitmapGetPixel; external WINGDIPDLL name 'GdipBitmapGetPixel'; + function GdipBitmapSetPixel; external WINGDIPDLL name 'GdipBitmapSetPixel'; + function GdipBitmapSetResolution; external WINGDIPDLL name 'GdipBitmapSetResolution'; + function GdipCreateImageAttributes; external WINGDIPDLL name 'GdipCreateImageAttributes'; + function GdipCloneImageAttributes; external WINGDIPDLL name 'GdipCloneImageAttributes'; + function GdipDisposeImageAttributes; external WINGDIPDLL name 'GdipDisposeImageAttributes'; + function GdipSetImageAttributesToIdentity; external WINGDIPDLL name 'GdipSetImageAttributesToIdentity'; + function GdipResetImageAttributes; external WINGDIPDLL name 'GdipResetImageAttributes'; + function GdipSetImageAttributesColorMatrix; external WINGDIPDLL name 'GdipSetImageAttributesColorMatrix'; + function GdipSetImageAttributesThreshold; external WINGDIPDLL name 'GdipSetImageAttributesThreshold'; + function GdipSetImageAttributesGamma; external WINGDIPDLL name 'GdipSetImageAttributesGamma'; + function GdipSetImageAttributesNoOp; external WINGDIPDLL name 'GdipSetImageAttributesNoOp'; + function GdipSetImageAttributesColorKeys; external WINGDIPDLL name 'GdipSetImageAttributesColorKeys'; + function GdipSetImageAttributesOutputChannel; external WINGDIPDLL name 'GdipSetImageAttributesOutputChannel'; + function GdipSetImageAttributesOutputChannelColorProfile; external WINGDIPDLL name 'GdipSetImageAttributesOutputChannelColorProfile'; + function GdipSetImageAttributesRemapTable; external WINGDIPDLL name 'GdipSetImageAttributesRemapTable'; + function GdipSetImageAttributesWrapMode; external WINGDIPDLL name 'GdipSetImageAttributesWrapMode'; + function GdipSetImageAttributesICMMode; external WINGDIPDLL name 'GdipSetImageAttributesICMMode'; + function GdipGetImageAttributesAdjustedPalette; external WINGDIPDLL name 'GdipGetImageAttributesAdjustedPalette'; + function GdipFlush; external WINGDIPDLL name 'GdipFlush'; + function GdipCreateFromHDC; external WINGDIPDLL name 'GdipCreateFromHDC'; + function GdipCreateFromHDC2; external WINGDIPDLL name 'GdipCreateFromHDC2'; + function GdipCreateFromHWND; external WINGDIPDLL name 'GdipCreateFromHWND'; + function GdipCreateFromHWNDICM; external WINGDIPDLL name 'GdipCreateFromHWNDICM'; + function GdipDeleteGraphics; external WINGDIPDLL name 'GdipDeleteGraphics'; + function GdipGetDC; external WINGDIPDLL name 'GdipGetDC'; + function GdipReleaseDC; external WINGDIPDLL name 'GdipReleaseDC'; + function GdipSetCompositingMode; external WINGDIPDLL name 'GdipSetCompositingMode'; + function GdipGetCompositingMode; external WINGDIPDLL name 'GdipGetCompositingMode'; + function GdipSetRenderingOrigin; external WINGDIPDLL name 'GdipSetRenderingOrigin'; + function GdipGetRenderingOrigin; external WINGDIPDLL name 'GdipGetRenderingOrigin'; + function GdipSetCompositingQuality; external WINGDIPDLL name 'GdipSetCompositingQuality'; + function GdipGetCompositingQuality; external WINGDIPDLL name 'GdipGetCompositingQuality'; + function GdipSetSmoothingMode; external WINGDIPDLL name 'GdipSetSmoothingMode'; + function GdipGetSmoothingMode; external WINGDIPDLL name 'GdipGetSmoothingMode'; + function GdipSetPixelOffsetMode; external WINGDIPDLL name 'GdipSetPixelOffsetMode'; + function GdipGetPixelOffsetMode; external WINGDIPDLL name 'GdipGetPixelOffsetMode'; + function GdipSetTextRenderingHint; external WINGDIPDLL name 'GdipSetTextRenderingHint'; + function GdipGetTextRenderingHint; external WINGDIPDLL name 'GdipGetTextRenderingHint'; + function GdipSetTextContrast; external WINGDIPDLL name 'GdipSetTextContrast'; + function GdipGetTextContrast; external WINGDIPDLL name 'GdipGetTextContrast'; + function GdipSetInterpolationMode; external WINGDIPDLL name 'GdipSetInterpolationMode'; + function GdipGetInterpolationMode; external WINGDIPDLL name 'GdipGetInterpolationMode'; + function GdipSetWorldTransform; external WINGDIPDLL name 'GdipSetWorldTransform'; + function GdipResetWorldTransform; external WINGDIPDLL name 'GdipResetWorldTransform'; + function GdipMultiplyWorldTransform; external WINGDIPDLL name 'GdipMultiplyWorldTransform'; + function GdipTranslateWorldTransform; external WINGDIPDLL name 'GdipTranslateWorldTransform'; + function GdipScaleWorldTransform; external WINGDIPDLL name 'GdipScaleWorldTransform'; + function GdipRotateWorldTransform; external WINGDIPDLL name 'GdipRotateWorldTransform'; + function GdipGetWorldTransform; external WINGDIPDLL name 'GdipGetWorldTransform'; + function GdipResetPageTransform; external WINGDIPDLL name 'GdipResetPageTransform'; + function GdipGetPageUnit; external WINGDIPDLL name 'GdipGetPageUnit'; + function GdipGetPageScale; external WINGDIPDLL name 'GdipGetPageScale'; + function GdipSetPageUnit; external WINGDIPDLL name 'GdipSetPageUnit'; + function GdipSetPageScale; external WINGDIPDLL name 'GdipSetPageScale'; + function GdipGetDpiX; external WINGDIPDLL name 'GdipGetDpiX'; + function GdipGetDpiY; external WINGDIPDLL name 'GdipGetDpiY'; + function GdipTransformPoints; external WINGDIPDLL name 'GdipTransformPoints'; + function GdipTransformPointsI; external WINGDIPDLL name 'GdipTransformPointsI'; + function GdipGetNearestColor; external WINGDIPDLL name 'GdipGetNearestColor'; + function GdipCreateHalftonePalette; external WINGDIPDLL name 'GdipCreateHalftonePalette'; + function GdipDrawLine; external WINGDIPDLL name 'GdipDrawLine'; + function GdipDrawLineI; external WINGDIPDLL name 'GdipDrawLineI'; + function GdipDrawLines; external WINGDIPDLL name 'GdipDrawLines'; + function GdipDrawLinesI; external WINGDIPDLL name 'GdipDrawLinesI'; + function GdipDrawArc; external WINGDIPDLL name 'GdipDrawArc'; + function GdipDrawArcI; external WINGDIPDLL name 'GdipDrawArcI'; + function GdipDrawBezier; external WINGDIPDLL name 'GdipDrawBezier'; + function GdipDrawBezierI; external WINGDIPDLL name 'GdipDrawBezierI'; + function GdipDrawBeziers; external WINGDIPDLL name 'GdipDrawBeziers'; + function GdipDrawBeziersI; external WINGDIPDLL name 'GdipDrawBeziersI'; + function GdipDrawRectangle; external WINGDIPDLL name 'GdipDrawRectangle'; + function GdipDrawRectangleI; external WINGDIPDLL name 'GdipDrawRectangleI'; + function GdipDrawRectangles; external WINGDIPDLL name 'GdipDrawRectangles'; + function GdipDrawRectanglesI; external WINGDIPDLL name 'GdipDrawRectanglesI'; + function GdipDrawEllipse; external WINGDIPDLL name 'GdipDrawEllipse'; + function GdipDrawEllipseI; external WINGDIPDLL name 'GdipDrawEllipseI'; + function GdipDrawPie; external WINGDIPDLL name 'GdipDrawPie'; + function GdipDrawPieI; external WINGDIPDLL name 'GdipDrawPieI'; + function GdipDrawPolygon; external WINGDIPDLL name 'GdipDrawPolygon'; + function GdipDrawPolygonI; external WINGDIPDLL name 'GdipDrawPolygonI'; + function GdipDrawPath; external WINGDIPDLL name 'GdipDrawPath'; + function GdipDrawCurve; external WINGDIPDLL name 'GdipDrawCurve'; + function GdipDrawCurveI; external WINGDIPDLL name 'GdipDrawCurveI'; + function GdipDrawCurve2; external WINGDIPDLL name 'GdipDrawCurve2'; + function GdipDrawCurve2I; external WINGDIPDLL name 'GdipDrawCurve2I'; + function GdipDrawCurve3; external WINGDIPDLL name 'GdipDrawCurve3'; + function GdipDrawCurve3I; external WINGDIPDLL name 'GdipDrawCurve3I'; + function GdipDrawClosedCurve; external WINGDIPDLL name 'GdipDrawClosedCurve'; + function GdipDrawClosedCurveI; external WINGDIPDLL name 'GdipDrawClosedCurveI'; + function GdipDrawClosedCurve2; external WINGDIPDLL name 'GdipDrawClosedCurve2'; + function GdipDrawClosedCurve2I; external WINGDIPDLL name 'GdipDrawClosedCurve2I'; + function GdipGraphicsClear; external WINGDIPDLL name 'GdipGraphicsClear'; + function GdipFillRectangle; external WINGDIPDLL name 'GdipFillRectangle'; + function GdipFillRectangleI; external WINGDIPDLL name 'GdipFillRectangleI'; + function GdipFillRectangles; external WINGDIPDLL name 'GdipFillRectangles'; + function GdipFillRectanglesI; external WINGDIPDLL name 'GdipFillRectanglesI'; + function GdipFillPolygon; external WINGDIPDLL name 'GdipFillPolygon'; + function GdipFillPolygonI; external WINGDIPDLL name 'GdipFillPolygonI'; + function GdipFillPolygon2; external WINGDIPDLL name 'GdipFillPolygon2'; + function GdipFillPolygon2I; external WINGDIPDLL name 'GdipFillPolygon2I'; + function GdipFillEllipse; external WINGDIPDLL name 'GdipFillEllipse'; + function GdipFillEllipseI; external WINGDIPDLL name 'GdipFillEllipseI'; + function GdipFillPie; external WINGDIPDLL name 'GdipFillPie'; + function GdipFillPieI; external WINGDIPDLL name 'GdipFillPieI'; + function GdipFillPath; external WINGDIPDLL name 'GdipFillPath'; + function GdipFillClosedCurve; external WINGDIPDLL name 'GdipFillClosedCurve'; + function GdipFillClosedCurveI; external WINGDIPDLL name 'GdipFillClosedCurveI'; + function GdipFillClosedCurve2; external WINGDIPDLL name 'GdipFillClosedCurve2'; + function GdipFillClosedCurve2I; external WINGDIPDLL name 'GdipFillClosedCurve2I'; + function GdipFillRegion; external WINGDIPDLL name 'GdipFillRegion'; + function GdipDrawImage; external WINGDIPDLL name 'GdipDrawImage'; + function GdipDrawImageI; external WINGDIPDLL name 'GdipDrawImageI'; + function GdipDrawImageRect; external WINGDIPDLL name 'GdipDrawImageRect'; + function GdipDrawImageRectI; external WINGDIPDLL name 'GdipDrawImageRectI'; + function GdipDrawImagePoints; external WINGDIPDLL name 'GdipDrawImagePoints'; + function GdipDrawImagePointsI; external WINGDIPDLL name 'GdipDrawImagePointsI'; + function GdipDrawImagePointRect; external WINGDIPDLL name 'GdipDrawImagePointRect'; + function GdipDrawImagePointRectI; external WINGDIPDLL name 'GdipDrawImagePointRectI'; + function GdipDrawImageRectRect; external WINGDIPDLL name 'GdipDrawImageRectRect'; + function GdipDrawImageRectRectI; external WINGDIPDLL name 'GdipDrawImageRectRectI'; + function GdipDrawImagePointsRect; external WINGDIPDLL name 'GdipDrawImagePointsRect'; + function GdipDrawImagePointsRectI; external WINGDIPDLL name 'GdipDrawImagePointsRectI'; + function GdipEnumerateMetafileDestPoint; external WINGDIPDLL name 'GdipEnumerateMetafileDestPoint'; + function GdipEnumerateMetafileDestPointI; external WINGDIPDLL name 'GdipEnumerateMetafileDestPointI'; + function GdipEnumerateMetafileDestRect; external WINGDIPDLL name 'GdipEnumerateMetafileDestRect'; + function GdipEnumerateMetafileDestRectI; external WINGDIPDLL name 'GdipEnumerateMetafileDestRectI'; + function GdipEnumerateMetafileDestPoints; external WINGDIPDLL name 'GdipEnumerateMetafileDestPoints'; + function GdipEnumerateMetafileDestPointsI; external WINGDIPDLL name 'GdipEnumerateMetafileDestPointsI'; + function GdipEnumerateMetafileSrcRectDestPoint; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestPoint'; + function GdipEnumerateMetafileSrcRectDestPointI; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestPointI'; + function GdipEnumerateMetafileSrcRectDestRect; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestRect'; + function GdipEnumerateMetafileSrcRectDestRectI; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestRectI'; + function GdipEnumerateMetafileSrcRectDestPoints; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestPoints'; + function GdipEnumerateMetafileSrcRectDestPointsI; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestPointsI'; + function GdipPlayMetafileRecord; external WINGDIPDLL name 'GdipPlayMetafileRecord'; + function GdipSetClipGraphics; external WINGDIPDLL name 'GdipSetClipGraphics'; + function GdipSetClipRect; external WINGDIPDLL name 'GdipSetClipRect'; + function GdipSetClipRectI; external WINGDIPDLL name 'GdipSetClipRectI'; + function GdipSetClipPath; external WINGDIPDLL name 'GdipSetClipPath'; + function GdipSetClipRegion; external WINGDIPDLL name 'GdipSetClipRegion'; + function GdipSetClipHrgn; external WINGDIPDLL name 'GdipSetClipHrgn'; + function GdipResetClip; external WINGDIPDLL name 'GdipResetClip'; + function GdipTranslateClip; external WINGDIPDLL name 'GdipTranslateClip'; + function GdipTranslateClipI; external WINGDIPDLL name 'GdipTranslateClipI'; + function GdipGetClip; external WINGDIPDLL name 'GdipGetClip'; + function GdipGetClipBounds; external WINGDIPDLL name 'GdipGetClipBounds'; + function GdipGetClipBoundsI; external WINGDIPDLL name 'GdipGetClipBoundsI'; + function GdipIsClipEmpty; external WINGDIPDLL name 'GdipIsClipEmpty'; + function GdipGetVisibleClipBounds; external WINGDIPDLL name 'GdipGetVisibleClipBounds'; + function GdipGetVisibleClipBoundsI; external WINGDIPDLL name 'GdipGetVisibleClipBoundsI'; + function GdipIsVisibleClipEmpty; external WINGDIPDLL name 'GdipIsVisibleClipEmpty'; + function GdipIsVisiblePoint; external WINGDIPDLL name 'GdipIsVisiblePoint'; + function GdipIsVisiblePointI; external WINGDIPDLL name 'GdipIsVisiblePointI'; + function GdipIsVisibleRect; external WINGDIPDLL name 'GdipIsVisibleRect'; + function GdipIsVisibleRectI; external WINGDIPDLL name 'GdipIsVisibleRectI'; + function GdipSaveGraphics; external WINGDIPDLL name 'GdipSaveGraphics'; + function GdipRestoreGraphics; external WINGDIPDLL name 'GdipRestoreGraphics'; + function GdipBeginContainer; external WINGDIPDLL name 'GdipBeginContainer'; + function GdipBeginContainerI; external WINGDIPDLL name 'GdipBeginContainerI'; + function GdipBeginContainer2; external WINGDIPDLL name 'GdipBeginContainer2'; + function GdipEndContainer; external WINGDIPDLL name 'GdipEndContainer'; + function GdipGetMetafileHeaderFromWmf; external WINGDIPDLL name 'GdipGetMetafileHeaderFromWmf'; + function GdipGetMetafileHeaderFromEmf; external WINGDIPDLL name 'GdipGetMetafileHeaderFromEmf'; + function GdipGetMetafileHeaderFromFile; external WINGDIPDLL name 'GdipGetMetafileHeaderFromFile'; + function GdipGetMetafileHeaderFromStream; external WINGDIPDLL name 'GdipGetMetafileHeaderFromStream'; + function GdipGetMetafileHeaderFromMetafile; external WINGDIPDLL name 'GdipGetMetafileHeaderFromMetafile'; + function GdipGetHemfFromMetafile; external WINGDIPDLL name 'GdipGetHemfFromMetafile'; + function GdipCreateStreamOnFile; external WINGDIPDLL name 'GdipCreateStreamOnFile'; + function GdipCreateMetafileFromWmf; external WINGDIPDLL name 'GdipCreateMetafileFromWmf'; + function GdipCreateMetafileFromEmf; external WINGDIPDLL name 'GdipCreateMetafileFromEmf'; + function GdipCreateMetafileFromFile; external WINGDIPDLL name 'GdipCreateMetafileFromFile'; + function GdipCreateMetafileFromWmfFile; external WINGDIPDLL name 'GdipCreateMetafileFromWmfFile'; + function GdipCreateMetafileFromStream; external WINGDIPDLL name 'GdipCreateMetafileFromStream'; + function GdipRecordMetafile; external WINGDIPDLL name 'GdipRecordMetafile'; + function GdipRecordMetafileI; external WINGDIPDLL name 'GdipRecordMetafileI'; + function GdipRecordMetafileFileName; external WINGDIPDLL name 'GdipRecordMetafileFileName'; + function GdipRecordMetafileFileNameI; external WINGDIPDLL name 'GdipRecordMetafileFileNameI'; + function GdipRecordMetafileStream; external WINGDIPDLL name 'GdipRecordMetafileStream'; + function GdipRecordMetafileStreamI; external WINGDIPDLL name 'GdipRecordMetafileStreamI'; + function GdipSetMetafileDownLevelRasterizationLimit; external WINGDIPDLL name 'GdipSetMetafileDownLevelRasterizationLimit'; + function GdipGetMetafileDownLevelRasterizationLimit; external WINGDIPDLL name 'GdipGetMetafileDownLevelRasterizationLimit'; + function GdipGetImageDecodersSize; external WINGDIPDLL name 'GdipGetImageDecodersSize'; + function GdipGetImageDecoders; external WINGDIPDLL name 'GdipGetImageDecoders'; + function GdipGetImageEncodersSize; external WINGDIPDLL name 'GdipGetImageEncodersSize'; + function GdipGetImageEncoders; external WINGDIPDLL name 'GdipGetImageEncoders'; + function GdipComment; external WINGDIPDLL name 'GdipComment'; + function GdipCreateFontFamilyFromName; external WINGDIPDLL name 'GdipCreateFontFamilyFromName'; + function GdipDeleteFontFamily; external WINGDIPDLL name 'GdipDeleteFontFamily'; + function GdipCloneFontFamily; external WINGDIPDLL name 'GdipCloneFontFamily'; + function GdipGetGenericFontFamilySansSerif; external WINGDIPDLL name 'GdipGetGenericFontFamilySansSerif'; + function GdipGetGenericFontFamilySerif; external WINGDIPDLL name 'GdipGetGenericFontFamilySerif'; + function GdipGetGenericFontFamilyMonospace; external WINGDIPDLL name 'GdipGetGenericFontFamilyMonospace'; + function GdipGetFamilyName; external WINGDIPDLL name 'GdipGetFamilyName'; + function GdipIsStyleAvailable; external WINGDIPDLL name 'GdipIsStyleAvailable'; + function GdipFontCollectionEnumerable; external WINGDIPDLL name 'GdipFontCollectionEnumerable'; + function GdipFontCollectionEnumerate; external WINGDIPDLL name 'GdipFontCollectionEnumerate'; + function GdipGetEmHeight; external WINGDIPDLL name 'GdipGetEmHeight'; + function GdipGetCellAscent; external WINGDIPDLL name 'GdipGetCellAscent'; + function GdipGetCellDescent; external WINGDIPDLL name 'GdipGetCellDescent'; + function GdipGetLineSpacing; external WINGDIPDLL name 'GdipGetLineSpacing'; + function GdipCreateFontFromDC; external WINGDIPDLL name 'GdipCreateFontFromDC'; + function GdipCreateFontFromLogfontA; external WINGDIPDLL name 'GdipCreateFontFromLogfontA'; + function GdipCreateFontFromLogfontW; external WINGDIPDLL name 'GdipCreateFontFromLogfontW'; + function GdipCreateFont; external WINGDIPDLL name 'GdipCreateFont'; + function GdipCloneFont; external WINGDIPDLL name 'GdipCloneFont'; + function GdipDeleteFont; external WINGDIPDLL name 'GdipDeleteFont'; + function GdipGetFamily; external WINGDIPDLL name 'GdipGetFamily'; + function GdipGetFontStyle; external WINGDIPDLL name 'GdipGetFontStyle'; + function GdipGetFontSize; external WINGDIPDLL name 'GdipGetFontSize'; + function GdipGetFontUnit; external WINGDIPDLL name 'GdipGetFontUnit'; + function GdipGetFontHeight; external WINGDIPDLL name 'GdipGetFontHeight'; + function GdipGetFontHeightGivenDPI; external WINGDIPDLL name 'GdipGetFontHeightGivenDPI'; + function GdipGetLogFontA; external WINGDIPDLL name 'GdipGetLogFontA'; + function GdipGetLogFontW; external WINGDIPDLL name 'GdipGetLogFontW'; + function GdipNewInstalledFontCollection; external WINGDIPDLL name 'GdipNewInstalledFontCollection'; + function GdipNewPrivateFontCollection; external WINGDIPDLL name 'GdipNewPrivateFontCollection'; + function GdipDeletePrivateFontCollection; external WINGDIPDLL name 'GdipDeletePrivateFontCollection'; + function GdipGetFontCollectionFamilyCount; external WINGDIPDLL name 'GdipGetFontCollectionFamilyCount'; + function GdipGetFontCollectionFamilyList; external WINGDIPDLL name 'GdipGetFontCollectionFamilyList'; + function GdipPrivateAddFontFile; external WINGDIPDLL name 'GdipPrivateAddFontFile'; + function GdipPrivateAddMemoryFont; external WINGDIPDLL name 'GdipPrivateAddMemoryFont'; + function GdipDrawString; external WINGDIPDLL name 'GdipDrawString'; + function GdipMeasureString; external WINGDIPDLL name 'GdipMeasureString'; + function GdipMeasureCharacterRanges; external WINGDIPDLL name 'GdipMeasureCharacterRanges'; + function GdipDrawDriverString; external WINGDIPDLL name 'GdipDrawDriverString'; + function GdipMeasureDriverString; external WINGDIPDLL name 'GdipMeasureDriverString'; + function GdipCreateStringFormat; external WINGDIPDLL name 'GdipCreateStringFormat'; + function GdipStringFormatGetGenericDefault; external WINGDIPDLL name 'GdipStringFormatGetGenericDefault'; + function GdipStringFormatGetGenericTypographic; external WINGDIPDLL name 'GdipStringFormatGetGenericTypographic'; + function GdipDeleteStringFormat; external WINGDIPDLL name 'GdipDeleteStringFormat'; + function GdipCloneStringFormat; external WINGDIPDLL name 'GdipCloneStringFormat'; + function GdipSetStringFormatFlags; external WINGDIPDLL name 'GdipSetStringFormatFlags'; + function GdipGetStringFormatFlags; external WINGDIPDLL name 'GdipGetStringFormatFlags'; + function GdipSetStringFormatAlign; external WINGDIPDLL name 'GdipSetStringFormatAlign'; + function GdipGetStringFormatAlign; external WINGDIPDLL name 'GdipGetStringFormatAlign'; + function GdipSetStringFormatLineAlign; external WINGDIPDLL name 'GdipSetStringFormatLineAlign'; + function GdipGetStringFormatLineAlign; external WINGDIPDLL name 'GdipGetStringFormatLineAlign'; + function GdipSetStringFormatTrimming; external WINGDIPDLL name 'GdipSetStringFormatTrimming'; + function GdipGetStringFormatTrimming; external WINGDIPDLL name 'GdipGetStringFormatTrimming'; + function GdipSetStringFormatHotkeyPrefix; external WINGDIPDLL name 'GdipSetStringFormatHotkeyPrefix'; + function GdipGetStringFormatHotkeyPrefix; external WINGDIPDLL name 'GdipGetStringFormatHotkeyPrefix'; + function GdipSetStringFormatTabStops; external WINGDIPDLL name 'GdipSetStringFormatTabStops'; + function GdipGetStringFormatTabStops; external WINGDIPDLL name 'GdipGetStringFormatTabStops'; + function GdipGetStringFormatTabStopCount; external WINGDIPDLL name 'GdipGetStringFormatTabStopCount'; + function GdipSetStringFormatDigitSubstitution; external WINGDIPDLL name 'GdipSetStringFormatDigitSubstitution'; + function GdipGetStringFormatDigitSubstitution; external WINGDIPDLL name 'GdipGetStringFormatDigitSubstitution'; + function GdipGetStringFormatMeasurableCharacterRangeCount; external WINGDIPDLL name 'GdipGetStringFormatMeasurableCharacterRangeCount'; + function GdipSetStringFormatMeasurableCharacterRanges; external WINGDIPDLL name 'GdipSetStringFormatMeasurableCharacterRanges'; + function GdipCreateCachedBitmap; external WINGDIPDLL name 'GdipCreateCachedBitmap'; + function GdipDeleteCachedBitmap; external WINGDIPDLL name 'GdipDeleteCachedBitmap'; + function GdipDrawCachedBitmap; external WINGDIPDLL name 'GdipDrawCachedBitmap'; + function GdipEmfToWmfBits; external WINGDIPDLL name 'GdipEmfToWmfBits'; + +// ----------------------------------------------------------------------------- +// TGdiplusBase class +// ----------------------------------------------------------------------------- + + class function TGdiplusBase.NewInstance: TObject; + begin + Result := InitInstance(GdipAlloc(ULONG(instanceSize))); + end; + + procedure TGdiplusBase.FreeInstance; + begin + CleanupInstance; + GdipFree(Self); + end; + +// ----------------------------------------------------------------------------- +// macros +// ----------------------------------------------------------------------------- + +function ObjectTypeIsValid(type_: ObjectType): BOOL; +begin + result := ((type_ >= ObjectTypeMin) and (type_ <= ObjectTypeMax)); +end; + +function GDIP_WMF_RECORD_TO_EMFPLUS(n: integer): Integer; +begin + result := (n or GDIP_WMF_RECORD_BASE); +end; + +function GDIP_EMFPLUS_RECORD_TO_WMF(n: integer): Integer; +begin + result := n and (not GDIP_WMF_RECORD_BASE); +end; + +function GDIP_IS_WMF_RECORDTYPE(n: integer): BOOL; +begin + result := ((n and GDIP_WMF_RECORD_BASE) <> 0); +end; + + +//-------------------------------------------------------------------------- +// TGPPoint Util +//-------------------------------------------------------------------------- + + function MakePoint(X, Y: Integer): TGPPoint; + begin + result.X := X; + result.Y := Y; + end; + + function MakePoint(X, Y: Single): TGPPointF; + begin + Result.X := X; + result.Y := Y; + end; + +//-------------------------------------------------------------------------- +// TGPSize Util +//-------------------------------------------------------------------------- + + function MakeSize(Width, Height: Single): TGPSizeF; + begin + result.Width := Width; + result.Height := Height; + end; + + function MakeSize(Width, Height: Integer): TGPSize; + begin + result.Width := Width; + result.Height := Height; + end; + +//-------------------------------------------------------------------------- +// TCharacterRange Util +//-------------------------------------------------------------------------- + + function MakeCharacterRange(First, Length: Integer): TCharacterRange; + begin + result.First := First; + result.Length := Length; + end; + +// ----------------------------------------------------------------------------- +// RectF class +// ----------------------------------------------------------------------------- + + function MakeRect(x, y, width, height: Single): TGPRectF; overload; + begin + Result.X := x; + Result.Y := y; + Result.Width := width; + Result.Height := height; + end; + + function MakeRect(location: TGPPointF; size: TGPSizeF): TGPRectF; overload; + begin + Result.X := location.X; + Result.Y := location.Y; + Result.Width := size.Width; + Result.Height := size.Height; + end; + +// ----------------------------------------------------------------------------- +// Rect class +// ----------------------------------------------------------------------------- + + function MakeRect(x, y, width, height: Integer): TGPRect; overload; + begin + Result.X := x; + Result.Y := y; + Result.Width := width; + Result.Height := height; + end; + + function MakeRect(location: TGPPoint; size: TGPSize): TGPRect; overload; + begin + Result.X := location.X; + Result.Y := location.Y; + Result.Width := size.Width; + Result.Height := size.Height; + end; + + function MakeRect(const Rect: TRect): TGPRect; + begin + Result.X := rect.Left; + Result.Y := Rect.Top; + Result.Width := Rect.Right-Rect.Left; + Result.Height:= Rect.Bottom-Rect.Top; + end; + +// ----------------------------------------------------------------------------- +// PathData class +// ----------------------------------------------------------------------------- + + constructor TPathData.Create; + begin + Count := 0; + Points := nil; + Types := nil; + end; + + destructor TPathData.destroy; + begin + if assigned(Points) then freemem(Points); + if assigned(Types) then freemem(Types); + end; + + +function GetPixelFormatSize(pixfmt: PixelFormat): UINT; +begin + result := (pixfmt shr 8) and $ff; +end; + +function IsIndexedPixelFormat(pixfmt: PixelFormat): BOOL; +begin + result := (pixfmt and PixelFormatIndexed) <> 0; +end; + +function IsAlphaPixelFormat(pixfmt: PixelFormat): BOOL; +begin + result := (pixfmt and PixelFormatAlpha) <> 0; +end; + +function IsExtendedPixelFormat(pixfmt: PixelFormat): BOOL; +begin + result := (pixfmt and PixelFormatExtended) <> 0; +end; + +function IsCanonicalPixelFormat(pixfmt: PixelFormat): BOOL; +begin + result := (pixfmt and PixelFormatCanonical) <> 0; +end; + +// ----------------------------------------------------------------------------- +// Color class +// ----------------------------------------------------------------------------- + +{ constructor TGPColor.Create; + begin + Argb := DWORD(Black); + end; + + // Construct an opaque Color object with + // the specified Red, Green, Blue values. + // + // Color values are not premultiplied. + + constructor TGPColor.Create(r, g, b: Byte); + begin + Argb := MakeARGB(255, r, g, b); + end; + + constructor TGPColor.Create(a, r, g, b: Byte); + begin + Argb := MakeARGB(a, r, g, b); + end; + + constructor TGPColor.Create(Value: ARGB); + begin + Argb := Value; + end; + + function TGPColor.GetAlpha: BYTE; + begin + result := BYTE(Argb shr AlphaShift); + end; + + function TGPColor.GetA: BYTE; + begin + result := GetAlpha; + end; + + function TGPColor.GetRed: BYTE; + begin + result := BYTE(Argb shr RedShift); + end; + + function TGPColor.GetR: BYTE; + begin + result := GetRed; + end; + + function TGPColor.GetGreen: Byte; + begin + result := BYTE(Argb shr GreenShift); + end; + + function TGPColor.GetG: Byte; + begin + result := GetGreen; + end; + + function TGPColor.GetBlue: Byte; + begin + result := BYTE(Argb shr BlueShift); + end; + + function TGPColor.GetB: Byte; + begin + result := GetBlue; + end; + + function TGPColor.GetValue: ARGB; + begin + result := Argb; + end; + + procedure TGPColor.SetValue(Value: ARGB); + begin + Argb := Value; + end; + + procedure TGPColor.SetFromCOLORREF(rgb: COLORREF); + begin + Argb := MakeARGB(255, GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)); + end; + + function TGPColor.ToCOLORREF: COLORREF; + begin + result := RGB(GetRed, GetGreen, GetBlue); + end; + + function TGPColor.MakeARGB(a, r, g, b: Byte): ARGB; + begin + result := ((DWORD(b) shl BlueShift) or + (DWORD(g) shl GreenShift) or + (DWORD(r) shl RedShift) or + (DWORD(a) shl AlphaShift)); + end; } + + function MakeColor(r, g, b: Byte): ARGB; overload; + begin + result := MakeColor(255, r, g, b); + end; + + function MakeColor(a, r, g, b: Byte): ARGB; overload; + begin + result := ((DWORD(b) shl BlueShift) or + (DWORD(g) shl GreenShift) or + (DWORD(r) shl RedShift) or + (DWORD(a) shl AlphaShift)); + end; + + function GetAlpha(color: ARGB): BYTE; + begin + result := BYTE(color shr AlphaShift); + end; + + function GetRed(color: ARGB): BYTE; + begin + result := BYTE(color shr RedShift); + end; + + function GetGreen(color: ARGB): BYTE; + begin + result := BYTE(color shr GreenShift); + end; + + function GetBlue(color: ARGB): BYTE; + begin + result := BYTE(color shr BlueShift); + end; + + function ColorRefToARGB(rgb: COLORREF): ARGB; + begin + result := MakeColor(255, GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)); + end; + + function ARGBToColorRef(Color: ARGB): COLORREF; + begin + result := RGB(GetRed(Color), GetGreen(Color), GetBlue(Color)); + end; + + +// ----------------------------------------------------------------------------- +// MetafileHeader class +// ----------------------------------------------------------------------------- + + procedure TMetafileHeader.GetBounds(out Rect: TGPRect); + begin + rect.X := X; + rect.Y := Y; + rect.Width := Width; + rect.Height := Height; + end; + + function TMetafileHeader.IsWmf: BOOL; + begin + result := ((Type_ = MetafileTypeWmf) or (Type_ = MetafileTypeWmfPlaceable)); + end; + + function TMetafileHeader.IsWmfPlaceable: BOOL; + begin + result := (Type_ = MetafileTypeWmfPlaceable); + end; + + function TMetafileHeader.IsEmf: BOOL; + begin + result := (Type_ = MetafileTypeEmf); + end; + + function TMetafileHeader.IsEmfOrEmfPlus: BOOL; + begin + result := (Type_ >= MetafileTypeEmf); + end; + + function TMetafileHeader.IsEmfPlus: BOOL; + begin + result := (Type_ >= MetafileTypeEmfPlusOnly) + end; + + function TMetafileHeader.IsEmfPlusDual: BOOL; + begin + result := (Type_ = MetafileTypeEmfPlusDual) + end; + + function TMetafileHeader.IsEmfPlusOnly: BOOL; + begin + result := (Type_ = MetafileTypeEmfPlusOnly) + end; + + function TMetafileHeader.IsDisplay: BOOL; + begin + result := (IsEmfPlus and ((EmfPlusFlags and GDIP_EMFPLUSFLAGS_DISPLAY) <> 0)); + end; + + function TMetafileHeader.GetWmfHeader: PMetaHeader; + begin + if IsWmf then result := @Header.WmfHeader + else result := nil; + end; + + function TMetafileHeader.GetEmfHeader: PENHMETAHEADER3; + begin + if IsEmfOrEmfPlus then result := @Header.EmfHeader + else result := nil; + end; + +end. + + + diff --git a/Pramougolnik/GDIPOBJ.dcu b/Pramougolnik/GDIPOBJ.dcu new file mode 100644 index 0000000000000000000000000000000000000000..d4aed852cc9a0734813242dfcb5c8f73db7c022c GIT binary patch literal 344360 zcmdRX3wV^p)qmJr2$w(r!$n22C=pO1pr}+p0t8q~AV3gky)DV^W?{1%b~iw5QL&{T zs95n@QnbZNtM;=kep1C26%{M3Sn*c0V!=uaS}gP{R{LZ}Zyfg1*cN1&B{(T-F zvNQAk&SlP=IdiYc&+`wdD$IK!UOO`n|M@ykogAp0Iq~98`+WAlcjV=bZSH0yR5k}w zbtu+QG^aI{4mDBfaOXfg9g2jK-+v*sC0sNo8jr+6tKXdaTDa@HXhUdDI!P&e@BHcE za8Zi?KI@m=e-kd58;{l}%xq5TT$_jzQgZF_K37KyrvziE(B@%}9SaxMO`RK|8PUNcv3Lg5RC_8AAGjb7b&PqwuBz0(vco@GZ!uj)u$_~m$VSXhtFMg zMx>9KHZ_!<7ECoxBErX!QEFz?B?O-zA$5S6Iwu$oO$x?h)ywNc&FN?&{;`%_6((*c zCE_GjOFgpxsbxl;5sYG0G&ydzRj zy*!$RxkiesQmJSp9%|rUMf59_6gizIh#y^#?7fo6k}AT2>;or$b4;WwCrpZkg2`3y z-8d%FlW9&#CYl5zU;E*SC6OYsnHo0qya*ZhRiT+-CewL>$awmsZ{8N^JS7$#CLDQ9Ezrg;*oSC2-P=q zrluB%v#j+EJ?4=LnxmEUPeWo^iVB1a<_2cep%ti>QZQ}y)ER6Gg|)~p8SwqXWEL}L zPG{38nqD8oq^gu9qO=M5SAvq9l*brYlMreJd*9!@;hFmPD7^R$V9x|*t5{#|+@b`6d(!q2~D(~8NJ`MM*4KxKKAvnT%)KllD%N_}L zubbKsZH~31CI(ZXO*g#uy>Ri==GmbLc{cduaB~KB1N#) zk>{~xmWtd-iCB!tnrsw_R4(1M4xi6Sx5h%~ej=svC-L193nm9FUowq)5bABx({I}R zaJUeEU4cI%UGOKf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zqO?)vryQUvN;yJRiqboMAHVMp>6^w)c#0R9Rf=!=FJ*%=gsKK5H2qU)QliKlP!iL3 z@ay`J6f$m#H9djf$cN;o-@uRGLkbu$Nm-i4l{%#~{Sd!Y52;M!jf=8|?z@x?NQbgD z{f^jPf$U5V;cft}JKe!VG}jDrCED-|a@(}z46aNlnVG*6+Zjk6GC(QJ{7k}><(a?6 zA1febWR@taGyjCYKR{|Txc5e>&rIUa4v+@qkg^AHL?G=MoQWu%8QcP-9L)SuVw9tq zTlg(;h&}ru{(t~+X7SO7;>!Ln*`xGlr=?5rW&eOb1we+fe=7k>H2bcED9J2NWRz5P z1ULR6>Fn=uzaO%Y9mV~A$Wj)Ek5bD19QXYp)$E(HOIgq2^DAXD`xE>SHe@?{QF_lo zb|HO~7Q{>0&z{1~eaImO3{vd5zmx>UnL90MN*^u=a}-x@L<$sl?h~m}{E#h5DEAxL zqr`I)_+e>C3UWxXa<~UK0$G4KDa9P_LJ!cYxeQ(*w9VW*_`mf zeu{k#=Lm{(?uOug84lwdKC)8==I|y>380PnznI|MAMy8HJkE0u@#DGpJKg%+P5fXk Oq&|mR7?d4!O8#HoBPn|T literal 0 HcmV?d00001 diff --git a/Pramougolnik/GDIPOBJ.pas b/Pramougolnik/GDIPOBJ.pas new file mode 100644 index 0000000..2415a65 --- /dev/null +++ b/Pramougolnik/GDIPOBJ.pas @@ -0,0 +1,7975 @@ + {******************************************************************} + { GDI+ Class } + { } + { home page : http://www.progdigy.com } + { email : hgourvest@progdigy.com } + { } + { date : 15-02-2002 } + { } + { The contents of this file are used with permission, subject to } + { the Mozilla Public License Version 1.1 (the "License"); you may } + { not use this file except in compliance with the License. You may } + { obtain a copy of the License at } + { http://www.mozilla.org/MPL/MPL-1.1.html } + { } + { Software distributed under the License is distributed on an } + { "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or } + { implied. See the License for the specific language governing } + { rights and limitations under the License. } + { } + { *****************************************************************} + +unit GDIPOBJ; + +interface +uses + Windows, + ActiveX, + GDIPAPI; + +(**************************************************************************\ +* +* GDI+ Codec Image APIs +* +\**************************************************************************) + +//-------------------------------------------------------------------------- +// Codec Management APIs +//-------------------------------------------------------------------------- + + function GetImageDecodersSize(out numDecoders, size: UINT): TStatus; + function GetImageDecoders(numDecoders, size: UINT; + decoders: PImageCodecInfo): TStatus; + function GetImageEncodersSize(out numEncoders, size: UINT): TStatus; + function GetImageEncoders(numEncoders, size: UINT; + encoders: PImageCodecInfo): TStatus; + +(**************************************************************************\ +* +* Private GDI+ header file. +* +\**************************************************************************) + +//--------------------------------------------------------------------------- +// GDI+ classes for forward reference +//--------------------------------------------------------------------------- + +type + TGPGraphics = class; + TGPPen = class; + TGPBrush = class; + TGPMatrix = class; + TGPBitmap = class; + TGPMetafile = class; + TGPFontFamily = class; + TGPGraphicsPath = class; + TGPRegion = class; + TGPImage = class; + TGPHatchBrush = class; + TGPSolidBrush = class; + TGPLinearGradientBrush = class; + TGPPathGradientBrush = class; + TGPFont = class; + TGPFontCollection = class; + TGPInstalledFontCollection = class; + TGPPrivateFontCollection = class; + TGPImageAttributes = class; + TGPCachedBitmap = class; + +(**************************************************************************\ +* +* GDI+ Region, Font, Image, CustomLineCap class definitions. +* +\**************************************************************************) + + TGPRegion = class(TGdiplusBase) + protected + nativeRegion: GpRegion; + lastResult: TStatus; + function SetStatus(status: TStatus): TStatus; + procedure SetNativeRegion(nativeRegion: GpRegion); + constructor Create(nativeRegion: GpRegion); reintroduce; overload; + public + constructor Create; reintroduce; overload; + constructor Create(rect: TGPRectF); reintroduce; overload; + constructor Create(rect: TGPRect); reintroduce; overload; + constructor Create(path: TGPGraphicsPath); reintroduce; overload; + constructor Create(regionData: PBYTE; size: Integer); reintroduce; overload; + constructor Create(hRgn: HRGN); reintroduce; overload; + function FromHRGN(hRgn: HRGN): TGPRegion; + destructor Destroy; override; + function Clone: TGPRegion; + function MakeInfinite: TStatus; + function MakeEmpty: TStatus; + function GetDataSize: UINT; + // buffer - where to put the data + // bufferSize - how big the buffer is (should be at least as big as GetDataSize()) + // sizeFilled - if not NULL, this is an OUT param that says how many bytes + // of data were written to the buffer. + function GetData(buffer: PBYTE; bufferSize: UINT; + sizeFilled: PUINT = nil): TStatus; + function Intersect(const rect: TGPRect): TStatus; overload; + function Intersect(const rect: TGPRectF): TStatus; overload; + function Intersect(path: TGPGraphicsPath): TStatus; overload; + function Intersect(region: TGPRegion): TStatus; overload; + function Union(const rect: TGPRect): TStatus; overload; + function Union(const rect: TGPRectF): TStatus; overload; + function Union(path: TGPGraphicsPath): TStatus; overload; + function Union(region: TGPRegion): TStatus; overload; + function Xor_(const rect: TGPRect): TStatus; overload; + function Xor_(const rect: TGPRectF): TStatus; overload; + function Xor_(path: TGPGraphicsPath): TStatus; overload; + function Xor_(region: TGPRegion): TStatus; overload; + function Exclude(const rect: TGPRect): TStatus; overload; + function Exclude(const rect: TGPRectF): TStatus; overload; + function Exclude(path: TGPGraphicsPath): TStatus; overload; + function Exclude(region: TGPRegion): TStatus; overload; + function Complement(const rect: TGPRect): TStatus; overload; + function Complement(const rect: TGPRectF): TStatus; overload; + function Complement(path: TGPGraphicsPath): TStatus; overload; + function Complement(region: TGPRegion): TStatus; overload; + function Translate(dx, dy: Single): TStatus; overload; + function Translate(dx, dy: Integer): TStatus; overload; + function Transform(matrix: TGPMatrix): TStatus; + function GetBounds(out rect: TGPRect; g: TGPGraphics): TStatus; overload; + function GetBounds(out rect: TGPRectF; g: TGPGraphics): TStatus; overload; + function GetHRGN(g: TGPGraphics): HRGN; + function IsEmpty(g: TGPGraphics): BOOL; + function IsInfinite(g: TGPGraphics): BOOL ; + function IsVisible(x, y: Integer; g: TGPGraphics = nil): BOOL; overload; + function IsVisible(const point: TGPPoint; g: TGPGraphics = nil): BOOL; overload; + function IsVisible(x, y: Single; g: TGPGraphics = nil): BOOL; overload; + function IsVisible(const point: TGPPointF; g: TGPGraphics = nil): BOOL; overload; + function IsVisible(x, y, width, height: Integer; g: TGPGraphics): BOOL; overload; + function IsVisible(const rect: TGPRect; g: TGPGraphics = nil): BOOL; overload; + function IsVisible(x, y, width, height: Single; g: TGPGraphics = nil): BOOL; overload; + function IsVisible(const rect: TGPRectF; g: TGPGraphics = nil): BOOL; overload; + function Equals(region: TGPRegion; g: TGPGraphics): BOOL; + function GetRegionScansCount(matrix: TGPMatrix): UINT; + function GetRegionScans(matrix: TGPMatrix ;rects: PGPRectF; out count: Integer): TStatus; overload; + function GetRegionScans(matrix: TGPMatrix; rects: PGPRect; out count: Integer): TStatus; overload; + function GetLastStatus: TStatus; + end; + +//-------------------------------------------------------------------------- +// FontFamily +//-------------------------------------------------------------------------- + + TGPFontFamily = class(TGdiplusBase) + protected + nativeFamily: GpFontFamily; + lastResult: TStatus; + function SetStatus(status: TStatus): TStatus; + constructor Create(nativeOrig: GpFontFamily; + status: TStatus); reintroduce; overload; + public + constructor Create; reintroduce; overload; + constructor Create(name: WideString; fontCollection: TGPFontCollection = nil); reintroduce; overload; + destructor Destroy; override; + class function GenericSansSerif: TGPFontFamily; + class function GenericSerif: TGPFontFamily; + class function GenericMonospace: TGPFontFamily; + function GetFamilyName(out name: String; language: LANGID = 0): TStatus; + function Clone: TGPFontFamily; + function IsAvailable: BOOL; + function IsStyleAvailable(style: Integer): BOOL; + function GetEmHeight(style: Integer): UINT16; + function GetCellAscent(style: Integer): UINT16; + function GetCellDescent(style: Integer): UINT16; + function GetLineSpacing(style: Integer): UINT16; + function GetLastStatus: TStatus; + end; + +//-------------------------------------------------------------------------- +// Font Collection +//-------------------------------------------------------------------------- + + TGPFontCollection = class(TGdiplusBase) + protected + nativeFontCollection: GpFontCollection; + lastResult: TStatus; + function SetStatus(status: TStatus): TStatus; + public + constructor Create; + destructor Destroy; override; + function GetFamilyCount: Integer; + function GetFamilies(numSought: Integer; out gpfamilies: array of TGPFontFamily; + out numFound: Integer): TStatus; + function GetLastStatus: TStatus; + end; + + TGPInstalledFontCollection = class(TGPFontCollection) + public + constructor Create; reintroduce; + destructor Destroy; override; + end; + + TGPPrivateFontCollection = class(TGPFontCollection) + public + constructor Create; reintroduce; + destructor destroy; override; + function AddFontFile(filename: WideString): TStatus; + function AddMemoryFont(memory: Pointer; length: Integer): TStatus; + end; + +//-------------------------------------------------------------------------- +// TFont +//-------------------------------------------------------------------------- + + TGPFont = class(TGdiplusBase) + protected + nativeFont: GpFont; + lastResult: TStatus; + procedure SetNativeFont(Font: GpFont); + function SetStatus(status: TStatus): TStatus; + constructor Create(font: GpFont; status: TStatus); overload; + public + constructor Create(hdc: HDC); reintroduce; overload; + constructor Create(hdc: HDC; logfont: PLogFontA); reintroduce; overload; + constructor Create(hdc: HDC; logfont: PLogFontW); reintroduce; overload; + constructor Create(hdc: HDC; hfont: HFONT); reintroduce; overload; + constructor Create(family: TGPFontFamily; emSize: Single; + style: TFontStyle = FontStyleRegular; + unit_: TUnit = UnitPoint); reintroduce; overload; + constructor Create(familyName: WideString; emSize: Single; + style: TFontStyle = FontStyleRegular; unit_: TUnit = UnitPoint; + fontCollection: TGPFontCollection = nil); reintroduce; overload; + function GetLogFontA(g: TGPGraphics; out logfontA: TLogFontA): TStatus; + function GetLogFontW(g: TGPGraphics; out logfontW: TLogFontW): TStatus; + function Clone: TGPFont; + destructor Destroy; override; + function IsAvailable: BOOL; + function GetStyle: Integer; + function GetSize: Single; + function GetUnit: TUnit; + function GetLastStatus: TStatus; + function GetHeight(graphics: TGPGraphics): Single; overload; + function GetHeight(dpi: Single): Single; overload; + function GetFamily(family: TGPFontFamily): TStatus; + end; + +//-------------------------------------------------------------------------- +// Abstract base class for Image and Metafile +//-------------------------------------------------------------------------- + + TGPImage = class(TGdiplusBase) + protected + nativeImage: GpImage; + lastResult: TStatus; + loadStatus: TStatus; + procedure SetNativeImage(nativeImage: GpImage); + function SetStatus(status: TStatus): TStatus; + constructor Create(nativeImage: GpImage; status: TStatus); reintroduce; overload; + public + constructor Create(filename: WideString; useEmbeddedColorManagement: BOOL = FALSE); reintroduce; overload; + constructor Create(stream: IStream; useEmbeddedColorManagement: BOOL = FALSE); reintroduce; overload; + function FromFile(filename: WideString; useEmbeddedColorManagement: BOOL = FALSE): TGPImage; + function FromStream(stream: IStream; useEmbeddedColorManagement: BOOL = FALSE): TGPImage; + destructor destroy; override; + function Clone: TGPImage; + function Save(filename: WideString; const clsidEncoder: TGUID; + encoderParams: PEncoderParameters = nil): TStatus; overload; + function Save(stream: IStream; const clsidEncoder: TGUID; + encoderParams: PEncoderParameters = nil): TStatus; overload; + function SaveAdd(encoderParams: PEncoderParameters): TStatus; overload; + function SaveAdd(newImage: TGPImage; encoderParams: PEncoderParameters): TStatus; overload; + function GetType: TImageType; + function GetPhysicalDimension(out size: TGPSizeF): TStatus; + function GetBounds(out srcRect: TGPRectF; out srcUnit: TUnit): TStatus; + function GetWidth: UINT; + function GetHeight: UINT; + function GetHorizontalResolution: Single; + function GetVerticalResolution: Single; + function GetFlags: UINT; + function GetRawFormat(out format: TGUID): TStatus; + function GetPixelFormat: TPixelFormat; + function GetPaletteSize: Integer; + function GetPalette(palette: PColorPalette; size: Integer): TStatus; + function SetPalette(palette: PColorPalette): TStatus; + function GetThumbnailImage(thumbWidth, thumbHeight: UINT; + callback: GetThumbnailImageAbort = nil; callbackData: pointer = nil): TGPImage; + function GetFrameDimensionsCount: UINT; + function GetFrameDimensionsList(dimensionIDs: PGUID; count: UINT): TStatus; + function GetFrameCount(const dimensionID: TGUID): UINT; + function SelectActiveFrame(const dimensionID: TGUID; frameIndex: UINT): TStatus; + function RotateFlip(rotateFlipType: TRotateFlipType): TStatus; + function GetPropertyCount: UINT; + function GetPropertyIdList(numOfProperty: UINT; list: PPropID): TStatus; + function GetPropertyItemSize(propId: PROPID): UINT; + function GetPropertyItem(propId: PROPID; propSize: UINT; buffer: PPropertyItem): TStatus; + function GetPropertySize(out totalBufferSize, numProperties : UINT): TStatus; + function GetAllPropertyItems(totalBufferSize, numProperties: UINT; + allItems: PPROPERTYITEM): TStatus; + function RemovePropertyItem(propId: TPROPID): TStatus; + function SetPropertyItem(const item: TPropertyItem): TStatus; + function GetEncoderParameterListSize(const clsidEncoder: TGUID): UINT; + function GetEncoderParameterList(const clsidEncoder: TGUID; size: UINT; + buffer: PEncoderParameters): TStatus; + function GetLastStatus: TStatus; + end; + + TGPBitmap = class(TGPImage) + protected + constructor Create(nativeBitmap: GpBitmap); reintroduce; overload; + public + constructor Create(filename: WideString; useEmbeddedColorManagement: BOOL = FALSE); reintroduce; overload; + constructor Create(stream: IStream; useEmbeddedColorManagement: BOOL = FALSE); reintroduce; overload; + function FromFile(filename: WideString; useEmbeddedColorManagement: BOOL = FALSE): TGPBitmap; + function FromStream(stream: IStream; useEmbeddedColorManagement: BOOL = FALSE): TGPBitmap; + constructor Create(width, height, stride: Integer; format: TPixelFormat; scan0: PBYTE); reintroduce; overload; + constructor Create(width, height: Integer; format: TPixelFormat = PixelFormat32bppARGB); reintroduce; overload; + constructor Create(width, height: Integer; target: TGPGraphics); reintroduce; overload; + function Clone(rect: TGPRect; format: TPixelFormat): TGPBitmap; overload; + function Clone(x, y, width, height: Integer; format: TPixelFormat): TGPBitmap; overload; + function Clone(rect: TGPRectF; format: TPixelFormat): TGPBitmap; overload; + function Clone(x, y, width, height: Single; format: TPixelFormat): TGPBitmap; overload; + function LockBits(rect: TGPRect; flags: UINT; format: TPixelFormat; out lockedBitmapData: TBitmapData): TStatus; + function UnlockBits(var lockedBitmapData: TBitmapData): TStatus; + function GetPixel(x, y: Integer; out color: TGPColor): TStatus; + function SetPixel(x, y: Integer; color: TGPColor): TStatus; + function SetResolution(xdpi, ydpi: Single): TStatus; + constructor Create(var gdiBitmapInfo: TBITMAPINFO; gdiBitmapData: Pointer); reintroduce; overload; + constructor Create(hbm: HBITMAP; hpal: HPALETTE); reintroduce; overload; + constructor Create(hicon: HICON); reintroduce; overload; + constructor Create(hInstance: HMODULE; bitmapName: WideString); reintroduce; overload; + function FromBITMAPINFO(var gdiBitmapInfo: TBITMAPINFO; gdiBitmapData: Pointer): TGPBitmap; + function FromHBITMAP(hbm: HBITMAP; hpal: HPALETTE): TGPBitmap; + function FromHICON(hicon: HICON): TGPBitmap; + function FromResource(hInstance: HMODULE; bitmapName: WideString): TGPBitmap; + function GetHBITMAP(colorBackground: TGPColor; out hbmReturn: HBITMAP): TStatus; + function GetHICON(out hicon: HICON): TStatus; + end; + + TGPCustomLineCap = class(TGdiplusBase) + protected + nativeCap: GpCustomLineCap; + lastResult: TStatus; + procedure SetNativeCap(nativeCap: GpCustomLineCap); + function SetStatus(status: TStatus): TStatus; + constructor Create(nativeCap: GpCustomLineCap; + status: TStatus); reintroduce; overload; + public + constructor Create; reintroduce; overload; + constructor Create(fillPath, strokePath: TGPGraphicsPath; + baseCap: TLineCap = LineCapFlat; + baseInset: Single = 0); reintroduce; overload; + destructor Destroy; override; + function Clone: TGPCustomLineCap; + function SetStrokeCap(strokeCap: TLineCap): TStatus; + function SetStrokeCaps(startCap, endCap: TLineCap): TStatus; + function GetStrokeCaps(out startCap, endCap: TLineCap): TStatus; + function SetStrokeJoin(lineJoin: TLineJoin): TStatus; + function GetStrokeJoin: TLineJoin; + function SetBaseCap(baseCap: TLineCap): TStatus; + function GetBaseCap: TLineCap; + function SetBaseInset(inset: Single): TStatus; + function GetBaseInset: Single; + function SetWidthScale(widthScale: Single): TStatus; + function GetWidthScale: Single; + function GetLastStatus: TStatus; + end; + + TGPCachedBitmap = class(TGdiplusBase) + protected + nativeCachedBitmap: GpCachedBitmap; + lastResult: TStatus; + public + constructor Create(bitmap: TGPBitmap; graphics: TGPGraphics); reintroduce; + destructor Destroy; override; + function GetLastStatus: TStatus; + end; + +(**************************************************************************\ +* +* GDI+ Image Attributes used with Graphics.DrawImage +* +* There are 5 possible sets of color adjustments: +* ColorAdjustDefault, +* ColorAdjustBitmap, +* ColorAdjustBrush, +* ColorAdjustPen, +* ColorAdjustText, +* +* Bitmaps, Brushes, Pens, and Text will all use any color adjustments +* that have been set into the default ImageAttributes until their own +* color adjustments have been set. So as soon as any "Set" method is +* called for Bitmaps, Brushes, Pens, or Text, then they start from +* scratch with only the color adjustments that have been set for them. +* Calling Reset removes any individual color adjustments for a type +* and makes it revert back to using all the default color adjustments +* (if any). The SetToIdentity method is a way to force a type to +* have no color adjustments at all, regardless of what previous adjustments +* have been set for the defaults or for that type. +* +\********************************************************************F******) + + TGPImageAttributes = class(TGdiplusBase) + protected + nativeImageAttr: GpImageAttributes; + lastResult: TStatus; + procedure SetNativeImageAttr(nativeImageAttr: GpImageAttributes); + function SetStatus(status: TStatus): TStatus; + constructor Create(imageAttr: GpImageAttributes; + status: GpStatus); reintroduce; overload; + public + constructor Create; reintroduce; overload; + destructor Destroy; override; + function Clone: TGPImageAttributes; + function SetToIdentity(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function Reset(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function SetColorMatrix(const colorMatrix: TColorMatrix; + mode: TColorMatrixFlags = ColorMatrixFlagsDefault; + type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function ClearColorMatrix(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function SetColorMatrices(const colorMatrix: TColorMatrix; const grayMatrix: TColorMatrix; + mode: TColorMatrixFlags = ColorMatrixFlagsDefault; + type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function ClearColorMatrices(Type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function SetThreshold(threshold: Single; type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function ClearThreshold(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function SetGamma(gamma: Single; type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function ClearGamma( type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function SetNoOp(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function ClearNoOp(Type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function SetColorKey(colorLow, colorHigh: TGPColor; type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function ClearColorKey(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function SetOutputChannel(channelFlags: TColorChannelFlags; type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function ClearOutputChannel(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function SetOutputChannelColorProfile(colorProfileFilename: WideString; + type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function ClearOutputChannelColorProfile(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function SetRemapTable(mapSize: Cardinal; map: PColorMap; type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function ClearRemapTable(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + function SetBrushRemapTable(mapSize: Cardinal; map: PColorMap): TStatus; + function ClearBrushRemapTable: TStatus; + function SetWrapMode(wrap: TWrapMode; color: TGPColor = aclBlack; clamp: BOOL = FALSE): TStatus; + // The flags of the palette are ignored. + function GetAdjustedPalette(colorPalette: PColorPalette; colorAdjustType: TColorAdjustType): TStatus; + function GetLastStatus: TStatus; + end; + +(**************************************************************************\ +* +* GDI+ Matrix class +* +\**************************************************************************) + + TMatrixArray = array[0..5] of Single; + + TGPMatrix = class(TGdiplusBase) + protected + nativeMatrix: GpMatrix; + lastResult: GpStatus ; + procedure SetNativeMatrix(nativeMatrix: GpMatrix); + function SetStatus(status: GpStatus): TStatus; + constructor Create(nativeMatrix: GpMatrix); reintroduce; overload; + public + // Default constructor is set to identity matrix. + constructor Create; reintroduce; overload; + constructor Create(m11, m12, m21, m22, dx, dy: Single); reintroduce; overload; + constructor Create(const rect: TGPRectF; const dstplg: TGPPointF); reintroduce; overload; + constructor Create(const rect: TGPRect; const dstplg: TGPPoint); reintroduce; overload; + destructor Destroy; override; + function Clone: TGPMatrix; + function GetElements(const m: TMatrixArray): TStatus; + function SetElements(m11, m12, m21, m22, dx, dy: Single): TStatus; + function OffsetX: Single; + function OffsetY: Single; + function Reset: TStatus; + function Multiply(matrix: TGPMatrix; order: TMatrixOrder = MatrixOrderPrepend): TStatus; // ok + function Translate(offsetX, offsetY: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; // ok + function Scale(scaleX, scaleY: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; // ok + function Rotate(angle: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; // ok + function RotateAt(angle: Single; const center: TGPPointF; order: TMatrixOrder = MatrixOrderPrepend): TStatus; // ok + function Shear(shearX, shearY: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; // ok + function Invert: TStatus; // ok + + function TransformPoints(pts: PGPPointF; count: Integer = 1): TStatus; overload; + function TransformPoints(pts: PGPPoint; count: Integer = 1): TStatus; overload; + + function TransformVectors(pts: PGPPointF; count: Integer = 1): TStatus; overload; + function TransformVectors(pts: PGPPoint; count: Integer = 1): TStatus; overload; + + function IsInvertible: BOOL; + function IsIdentity: BOOL; + function Equals(matrix: TGPMatrix): BOOL; + function GetLastStatus: TStatus; + end; + +(**************************************************************************\ +* +* GDI+ Brush class +* +\**************************************************************************) + + //-------------------------------------------------------------------------- + // Abstract base class for various brush types + //-------------------------------------------------------------------------- + + TGPBrush = class(TGdiplusBase) + protected + nativeBrush: GpBrush; + lastResult: TStatus; + procedure SetNativeBrush(nativeBrush: GpBrush); + function SetStatus(status: TStatus): TStatus; + constructor Create(nativeBrush: GpBrush; status: TStatus); overload; + public + constructor Create; overload; + destructor Destroy; override; + function Clone: TGPBrush; virtual; + function GetType: TBrushType; + function GetLastStatus: TStatus; + end; + + //-------------------------------------------------------------------------- + // Solid Fill Brush Object + //-------------------------------------------------------------------------- + + TGPSolidBrush = class(TGPBrush) + public + constructor Create(color: TGPColor); reintroduce; overload; + constructor Create; reintroduce; overload; + function GetColor(out color: TGPColor): TStatus; + function SetColor(color: TGPColor): TStatus; + end; + + //-------------------------------------------------------------------------- + // Texture Brush Fill Object + //-------------------------------------------------------------------------- + + TGPTextureBrush = class(TGPBrush) + public + constructor Create(image: TGPImage; wrapMode: TWrapMode = WrapModeTile); reintroduce; overload; + constructor Create(image: TGPImage; wrapMode: TWrapMode; dstRect: TGPRectF); reintroduce; overload; + constructor Create(image: TGPImage; dstRect: TGPRectF; imageAttributes: TGPImageAttributes = nil); reintroduce; overload; + constructor Create(image: TGPImage; dstRect: TGPRect; imageAttributes: TGPImageAttributes = nil); reintroduce; overload; + constructor Create(image: TGPImage; wrapMode: TWrapMode; dstRect: TGPRect); reintroduce; overload; + constructor Create(image: TGPImage; wrapMode: TWrapMode; dstX, dstY, dstWidth, + dstHeight: Single); reintroduce; overload; + constructor Create(image: TGPImage; wrapMode: TWrapMode; dstX, dstY, dstWidth, + dstHeight: Integer); reintroduce; overload; + constructor Create; reintroduce; overload; + function SetTransform(matrix: TGPMatrix): TStatus; + function GetTransform(matrix: TGPMatrix): TStatus; + function ResetTransform: TStatus; + function MultiplyTransform(matrix: TGPMatrix; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function TranslateTransform(dx, dy: Single; order: MatrixOrder = MatrixOrderPrepend): TStatus; + function ScaleTransform(sx, sy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function RotateTransform(angle: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function SetWrapMode(wrapMode: TWrapMode): TStatus; + function GetWrapMode: TWrapMode; + function GetImage: TGPImage; + end; + + //-------------------------------------------------------------------------- + // Linear Gradient Brush Object + //-------------------------------------------------------------------------- + + TGPLinearGradientBrush = class(TGPBrush) + public + constructor Create; reintroduce; overload; + constructor Create(const point1, point2: TGPPointF; color1, + color2: TGPColor); reintroduce; overload; + constructor Create(const point1, point2: TGPPoint; color1, + color2: TGPColor); reintroduce; overload; + constructor Create(rect: TGPRectF; color1, color2: TGPColor; + mode: TLinearGradientMode); reintroduce; overload; + constructor Create(rect: TGPRect; color1, color2: TGPColor; + mode: TLinearGradientMode); reintroduce; overload; + constructor Create(rect: TGPRectF; color1, color2: TGPColor; angle: Single; + isAngleScalable: BOOL = FALSE); overload; + constructor Create(rect: TGPRect; color1, color2: TGPColor; angle: Single; + isAngleScalable: BOOL = FALSE); overload; + function SetLinearColors(color1, color2: TGPColor): TStatus; + function GetLinearColors(out color1, color2: TGPColor): TStatus; + function GetRectangle(out rect: TGPRectF): TStatus; overload; + function GetRectangle(out rect: TGPRect): TStatus; overload; + function SetGammaCorrection(useGammaCorrection: BOOL): TStatus; + function GetGammaCorrection: BOOL; + function GetBlendCount: Integer; + function SetBlend(blendFactors, blendPositions: PSingle; count: Integer): TStatus; + function GetBlend(blendFactors, blendPositions: PSingle; count: Integer): TStatus; + function GetInterpolationColorCount: Integer; + function SetInterpolationColors(presetColors: PGPColor; blendPositions: PSingle; count: Integer): TStatus; + function GetInterpolationColors(presetColors: PGPColor; blendPositions: PSingle; count: Integer): TStatus; + function SetBlendBellShape(focus: Single; scale: Single = 1.0): TStatus; + function SetBlendTriangularShape(focus: Single; scale: Single = 1.0): TStatus; + function SetTransform(matrix: TGPMatrix): TStatus; + function GetTransform(matrix: TGPMatrix): TStatus; + function ResetTransform: TStatus; + function MultiplyTransform(matrix: TGPMatrix; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function TranslateTransform(dx, dy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function ScaleTransform(sx, sy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function RotateTransform(angle: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function SetWrapMode(wrapMode: TWrapMode): TStatus; + function GetWrapMode: TWrapMode; + end; + + //-------------------------------------------------------------------------- + // Hatch Brush Object + //-------------------------------------------------------------------------- + + TGPHatchBrush = class(TGPBrush) + public + constructor Create; reintroduce; overload; + constructor Create(hatchStyle: THatchStyle; foreColor: TGPColor; backColor: TGPColor = aclBlack); reintroduce; overload; // ok + function GetHatchStyle: THatchStyle; + function GetForegroundColor(out color: TGPColor): TStatus; + function GetBackgroundColor(out color: TGPColor): TStatus; + end; + +(**************************************************************************\ +* +* GDI+ Pen class +* +\**************************************************************************) + +//-------------------------------------------------------------------------- +// Pen class +//-------------------------------------------------------------------------- + + TGPPen = class(TGdiplusBase) + protected + nativePen: GpPen; + lastResult: TStatus; + procedure SetNativePen(nativePen: GpPen); + function SetStatus(status: TStatus): TStatus; + constructor Create(nativePen: GpPen; status: TStatus); reintroduce; overload; + public + constructor Create(color: TGPColor; width: Single = 1.0); reintroduce; overload; + constructor Create(brush: TGPBrush; width: Single = 1.0); reintroduce; overload; + destructor Destroy; override; + function Clone: TGPPen; + function SetWidth(width: Single): TStatus; + function GetWidth: Single; + // Set/get line caps: start, end, and dash + // Line cap and join APIs by using LineCap and LineJoin enums. + function SetLineCap(startCap, endCap: TLineCap; dashCap: TDashCap): TStatus; + function SetStartCap(startCap: TLineCap): TStatus; + function SetEndCap(endCap: TLineCap): TStatus; + function SetDashCap(dashCap: TDashCap): TStatus; + function GetStartCap: TLineCap; + function GetEndCap: TLineCap; + function GetDashCap: TDashCap; + function SetLineJoin(lineJoin: TLineJoin): TStatus; + function GetLineJoin: TLineJoin; + function SetCustomStartCap(customCap: TGPCustomLineCap): TStatus; + function GetCustomStartCap(customCap: TGPCustomLineCap): TStatus; + function SetCustomEndCap(customCap: TGPCustomLineCap): TStatus; + function GetCustomEndCap(customCap: TGPCustomLineCap): TStatus; + function SetMiterLimit(miterLimit: Single): TStatus; + function GetMiterLimit: Single; + function SetAlignment(penAlignment: TPenAlignment): TStatus; + function GetAlignment: TPenAlignment; + function SetTransform(matrix: TGPMatrix): TStatus; + function GetTransform(matrix: TGPMatrix): TStatus; + function ResetTransform: TStatus; + function MultiplyTransform(matrix: TGPMatrix; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function TranslateTransform(dx, dy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function ScaleTransform(sx, sy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function RotateTransform(angle: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function GetPenType: TPenType; + function SetColor(color: TGPColor): TStatus; + function SetBrush(brush: TGPBrush): TStatus; + function GetColor(out Color: TGPColor): TStatus; + function GetBrush: TGPBrush; + function GetDashStyle: TDashStyle; + function SetDashStyle(dashStyle: TDashStyle): TStatus; + function GetDashOffset: Single; + function SetDashOffset(dashOffset: Single): TStatus; + function SetDashPattern(dashArray: PSingle; count: Integer): TStatus; + function GetDashPatternCount: Integer; + function GetDashPattern(dashArray: PSingle; count: Integer): TStatus; + function SetCompoundArray(compoundArray: PSingle; count: Integer): TStatus; + function GetCompoundArrayCount: Integer; + function GetCompoundArray(compoundArray: PSingle; count: Integer): TStatus; + function GetLastStatus: TStatus; + end; + +(**************************************************************************\ +* +* GDI+ StringFormat class +* +\**************************************************************************) + + TGPStringFormat = class(TGdiplusBase) + protected + nativeFormat: GpStringFormat; + lastError: TStatus; + function SetStatus(newStatus: GpStatus): TStatus; + procedure Assign(source: TGPStringFormat); + constructor Create(clonedStringFormat: GpStringFormat; status: TStatus); reintroduce; overload; + public + constructor Create(formatFlags: Integer = 0; language: LANGID = LANG_NEUTRAL); reintroduce; overload; + constructor Create(format: TGPStringFormat); reintroduce; overload; + destructor Destroy; override; + class function GenericDefault: TGPStringFormat; + class function GenericTypographic: TGPStringFormat; + function Clone: TGPStringFormat; + function SetFormatFlags(flags: Integer): TStatus; + function GetFormatFlags: Integer; + function SetAlignment(align: TStringAlignment): TStatus; + function GetAlignment: TStringAlignment; + function SetLineAlignment(align: TStringAlignment): TStatus; + function GetLineAlignment: TStringAlignment; + function SetHotkeyPrefix(hotkeyPrefix: THotkeyPrefix): TStatus; + function GetHotkeyPrefix: THotkeyPrefix; + function SetTabStops(firstTabOffset: Single; count: Integer; tabStops: PSingle): TStatus; + function GetTabStopCount: Integer; + function GetTabStops(count: Integer; firstTabOffset, tabStops: PSingle): TStatus; + function SetDigitSubstitution(language: LANGID; substitute: TStringDigitSubstitute): TStatus; + function GetDigitSubstitutionLanguage: LANGID; + function GetDigitSubstitutionMethod: TStringDigitSubstitute; + function SetTrimming(trimming: TStringTrimming): TStatus; + function GetTrimming: TStringTrimming; + function SetMeasurableCharacterRanges(rangeCount: Integer; ranges: PCharacterRange): TStatus; + function GetMeasurableCharacterRangeCount: Integer; + function GetLastStatus: TStatus; + end; + +(**************************************************************************\ +* +* GDI+ Graphics Path class +* +\**************************************************************************) + + TGPGraphicsPath = class(TGdiplusBase) + protected + nativePath: GpPath; + lastResult: TStatus; + procedure SetNativePath(nativePath: GpPath); + function SetStatus(status: TStatus): TStatus; + constructor Create(nativePath: GpPath); reintroduce; overload; + public + constructor Create(path: TGPGraphicsPath); reintroduce; overload; + constructor Create(fillMode: TFillMode = FillModeAlternate); reintroduce; overload; + constructor Create(points: PGPPointF; types: PBYTE; count: Integer; + fillMode: TFillMode = FillModeAlternate); reintroduce; overload; + constructor Create(points: PGPPoint; types: PBYTE; count: Integer; + fillMode: TFillMode = FillModeAlternate); reintroduce; overload; + destructor destroy; override; + function Clone: TGPGraphicsPath; + // Reset the path object to empty (and fill mode to FillModeAlternate) + function Reset: TStatus; + function GetFillMode: TFillMode; + function SetFillMode(fillmode: TFillMode): TStatus; + function GetPathData(pathData: TPathData): TStatus; + function StartFigure: TStatus; + function CloseFigure: TStatus; + function CloseAllFigures: TStatus; + function SetMarker: TStatus; + function ClearMarkers: TStatus; + function Reverse: TStatus; + function GetLastPoint(out lastPoint: TGPPointF): TStatus; + + function AddLine(const pt1, pt2: TGPPointF): TStatus; overload; + function AddLine(x1, y1, x2, y2: Single): TStatus; overload; + function AddLines(points: PGPPointF; count: Integer): TStatus; overload; + function AddLine(const pt1, pt2: TGPPoint): TStatus; overload; + function AddLine(x1, y1, x2, y2: Integer): TStatus; overload; + function AddLines(points: PGPPoint; count: Integer): TStatus; overload; + + function AddArc(rect: TGPRectF; startAngle, sweepAngle: Single): TStatus; overload; + function AddArc(x, y, width, height, startAngle, sweepAngle: Single): TStatus; overload; + function AddArc(rect: TGPRect; startAngle, sweepAngle: Single): TStatus; overload; + function AddArc(x, y, width, height: Integer; startAngle, sweepAngle: Single): TStatus; overload; + + function AddBezier(pt1, pt2, pt3, pt4: TGPPointF): TStatus; overload; + function AddBezier(x1, y1, x2, y2, x3, y3, x4, y4: Single): TStatus; overload; + function AddBeziers(points: PGPPointF; count: Integer): TStatus; overload; + function AddBezier(pt1, pt2, pt3, pt4: TGPPoint): TStatus; overload; + function AddBezier(x1, y1, x2, y2, x3, y3, x4, y4: Integer): TStatus; overload; + function AddBeziers(points: PGPPoint; count: Integer): TStatus; overload; + + function AddCurve(points: PGPPointF; count: Integer): TStatus; overload; + function AddCurve(points: PGPPointF; count: Integer; tension: Single): TStatus; overload; + function AddCurve(points: PGPPointF; count, offset, numberOfSegments: Integer; tension: Single): TStatus; overload; + function AddCurve(points: PGPPoint; count: Integer): TStatus; overload; + function AddCurve(points: PGPPoint; count: Integer; tension: Single): TStatus; overload; + function AddCurve(points: PGPPoint; count, offset, numberOfSegments: Integer; tension: Single): TStatus; overload; + + function AddClosedCurve(points: PGPPointF; count: Integer): TStatus; overload; + function AddClosedCurve(points: PGPPointF; count: Integer; tension: Single): TStatus; overload; + function AddClosedCurve(points: PGPPoint; count: Integer): TStatus; overload; + function AddClosedCurve(points: PGPPoint; count: Integer; tension: Single): TStatus; overload; + + function AddRectangle(rect: TGPRectF): TStatus; overload; + function AddRectangles(rects: PGPRectF; count: Integer): TStatus; overload; + function AddRectangle(rect: TGPRect): TStatus; overload; + function AddRectangles(rects: PGPRect; count: Integer): TStatus; overload; + + function AddEllipse(rect: TGPRectF): TStatus; overload; + function AddEllipse(x, y, width, height: Single): TStatus; overload; + function AddEllipse(rect: TGPRect): TStatus; overload; + function AddEllipse(x, y, width, height: Integer): TStatus; overload; + + function AddPie(rect: TGPRectF; startAngle, sweepAngle: Single): TStatus; overload; + function AddPie(x, y, width, height, startAngle, sweepAngle: Single): TStatus; overload; + function AddPie(rect: TGPRect; startAngle, sweepAngle: Single): TStatus; overload; + function AddPie(x, y, width, height: Integer; startAngle, sweepAngle: Single): TStatus; overload; + + function AddPolygon(points: PGPPointF; count: Integer): TStatus; overload; + function AddPolygon(points: PGPPoint; count: Integer): TStatus; overload; + + function AddPath(addingPath: TGPGraphicsPath; connect: Bool): TStatus; + + function AddString(string_: WideString; length: Integer; family : TGPFontFamily; + style : Integer; emSize : Single; origin : TGPPointF; format : TGPStringFormat): TStatus; overload; + function AddString(string_: WideString; length : Integer; family : TGPFontFamily; + style : Integer; emSize : Single; layoutRect: TGPRectF; format : TGPStringFormat): TStatus; overload; + function AddString(string_: WideString; length : Integer; family : TGPFontFamily; + style : Integer; emSize : Single; origin : TGPPoint; format : TGPStringFormat): TStatus; overload; + function AddString(string_: WideString; length : Integer; family : TGPFontFamily; + style : Integer; emSize : Single; layoutRect: TGPRect; format : TGPStringFormat): TStatus; overload; + + function Transform(matrix: TGPMatrix): TStatus; + + // This is not always the tightest bounds. + function GetBounds(out bounds: TGPRectF; matrix: TGPMatrix = nil; pen: TGPPen = nil): TStatus; overload; + function GetBounds(out bounds: TGPRect; matrix: TGPMatrix = nil; pen: TGPPen = nil): TStatus; overload; + // Once flattened, the resultant path is made of line segments and + // the original path information is lost. When matrix is NULL the + // identity matrix is assumed. + function Flatten(matrix: TGPMatrix = nil; flatness: Single = FlatnessDefault): TStatus; + function Widen(pen: TGPPen; matrix: TGPMatrix = nil; flatness: Single = FlatnessDefault): TStatus; + function Outline(matrix: TGPMatrix = nil; flatness: Single = FlatnessDefault): TStatus; + // Once this is called, the resultant path is made of line segments and + // the original path information is lost. When matrix is NULL, the + // identity matrix is assumed. + function Warp(destPoints: PGPPointF; count: Integer; srcRect: TGPRectF; + matrix: TGPMatrix = nil; warpMode: TWarpMode = WarpModePerspective; + flatness: Single = FlatnessDefault): TStatus; + function GetPointCount: Integer; + function GetPathTypes(types: PBYTE; count: Integer): TStatus; + function GetPathPoints(points: PGPPointF; count: Integer): TStatus; overload; + function GetPathPoints(points: PGPPoint; count: Integer): TStatus; overload; + function GetLastStatus: TStatus; + + function IsVisible(point: TGPPointF; g: TGPGraphics = nil): BOOL; overload; + function IsVisible(x, y: Single; g: TGPGraphics = nil): BOOL; overload; + function IsVisible(point: TGPPoint; g : TGPGraphics = nil): BOOL; overload; + function IsVisible(x, y: Integer; g: TGPGraphics = nil): BOOL; overload; + + function IsOutlineVisible(point: TGPPointF; pen: TGPPen; g: TGPGraphics = nil): BOOL; overload; + function IsOutlineVisible(x, y: Single; pen: TGPPen; g: TGPGraphics = nil): BOOL; overload; + function IsOutlineVisible(point: TGPPoint; pen: TGPPen; g: TGPGraphics = nil): BOOL; overload; + function IsOutlineVisible(x, y: Integer; pen: TGPPen; g: TGPGraphics = nil): BOOL; overload; + end; + +//-------------------------------------------------------------------------- +// GraphisPathIterator class +//-------------------------------------------------------------------------- + + TGPGraphicsPathIterator = class(TGdiplusBase) + protected + nativeIterator: GpPathIterator; + lastResult : TStatus; + procedure SetNativeIterator(nativeIterator: GpPathIterator); + function SetStatus(status: TStatus): TStatus; + public + constructor Create(path: TGPGraphicsPath); reintroduce; + destructor Destroy; override; + function NextSubpath(out startIndex, endIndex: Integer; out isClosed: bool): Integer; overload; + function NextSubpath(path: TGPGraphicsPath; out isClosed: BOOL): Integer; overload; + function NextPathType(out pathType: TPathPointType; out startIndex, endIndex: Integer): Integer; + function NextMarker(out startIndex, endIndex: Integer): Integer; overload; + function NextMarker(path: TGPGraphicsPath): Integer; overload; + function GetCount: Integer; + function GetSubpathCount: Integer; + function HasCurve: BOOL; + procedure Rewind; + function Enumerate(points: PGPPointF; types: PBYTE; count: Integer): Integer; + function CopyData(points: PGPPointF; types: PBYTE; startIndex, endIndex: Integer): Integer; + function GetLastStatus: TStatus; + end; + +//-------------------------------------------------------------------------- +// Path Gradient Brush +//-------------------------------------------------------------------------- + + TGPPathGradientBrush = class(TGPBrush) + public + constructor Create(points: PGPPointF; count: Integer; + wrapMode: TWrapMode = WrapModeClamp); reintroduce; overload; + constructor Create(points: PGPPoint; count: Integer; + wrapMode: TWrapMode = WrapModeClamp); reintroduce; overload; + constructor Create(path: TGPGraphicsPath); reintroduce; overload; + constructor Create; reintroduce; overload; + function GetCenterColor(out Color: TGPColor): TStatus; + function SetCenterColor(color: TGPColor): TStatus; + function GetPointCount: Integer; + function GetSurroundColorCount: Integer; + function GetSurroundColors(colors: PARGB; var count: Integer): TStatus; + function SetSurroundColors(colors: PARGB; var count: Integer): TStatus; + function GetGraphicsPath(path: TGPGraphicsPath): TStatus; + function SetGraphicsPath(path: TGPGraphicsPath): TStatus; + function GetCenterPoint(out point: TGPPointF): TStatus; overload; + function GetCenterPoint(out point: TGPPoint): TStatus; overload; + function SetCenterPoint(point: TGPPointF): TStatus; overload; + function SetCenterPoint(point: TGPPoint): TStatus; overload; + function GetRectangle(out rect: TGPRectF): TStatus; overload; + function GetRectangle(out rect: TGPRect): TStatus; overload; + function SetGammaCorrection(useGammaCorrection: BOOL): TStatus; overload; + function GetGammaCorrection: BOOL; overload; + function GetBlendCount: Integer; + function GetBlend(blendFactors, blendPositions: PSingle; count: Integer): TStatus; + function SetBlend(blendFactors, blendPositions: PSingle; count: Integer): TStatus; + function GetInterpolationColorCount: Integer; + function SetInterpolationColors(presetColors: PARGB; blendPositions: PSingle; + count: Integer): TStatus; + function GetInterpolationColors(presetColors: PARGB; + blendPositions: PSingle; count: Integer): TStatus; + function SetBlendBellShape(focus: Single; scale: Single = 1.0): TStatus; + function SetBlendTriangularShape(focus: Single; scale: Single = 1.0): TStatus; + function GetTransform(matrix: TGPMatrix): TStatus; + function SetTransform(matrix: TGPMatrix): TStatus; + function ResetTransform: TStatus; + function MultiplyTransform(matrix: TGPMatrix; + order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function TranslateTransform(dx, dy: Single; + order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function ScaleTransform(sx, sy: Single; + order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function RotateTransform(angle: Single; + order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function GetFocusScales(out xScale, yScale: Single): TStatus; + function SetFocusScales(xScale, yScale: Single): TStatus; + function GetWrapMode: TWrapMode; + function SetWrapMode(wrapMode: TWrapMode): TStatus; + end; + +(**************************************************************************\ +* +* GDI+ Graphics Object +* +\**************************************************************************) + + TGPGraphics = class(TGdiplusBase) + protected + nativeGraphics: GpGraphics; + lastResult: TStatus; + procedure SetNativeGraphics(graphics: GpGraphics); + function SetStatus(status: TStatus): TStatus; + function GetNativeGraphics: GpGraphics; + function GetNativePen(pen: TGPPen): GpPen; + constructor Create(graphics: GpGraphics); reintroduce; overload; + public + function FromHDC(hdc: HDC): TGPGraphics; overload; + function FromHDC(hdc: HDC; hdevice: THANDLE): TGPGraphics; overload; + function FromHWND(hwnd: HWND; icm: BOOL = FALSE): TGPGraphics; + function FromImage(image: TGPImage): TGPGraphics; + constructor Create(hdc: HDC); reintroduce; overload; + constructor Create(hdc: HDC; hdevice: THANDLE); reintroduce; overload; + constructor Create(hwnd: HWND; icm: BOOL{ = FALSE}); reintroduce; overload; + constructor Create(image: TGPImage); reintroduce; overload; + destructor destroy; override; + procedure Flush(intention: TFlushIntention = FlushIntentionFlush); + //------------------------------------------------------------------------ + // GDI Interop methods + //------------------------------------------------------------------------ + // Locks the graphics until ReleaseDC is called + function GetHDC: HDC; + procedure ReleaseHDC(hdc: HDC); + //------------------------------------------------------------------------ + // Rendering modes + //------------------------------------------------------------------------ + function SetRenderingOrigin(x, y: Integer): TStatus; + function GetRenderingOrigin(out x, y: Integer): TStatus; + function SetCompositingMode(compositingMode: TCompositingMode): TStatus; + function GetCompositingMode: TCompositingMode; + function SetCompositingQuality(compositingQuality: TCompositingQuality): TStatus; + function GetCompositingQuality: TCompositingQuality; + function SetTextRenderingHint(newMode: TTextRenderingHint): TStatus; + function GetTextRenderingHint: TTextRenderingHint; + function SetTextContrast(contrast: UINT): TStatus; // 0..12 + function GetTextContrast: UINT; + function GetInterpolationMode: TInterpolationMode; + function SetInterpolationMode(interpolationMode: TInterpolationMode): TStatus; + function GetSmoothingMode: TSmoothingMode; + function SetSmoothingMode(smoothingMode: TSmoothingMode): TStatus; + function GetPixelOffsetMode: TPixelOffsetMode; + function SetPixelOffsetMode(pixelOffsetMode: TPixelOffsetMode): TStatus; + //------------------------------------------------------------------------ + // Manipulate current world transform + //------------------------------------------------------------------------ + function SetTransform(matrix: TGPMatrix): TStatus; + function ResetTransform: TStatus; + function MultiplyTransform(matrix: TGPMatrix; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function TranslateTransform(dx, dy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function ScaleTransform(sx, sy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function RotateTransform(angle: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + function GetTransform(matrix: TGPMatrix): TStatus; + function SetPageUnit(unit_: TUnit): TStatus; + function SetPageScale(scale: Single): TStatus; + function GetPageUnit: TUnit; + function GetPageScale: Single; + function GetDpiX: Single; + function GetDpiY: Single; + function TransformPoints(destSpace: TCoordinateSpace; srcSpace: TCoordinateSpace; + pts: PGPPointF; count: Integer): TStatus; overload; + function TransformPoints(destSpace: TCoordinateSpace; srcSpace: TCoordinateSpace; + pts: PGPPoint; count: Integer): TStatus; overload; + //------------------------------------------------------------------------ + // GetNearestColor (for <= 8bpp surfaces). Note: Alpha is ignored. + //------------------------------------------------------------------------ + function GetNearestColor(var color: TGPColor): TStatus; + + // DrawLine(s) + function DrawLine(pen: TGPPen; x1, y1, x2, y2: Single): TStatus; overload; + function DrawLine(pen: TGPPen; const pt1, pt2: TGPPointF): TStatus; overload; + function DrawLines(pen: TGPPen; points: PGPPointF; count: Integer): TStatus; overload; + function DrawLine(pen: TGPPen; x1, y1, x2, y2: Integer): TStatus; overload; + function DrawLine(pen: TGPPen; const pt1, pt2: TGPPoint): TStatus; overload; + function DrawLines(pen: TGPPen; points: PGPPoint; count: Integer): TStatus; overload; + + // DrawArc + function DrawArc(pen: TGPPen; x, y, width, height, startAngle, sweepAngle: Single): TStatus; overload; + function DrawArc(pen: TGPPen; const rect: TGPRectF; startAngle, sweepAngle: Single): TStatus; overload; + function DrawArc(pen: TGPPen; x, y, width, height: Integer; startAngle, sweepAngle: Single): TStatus; overload; + function DrawArc(pen: TGPPen; const rect: TGPRect; startAngle, sweepAngle: Single): TStatus; overload; + + // DrawBezier(s) + function DrawBezier(pen: TGPPen; x1, y1, x2, y2, x3, y3, x4, y4: Single): TStatus; overload; + function DrawBezier(pen: TGPPen; const pt1, pt2, pt3, pt4: TGPPointF): TStatus; overload; + function DrawBeziers(pen: TGPPen; points: PGPPointF; count: Integer): TStatus; overload; + function DrawBezier(pen: TGPPen; x1, y1, x2, y2, x3, y3, x4, y4: Integer): TStatus; overload; + function DrawBezier(pen: TGPPen; const pt1, pt2, pt3, pt4: TGPPoint): TStatus; overload; + function DrawBeziers(pen: TGPPen; points: PGPPoint; count: Integer): TStatus; overload; + + // DrawRectangle(s) + function DrawRectangle(pen: TGPPen; const rect: TGPRectF): TStatus; overload; + function DrawRectangle(pen: TGPPen; x, y, width, height: Single): TStatus; overload; + function DrawRectangles(pen: TGPPen; rects: PGPRectF; count: Integer): TStatus; overload; + function DrawRectangle(pen: TGPPen; const rect: TGPRect): TStatus; overload; + function DrawRectangle(pen: TGPPen; x, y, width, height: Integer): TStatus; overload; + function DrawRectangles(pen: TGPPen; rects: PGPRect; count: Integer): TStatus; overload; + + // DrawEllipse + function DrawEllipse(pen: TGPPen; const rect: TGPRectF): TStatus; overload; + function DrawEllipse(pen: TGPPen; x, y, width, height: Single): TStatus; overload; + function DrawEllipse(pen: TGPPen; const rect: TGPRect): TStatus; overload; + function DrawEllipse(pen: TGPPen; x, y, width, height: Integer): TStatus; overload; + + // DrawPie + function DrawPie(pen: TGPPen; const rect: TGPRectF; startAngle, sweepAngle: Single): TStatus; overload; + function DrawPie(pen: TGPPen; x, y, width, height, startAngle, sweepAngle: Single): TStatus; overload; + function DrawPie(pen: TGPPen; const rect: TGPRect; startAngle, sweepAngle: Single): TStatus; overload; + function DrawPie(pen: TGPPen; x, y, width, height: Integer; startAngle, sweepAngle: Single): TStatus; overload; + + // DrawPolygon + function DrawPolygon(pen: TGPPen; points: PGPPointF; count: Integer): TStatus; overload; + function DrawPolygon(pen: TGPPen; points: PGPPoint; count: Integer): TStatus; overload; + + // DrawPath + function DrawPath(pen: TGPPen; path: TGPGraphicsPath): TStatus; + + // DrawCurve + function DrawCurve(pen: TGPPen; points: PGPPointF; count: Integer): TStatus; overload; + function DrawCurve(pen: TGPPen; points: PGPPointF; count: Integer; tension: Single): TStatus; overload; + function DrawCurve(pen: TGPPen; points: PGPPointF; count, offset, + numberOfSegments: Integer; tension: Single = 0.5): TStatus; overload; + function DrawCurve(pen: TGPPen; points: PGPPoint; count: Integer): TStatus; overload; + function DrawCurve(pen: TGPPen; points: PGPPoint; count: Integer; tension: Single): TStatus; overload; + function DrawCurve(pen: TGPPen; points: PGPPoint; count, offset, numberOfSegments: Integer; + tension: Single = 0.5): TStatus; overload; + + // DrawClosedCurve + function DrawClosedCurve(pen: TGPPen; points: PGPPointF; count: Integer): TStatus; overload; + function DrawClosedCurve(pen: TGPPen; points: PGPPointF; count: Integer; tension: Single): TStatus; overload; + function DrawClosedCurve(pen: TGPPen; points: PGPPoint; count: Integer): TStatus; overload; + function DrawClosedCurve(pen: TGPPen; points: PGPPoint; count: Integer; tension: Single): TStatus; overload; + + // Clear + function Clear(color: TGPColor): TStatus; + + // FillRectangle(s) + function FillRectangle(brush: TGPBrush; const rect: TGPRectF): TStatus; overload; + function FillRectangle(brush: TGPBrush; x, y, width, height: Single): TStatus; overload; + function FillRectangles(brush: TGPBrush; rects: PGPRectF; count: Integer): TStatus; overload; + function FillRectangle(brush: TGPBrush; const rect: TGPRect): TStatus; overload; + function FillRectangle(brush: TGPBrush; x, y, width, height: Integer): TStatus; overload; + function FillRectangles(brush: TGPBrush; rects: PGPRect; count: Integer): TStatus; overload; + + // FillPolygon + function FillPolygon(brush: TGPBrush; points: PGPPointF; count: Integer): TStatus; overload; + function FillPolygon(brush: TGPBrush; points: PGPPointF; count: Integer; fillMode: TFillMode): TStatus; overload; + function FillPolygon(brush: TGPBrush; points: PGPPoint; count: Integer): TStatus; overload; + function FillPolygon(brush: TGPBrush; points: PGPPoint; count: Integer; fillMode: TFillMode): TStatus; overload; + + // FillEllipse + function FillEllipse(brush: TGPBrush; const rect: TGPRectF): TStatus; overload; + function FillEllipse(brush: TGPBrush; x, y, width, height: Single): TStatus; overload; + function FillEllipse(brush: TGPBrush; const rect: TGPRect): TStatus; overload; + function FillEllipse(brush: TGPBrush; x, y, width, height: Integer): TStatus; overload; + + // FillPie + function FillPie(brush: TGPBrush; const rect: TGPRectF; startAngle, sweepAngle: Single): TStatus; overload; + function FillPie(brush: TGPBrush; x, y, width, height, startAngle, sweepAngle: Single): TStatus; overload; + function FillPie(brush: TGPBrush; const rect: TGPRect; startAngle, sweepAngle: Single): TStatus; overload; + function FillPie(brush: TGPBrush; x, y, width, height: Integer; startAngle, sweepAngle: Single): TStatus; overload; + + // FillPath + function FillPath(brush: TGPBrush; path: TGPGraphicsPath): TStatus; + + // FillClosedCurve + function FillClosedCurve(brush: TGPBrush; points: PGPPointF; count: Integer): TStatus; overload; + function FillClosedCurve(brush: TGPBrush; points: PGPPointF; count: Integer; + fillMode: TFillMode; tension: Single = 0.5 ): TStatus; overload; + function FillClosedCurve(brush: TGPBrush; points: PGPPoint; count: Integer): TStatus; overload; + function FillClosedCurve(brush: TGPBrush; points: PGPPoint; count: Integer; + fillMode: TFillMode; tension: Single = 0.5): TStatus; overload; + + // FillRegion + function FillRegion(brush: TGPBrush; region: TGPRegion): TStatus; + + // DrawString + function DrawString(string_: WideString; length: Integer; font: TGPFont; + const layoutRect: TGPRectF; stringFormat: TGPStringFormat; brush: TGPBrush): TStatus; overload; + function DrawString(string_: WideString; length: Integer; font: TGPFont; + const origin: TGPPointF; brush: TGPBrush): TStatus; overload; + function DrawString(string_: WideString; length: Integer; font: TGPFont; + const origin: TGPPointF; stringFormat: TGPStringFormat; brush: TGPBrush): TStatus; overload; + + // MeasureString + function MeasureString(string_: WideString; length: Integer; font: TGPFont; + const layoutRect: TGPRectF; stringFormat: TGPStringFormat; out boundingBox: TGPRectF; + codepointsFitted: PInteger = nil; linesFilled: PInteger = nil): TStatus; overload; + function MeasureString(string_: WideString; length: Integer; font: TGPFont; + const layoutRectSize: TGPSizeF; stringFormat: TGPStringFormat; out size: TGPSizeF; + codepointsFitted: PInteger = nil; linesFilled: PInteger = nil): TStatus; overload; + function MeasureString(string_: WideString ; length: Integer; font: TGPFont; + const origin: TGPPointF; stringFormat: TGPStringFormat; + out boundingBox: TGPRectF): TStatus; overload; + function MeasureString(string_: WideString; length: Integer; font: TGPFont; + const layoutRect: TGPRectF; out boundingBox: TGPRectF): TStatus; overload; + function MeasureString(string_: WideString; length: Integer; font: TGPFont; + const origin: TGPPointF; out boundingBox: TGPRectF): TStatus; overload; + + // MeasureCharacterRanges + function MeasureCharacterRanges(string_: WideString; length: Integer; font: TGPFont; + const layoutRect: TGPRectF; stringFormat: TGPStringFormat; regionCount: Integer; + const regions: array of TGPRegion): TStatus; overload; + + // DrawDriverString + function DrawDriverString(text: PUINT16; length: Integer; font: TGPFont; + brush: TGPBrush; positions: PGPPointF; flags: Integer; matrix: TGPMatrix): TStatus; + + // MeasureDriverString + function MeasureDriverString(text: PUINT16; length: Integer; font: TGPFont; + positions: PGPPointF; flags: Integer; matrix: TGPMatrix; + out boundingBox: TGPRectF): TStatus; + + // Draw a cached bitmap on this graphics destination offset by + // x, y. Note this will fail with WrongState if the CachedBitmap + // native format differs from this Graphics. + function DrawCachedBitmap(cb: TGPCachedBitmap; x, y: Integer): TStatus; + function DrawImage(image: TGPImage; const point: TGPPointF): TStatus; overload; + function DrawImage(image: TGPImage; x, y: Single): TStatus; overload; + function DrawImage(image: TGPImage; const rect: TGPRectF): TStatus; overload; + function DrawImage(image: TGPImage; x, y, width, height: Single): TStatus; overload; + function DrawImage(image: TGPImage; const point: TGPPoint): TStatus; overload; + function DrawImage(image: TGPImage; x, y: Integer): TStatus; overload; + function DrawImage(image: TGPImage; const rect: TGPRect): TStatus; overload; + function DrawImage(image: TGPImage; x, y, width, height: Integer): TStatus; overload; + + // Affine Draw Image + // destPoints.length = 3: rect => parallelogram + // destPoints[0] <=> top-left corner of the source rectangle + // destPoints[1] <=> top-right corner + // destPoints[2] <=> bottom-left corner + // destPoints.length = 4: rect => quad + // destPoints[3] <=> bottom-right corner + function DrawImage(image: TGPImage; destPoints: PGPPointF; count: Integer): TStatus; overload; + function DrawImage(image: TGPImage; destPoints: PGPPoint; count: Integer): TStatus; overload; + function DrawImage(image: TGPImage; x, y, srcx, srcy, srcwidth, srcheight: Single; srcUnit: TUnit): TStatus; overload; + function DrawImage(image: TGPImage; const destRect: TGPRectF; srcx, srcy, + srcwidth, srcheight: Single; srcUnit: TUnit; + imageAttributes: TGPImageAttributes = nil; callback: DrawImageAbort = nil; + callbackData: Pointer = nil): TStatus; overload; + function DrawImage(image: TGPImage; destPoints: PGPPointF; count: Integer; + srcx, srcy, srcwidth, srcheight: Single; srcUnit: TUnit; + imageAttributes: TGPImageAttributes = nil; callback: DrawImageAbort = nil; + callbackData: Pointer = nil): TStatus; overload; + function DrawImage(image: TGPImage; x, y, srcx, srcy, srcwidth, + srcheight: Integer; srcUnit: TUnit): TStatus; overload; + function DrawImage(image: TGPImage; const destRect: TGPRect; srcx, srcy, + srcwidth, srcheight: Integer; srcUnit: TUnit; + imageAttributes: TGPImageAttributes = nil; callback: DrawImageAbort = nil; + callbackData: Pointer = nil): TStatus; overload; + function DrawImage(image: TGPImage; destPoints: PGPPoint; + count, srcx, srcy, srcwidth, srcheight: Integer; srcUnit: TUnit; + imageAttributes: TGPImageAttributes = nil; callback: DrawImageAbort = nil; + callbackData: Pointer = nil): TStatus; overload; + + // The following methods are for playing an EMF+ to a graphics + // via the enumeration interface. Each record of the EMF+ is + // sent to the callback (along with the callbackData). Then + // the callback can invoke the Metafile::PlayRecord method + // to play the particular record. + function EnumerateMetafile(metafile: TGPMetafile; const destPoint: TGPPointF; + callback: EnumerateMetafileProc; callbackData: Pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; overload; + function EnumerateMetafile(metafile: TGPMetafile; const destPoint: TGPPoint; + callback: EnumerateMetafileProc; callbackData: pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; overload; + function EnumerateMetafile(metafile: TGPMetafile; const destRect: TGPRectF; + callback: EnumerateMetafileProc; callbackData: Pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; overload; + function EnumerateMetafile(metafile: TGPMetafile; const destRect: TGPRect; + callback: EnumerateMetafileProc; callbackData: Pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; overload; + function EnumerateMetafile(metafile: TGPMetafile; destPoints: PGPPointF; + count: Integer; callback: EnumerateMetafileProc; callbackData: Pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; overload; + function EnumerateMetafile(metafile: TGPMetafile; destPoints: PGPPoint; + count: Integer; callback: EnumerateMetafileProc; callbackData: Pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; overload; + function EnumerateMetafile(metafile: TGPMetafile; const destPoint: TGPPointF; + const srcRect: TGPRectF; srcUnit: TUnit; callback: EnumerateMetafileProc; + callbackData: pointer = nil; imageAttributes: TGPImageAttributes = nil + ): TStatus; overload; + function EnumerateMetafile(metafile : TGPMetafile; const destPoint : TGPPoint; + const srcRect : TGPRect; srcUnit : TUnit; callback : EnumerateMetafileProc; + callbackData : Pointer = nil; imageAttributes : TGPImageAttributes = nil + ): TStatus; overload; + function EnumerateMetafile(metafile: TGPMetafile; const destRect: TGPRectF; + const srcRect: TGPRectF; srcUnit: TUnit; callback: EnumerateMetafileProc; + callbackData: Pointer = nil; imageAttributes: TGPImageAttributes = nil): TStatus; overload; + function EnumerateMetafile(metafile : TGPMetafile; const destRect, srcRect: TGPRect; + srcUnit : TUnit; callback : EnumerateMetafileProc; callbackData : Pointer = nil; + imageAttributes : TGPImageAttributes = nil): TStatus; overload; + function EnumerateMetafile( metafile: TGPMetafile; destPoints: PGPPointF; + count: Integer; const srcRect: TGPRectF; srcUnit: TUnit; callback: EnumerateMetafileProc; + callbackData: Pointer = nil; imageAttributes: TGPImageAttributes = nil): TStatus; overload; + function EnumerateMetafile(metafile: TGPMetafile; destPoints: PGPPoint; + count: Integer; const srcRect: TGPRect; srcUnit: TUnit; callback: EnumerateMetafileProc; + callbackData: Pointer = nil; imageAttributes: TGPImageAttributes = nil): TStatus; overload; + + // SetClip + function SetClip(g: TGPGraphics; combineMode: TCombineMode = CombineModeReplace): TStatus; overload; + function SetClip(rect: TGPRectF; combineMode: TCombineMode = CombineModeReplace): TStatus; overload; + function SetClip(rect: TGPRect; combineMode: TCombineMode = CombineModeReplace): TStatus; overload; + function SetClip(path: TGPGraphicsPath; combineMode: TCombineMode = CombineModeReplace): TStatus; overload; + function SetClip(region: TGPRegion; combineMode: TCombineMode = CombineModeReplace): TStatus; overload; + // This is different than the other SetClip methods because it assumes + // that the HRGN is already in device units, so it doesn't transform + // the coordinates in the HRGN. + function SetClip(hRgn: HRGN; combineMode: TCombineMode = CombineModeReplace): TStatus; overload; + + // IntersectClip + function IntersectClip(const rect: TGPRectF): TStatus; overload; + function IntersectClip(const rect: TGPRect): TStatus; overload; + function IntersectClip(region: TGPRegion): TStatus; overload; + // ExcludeClip + function ExcludeClip(const rect: TGPRectF): TStatus; overload; + function ExcludeClip(const rect: TGPRect): TStatus; overload; + function ExcludeClip(region: TGPRegion): TStatus; overload; + + function ResetClip: TStatus; + + function TranslateClip(dx, dy: Single): TStatus; overload; + function TranslateClip(dx, dy: Integer): TStatus; overload; + + function GetClip(region: TGPRegion): TStatus; + + function GetClipBounds(out rect: TGPRectF): TStatus; overload; + function GetClipBounds(out rect: TGPRect): TStatus; overload; + + function IsClipEmpty: Bool; + + function GetVisibleClipBounds(out rect: TGPRectF): TStatus; overload; + function GetVisibleClipBounds(out rect: TGPRect): TStatus; overload; + + function IsVisibleClipEmpty: BOOL; + + function IsVisible(x, y: Integer): BOOL; overload; + function IsVisible(const point: TGPPoint): BOOL; overload; + function IsVisible(x, y, width, height: Integer): BOOL; overload; + function IsVisible(const rect: TGPRect): BOOL; overload; + function IsVisible(x, y: Single): BOOL; overload; + function IsVisible(const point: TGPPointF): BOOL; overload; + function IsVisible(x, y, width, height: Single): BOOL; overload; + function IsVisible(const rect: TGPRectF): BOOL; overload; + + function Save: GraphicsState; + function Restore(gstate: GraphicsState): TStatus; + + function BeginContainer(const dstrect,srcrect: TGPRectF; unit_: TUnit): GraphicsContainer; overload; + function BeginContainer(const dstrect, srcrect: TGPRect; unit_: TUnit): GraphicsContainer; overload; + function BeginContainer: GraphicsContainer; overload; + function EndContainer(state: GraphicsContainer): TStatus; + + // Only valid when recording metafiles. + function AddMetafileComment(data: PBYTE; sizeData: UINT): TStatus; + + function GetHalftonePalette: HPALETTE; + function GetLastStatus: TStatus; + end; + + +(**************************************************************************\ +* +* GDI+ CustomLineCap APIs +* +\**************************************************************************) + + TGPAdjustableArrowCap = class(TGPCustomLineCap) + public + constructor Create(height, width: Single; isFilled: Bool = TRUE); + function SetHeight(height: Single): TStatus; + function GetHeight: Single; + function SetWidth(width: Single): TStatus; + function GetWidth: Single; + function SetMiddleInset(middleInset: Single): TStatus; + function GetMiddleInset: Single; + function SetFillState(isFilled: Bool): TStatus; + function IsFilled: BOOL; + end; + +(**************************************************************************\ +* +* GDI+ Metafile class +* +\**************************************************************************) + + TGPMetafile = class(TGPImage) + public + // Playback a metafile from a HMETAFILE + // If deleteWmf is TRUE, then when the metafile is deleted, + // the hWmf will also be deleted. Otherwise, it won't be. + constructor Create(hWmf: HMETAFILE; var wmfPlaceableFileHeader: TWmfPlaceableFileHeader; + deleteWmf: BOOL = FALSE); overload; + // Playback a metafile from a HENHMETAFILE + // If deleteEmf is TRUE, then when the metafile is deleted, + // the hEmf will also be deleted. Otherwise, it won't be. + constructor Create(hEmf: HENHMETAFILE; deleteEmf: BOOL = FALSE); overload; + constructor Create(filename: WideString); overload; + // Playback a WMF metafile from a file. + constructor Create(filename: WideString; var wmfPlaceableFileHeader: TWmfPlaceableFileHeader); overload; + constructor Create(stream: IStream); overload; + // Record a metafile to memory. + constructor Create(referenceHdc: HDC; type_: TEmfType = EmfTypeEmfPlusDual; + description: PWCHAR = nil); overload; + // Record a metafile to memory. + constructor Create(referenceHdc: HDC; frameRect: TGPRectF; + frameUnit: TMetafileFrameUnit = MetafileFrameUnitGdi; + type_: TEmfType = EmfTypeEmfPlusDual; description: PWCHAR = nil); overload; + // Record a metafile to memory. + constructor Create(referenceHdc: HDC; frameRect: TGPRect; + frameUnit: TMetafileFrameUnit = MetafileFrameUnitGdi; + type_: TEmfType = EmfTypeEmfPlusDual; description: PWCHAR = nil); overload; + constructor Create(fileName: WideString;referenceHdc: HDC; + type_: TEmfType = EmfTypeEmfPlusDual; description: PWCHAR = nil); overload; + constructor Create(fileName: WideString; referenceHdc: HDC; frameRect: TGPRectF; + frameUnit: TMetafileFrameUnit = MetafileFrameUnitGdi; + type_: TEmfType = EmfTypeEmfPlusDual; description: PWCHAR = nil); overload; + constructor Create( fileName: WideString; referenceHdc: HDC; frameRect: TGPRect; + frameUnit: TMetafileFrameUnit = MetafileFrameUnitGdi; + type_: TEmfType = EmfTypeEmfPlusDual; description: PWCHAR = nil); overload; + constructor Create(stream: IStream; referenceHdc: HDC; + type_: TEmfType = EmfTypeEmfPlusDual; description: PWCHAR = nil); overload; + constructor Create(stream: IStream; referenceHdc: HDC; frameRect: TGPRectF; + frameUnit: TMetafileFrameUnit = MetafileFrameUnitGdi; + type_: TEmfType = EmfTypeEmfPlusDual; description: PWCHAR = nil); overload; + constructor Create(stream : IStream; referenceHdc : HDC; frameRect : TGPRect; + frameUnit : TMetafileFrameUnit = MetafileFrameUnitGdi; + type_ : TEmfType = EmfTypeEmfPlusDual; description : PWCHAR = nil); overload; + constructor Create; reintroduce; overload; + function GetMetafileHeader(hWmf: HMETAFILE; var wmfPlaceableFileHeader: TWmfPlaceableFileHeader; + header: TMetafileHeader): TStatus; overload; + function GetMetafileHeader(hEmf: HENHMETAFILE; header: TMetafileHeader): TStatus; overload; // ok + function GetMetafileHeader(filename: WideString; header: TMetafileHeader): TStatus; overload; // ok + function GetMetafileHeader(stream: IStream; header: TMetafileHeader): TStatus; overload; // ok + function GetMetafileHeader(header: TMetafileHeader): TStatus; overload; // ok + // Once this method is called, the Metafile object is in an invalid state + // and can no longer be used. It is the responsiblity of the caller to + // invoke DeleteEnhMetaFile to delete this hEmf. // ok + function GetHENHMETAFILE: HENHMETAFILE; + // Used in conjuction with Graphics::EnumerateMetafile to play an EMF+ + // The data must be DWORD aligned if it's an EMF or EMF+. It must be + // WORD aligned if it's a WMF. + function PlayRecord(recordType: TEmfPlusRecordType; flags, dataSize: UINT; data: PBYTE): TStatus; + // If you're using a printer HDC for the metafile, but you want the + // metafile rasterized at screen resolution, then use this API to set + // the rasterization dpi of the metafile to the screen resolution, + // e.g. 96 dpi or 120 dpi. + function SetDownLevelRasterizationLimit(metafileRasterizationLimitDpi: UINT): TStatus; + function GetDownLevelRasterizationLimit: UINT; + function EmfToWmfBits(hemf: HENHMETAFILE; cbData16: UINT; pData16: PBYTE; + iMapMode: Integer = MM_ANISOTROPIC; eFlags: TEmfToWmfBitsFlags = EmfToWmfBitsFlagsDefault): UINT; + end; + +//////////////////////////////////////////////////////////////////////////////// + +var + GenericSansSerifFontFamily : TGPFontFamily = nil; + GenericSerifFontFamily : TGPFontFamily = nil; + GenericMonospaceFontFamily : TGPFontFamily = nil; + + GenericTypographicStringFormatBuffer: TGPStringFormat = nil; + GenericDefaultStringFormatBuffer : TGPStringFormat = nil; + + StartupInput: TGDIPlusStartupInput; + gdiplusToken: ULONG; + +//////////////////////////////////////////////////////////////////////////////// + +implementation + +(**************************************************************************\ +* +* Image Attributes +* +* Abstract: +* +* GDI+ Image Attributes used with Graphics.DrawImage +* +* There are 5 possible sets of color adjustments: +* ColorAdjustDefault, +* ColorAdjustBitmap, +* ColorAdjustBrush, +* ColorAdjustPen, +* ColorAdjustText, +* +* Bitmaps, Brushes, Pens, and Text will all use any color adjustments +* that have been set into the default ImageAttributes until their own +* color adjustments have been set. So as soon as any "Set" method is +* called for Bitmaps, Brushes, Pens, or Text, then they start from +* scratch with only the color adjustments that have been set for them. +* Calling Reset removes any individual color adjustments for a type +* and makes it revert back to using all the default color adjustments +* (if any). The SetToIdentity method is a way to force a type to +* have no color adjustments at all, regardless of what previous adjustments +* have been set for the defaults or for that type. +* +\********************************************************************F******) + + constructor TGPImageAttributes.Create; + begin + nativeImageAttr := nil; + lastResult := GdipCreateImageAttributes(nativeImageAttr); + end; + + destructor TGPImageAttributes.Destroy; + begin + GdipDisposeImageAttributes(nativeImageAttr); + inherited Destroy; + end; + + function TGPImageAttributes.Clone: TGPImageAttributes; + var clone: GpImageAttributes; + begin + SetStatus(GdipCloneImageAttributes(nativeImageAttr, clone)); + result := TGPImageAttributes.Create(clone, lastResult); + end; + + function TGPImageAttributes.SetToIdentity(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesToIdentity(nativeImageAttr, type_)); + end; + + function TGPImageAttributes.Reset(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipResetImageAttributes(nativeImageAttr, type_)); + end; + + function TGPImageAttributes.SetColorMatrix(const colorMatrix: TColorMatrix; + mode: TColorMatrixFlags = ColorMatrixFlagsDefault; + type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesColorMatrix(nativeImageAttr, + type_, TRUE, @colorMatrix, nil, mode)); + end; + + function TGPImageAttributes.ClearColorMatrix(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesColorMatrix(nativeImageAttr, type_, + FALSE, nil, nil, ColorMatrixFlagsDefault)); + end; + + + function TGPImageAttributes.SetColorMatrices(const colorMatrix: TColorMatrix; + const grayMatrix: TColorMatrix; mode: TColorMatrixFlags = ColorMatrixFlagsDefault; + type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesColorMatrix(nativeImageAttr, type_, + TRUE, @colorMatrix, @grayMatrix, mode)); + end; + + function TGPImageAttributes.ClearColorMatrices(Type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesColorMatrix( nativeImageAttr, + type_, FALSE, nil, nil, ColorMatrixFlagsDefault)); + end; + + function TGPImageAttributes.SetThreshold(threshold: Single; type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesThreshold( nativeImageAttr, type_, + TRUE, threshold)); + end; + + function TGPImageAttributes.ClearThreshold(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesThreshold(nativeImageAttr, type_, + FALSE, 0.0)); + end; + + function TGPImageAttributes.SetGamma(gamma: Single; type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesGamma(nativeImageAttr, type_, TRUE, gamma)); + end; + + function TGPImageAttributes.ClearGamma(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesGamma(nativeImageAttr, type_, FALSE, 0.0)); + end; + + function TGPImageAttributes.SetNoOp(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesNoOp(nativeImageAttr, type_, TRUE)); + end; + + function TGPImageAttributes.ClearNoOp(Type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesNoOp( nativeImageAttr, type_, FALSE)); + end; + + function TGPImageAttributes.SetColorKey(colorLow, colorHigh: TGPColor; + type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesColorKeys(nativeImageAttr, type_, + TRUE, colorLow, colorHigh)); + end; + + function TGPImageAttributes.ClearColorKey(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesColorKeys(nativeImageAttr, type_, + FALSE, 0, 0)); + end; + + function TGPImageAttributes.SetOutputChannel(channelFlags: TColorChannelFlags; + type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesOutputChannel(nativeImageAttr, + type_, TRUE, channelFlags)); + end; + + function TGPImageAttributes.ClearOutputChannel(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesOutputChannel(nativeImageAttr, + type_, FALSE, ColorChannelFlagsLast)); + end; + + function TGPImageAttributes.SetOutputChannelColorProfile(colorProfileFilename: WideString; + type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesOutputChannelColorProfile(nativeImageAttr, + type_, TRUE, PWideChar(colorProfileFilename))); + end; + + function TGPImageAttributes.ClearOutputChannelColorProfile(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesOutputChannelColorProfile(nativeImageAttr, + type_, FALSE, nil)); + end; + + function TGPImageAttributes.SetRemapTable(mapSize: Cardinal; map: PColorMap; + type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesRemapTable(nativeImageAttr, type_, + TRUE, mapSize, map)); + end; + + function TGPImageAttributes.ClearRemapTable(type_: TColorAdjustType = ColorAdjustTypeDefault): TStatus; + begin + result := SetStatus(GdipSetImageAttributesRemapTable(nativeImageAttr, type_, + FALSE, 0, nil)); + end; + + function TGPImageAttributes.SetBrushRemapTable(mapSize: Cardinal; map: PColorMap): TStatus; + begin + result := SetRemapTable(mapSize, map, ColorAdjustTypeBrush); + end; + + function TGPImageAttributes.ClearBrushRemapTable: TStatus; + begin + result := ClearRemapTable(ColorAdjustTypeBrush); + end; + + function TGPImageAttributes.SetWrapMode(wrap: TWrapMode; color: TGPColor = aclBlack; + clamp: BOOL = FALSE): TStatus; + begin + result := SetStatus(GdipSetImageAttributesWrapMode(nativeImageAttr, wrap, color, clamp)); + end; + + // The flags of the palette are ignored. + + function TGPImageAttributes.GetAdjustedPalette(colorPalette: PColorPalette; + colorAdjustType: TColorAdjustType): TStatus; + begin + result := SetStatus(GdipGetImageAttributesAdjustedPalette(nativeImageAttr, + colorPalette, colorAdjustType)); + end; + + function TGPImageAttributes.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + + constructor TGPImageAttributes.Create(imageAttr: GpImageAttributes; status: TStatus); + begin + SetNativeImageAttr(imageAttr); + lastResult := status; + end; + + procedure TGPImageAttributes.SetNativeImageAttr(nativeImageAttr: GpImageAttributes); + begin + self.nativeImageAttr := nativeImageAttr; + end; + + function TGPImageAttributes.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then lastResult := status; + result := status; + end; + +(**************************************************************************\ +* +* GDI+ Matrix class +* +\**************************************************************************) + + // Default constructor is set to identity matrix. + constructor TGPMatrix.Create; + var matrix: GpMatrix; + begin + matrix := nil; + lastResult := GdipCreateMatrix(matrix); + SetNativeMatrix(matrix); + end; + + constructor TGPMatrix.Create(m11, m12, m21, m22, dx, dy: Single); + var matrix: GpMatrix; + begin + matrix := nil; + lastResult := GdipCreateMatrix2(m11, m12, m21, m22, dx, dy, matrix); + SetNativeMatrix(matrix); + end; + + constructor TGPMatrix.Create(const rect: TGPRectF; const dstplg: TGPPointF); + var matrix: GpMatrix; + begin + matrix := nil; + lastResult := GdipCreateMatrix3(@rect, @dstplg, matrix); + SetNativeMatrix(matrix); + end; + + constructor TGPMatrix.Create(const rect: TGPRect; const dstplg: TGPPoint); + var matrix: GpMatrix; + begin + matrix := nil; + lastResult := GdipCreateMatrix3I(@rect, @dstplg, matrix); + SetNativeMatrix(matrix); + end; + + destructor TGPMatrix.Destroy; + begin + GdipDeleteMatrix(nativeMatrix); + end; + + function TGPMatrix.Clone: TGPMatrix; + var cloneMatrix: GpMatrix; + begin + cloneMatrix := nil; + SetStatus(GdipCloneMatrix(nativeMatrix, cloneMatrix)); + if (lastResult <> Ok) then + begin + result := nil; + exit; + end; + result := TGPMatrix.Create(cloneMatrix); + end; + + function TGPMatrix.GetElements(const m: TMatrixArray): TStatus; + begin + result := SetStatus(GdipGetMatrixElements(nativeMatrix, @m)); + end; + + function TGPMatrix.SetElements(m11, m12, m21, m22, dx, dy: Single): TStatus; + begin + result := SetStatus(GdipSetMatrixElements(nativeMatrix, + m11, m12, m21, m22, dx, dy)); + end; + + function TGPMatrix.OffsetX: Single; + var elements: TMatrixArray; + begin + if (GetElements(elements) = Ok) then + result := elements[4] + else + result := 0.0; + end; + + function TGPMatrix.OffsetY: Single; + var elements: TMatrixArray; + begin + if (GetElements(elements) = Ok) then result := elements[5] + else result := 0.0; + end; + + function TGPMatrix.Reset: TStatus; + begin + // set identity matrix elements + result := SetStatus(GdipSetMatrixElements(nativeMatrix, 1.0, 0.0, 0.0, 1.0, + 0.0, 0.0)); + end; + + function TGPMatrix.Multiply(matrix: TGPMatrix; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipMultiplyMatrix(nativeMatrix, matrix.nativeMatrix, order)); + end; + + function TGPMatrix.Translate(offsetX, offsetY: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipTranslateMatrix(nativeMatrix, offsetX, offsetY, order)); + end; + + function TGPMatrix.Scale(scaleX, scaleY: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipScaleMatrix(nativeMatrix, scaleX, scaleY, order)); + end; + + function TGPMatrix.Rotate(angle: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipRotateMatrix(nativeMatrix, angle, order)); + end; + + function TGPMatrix.RotateAt(angle: Single; const center: TGPPointF; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + if(order = MatrixOrderPrepend) then + begin + SetStatus(GdipTranslateMatrix(nativeMatrix, center.X, center.Y, order)); + SetStatus(GdipRotateMatrix(nativeMatrix, angle, order)); + result := SetStatus(GdipTranslateMatrix(nativeMatrix, -center.X, -center.Y, + order)); + end + else + begin + SetStatus(GdipTranslateMatrix(nativeMatrix, - center.X, - center.Y, order)); + SetStatus(GdipRotateMatrix(nativeMatrix, angle, order)); + result := SetStatus(GdipTranslateMatrix(nativeMatrix, center.X, center.Y, + order)); + end; + end; + + function TGPMatrix.Shear(shearX, shearY: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipShearMatrix(nativeMatrix, shearX, shearY, order)); + end; + + function TGPMatrix.Invert: TStatus; + begin + result := SetStatus(GdipInvertMatrix(nativeMatrix)); + end; + + // float version + function TGPMatrix.TransformPoints(pts: PGPPointF; count: Integer = 1): TStatus; + begin + result := SetStatus(GdipTransformMatrixPoints(nativeMatrix, pts, count)); + end; + + function TGPMatrix.TransformPoints(pts: PGPPoint; count: Integer = 1): TStatus; + begin + result := SetStatus(GdipTransformMatrixPointsI(nativeMatrix, pts, count)); + end; + + function TGPMatrix.TransformVectors(pts: PGPPointF; count: Integer = 1): TStatus; + begin + result := SetStatus(GdipVectorTransformMatrixPoints( nativeMatrix, pts, count)); + end; + + function TGPMatrix.TransformVectors(pts: PGPPoint; count: Integer = 1): TStatus; + begin + result := SetStatus(GdipVectorTransformMatrixPointsI(nativeMatrix, pts, count)); + end; + + function TGPMatrix.IsInvertible: BOOL; + begin + result := FALSE; + SetStatus(GdipIsMatrixInvertible(nativeMatrix, result)); + end; + + function TGPMatrix.IsIdentity: BOOL; + begin + result := False; + SetStatus(GdipIsMatrixIdentity(nativeMatrix, result)); + end; + + function TGPMatrix.Equals(matrix: TGPMatrix): BOOL; + begin + result := FALSE; + SetStatus(GdipIsMatrixEqual(nativeMatrix, matrix.nativeMatrix, result)); + end; + + function TGPMatrix.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + + constructor TGPMatrix.Create(nativeMatrix: GpMatrix); + begin + lastResult := Ok; + SetNativeMatrix(nativeMatrix); + end; + + procedure TGPMatrix.SetNativeMatrix(nativeMatrix: GpMatrix); + begin + self.nativeMatrix := nativeMatrix; + end; + + function TGPMatrix.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then lastResult := status; + result := status; + end; + + +(**************************************************************************\ +* +* GDI+ StringFormat class +* +\**************************************************************************) + + constructor TGPStringFormat.Create(formatFlags: Integer = 0; language: LANGID = LANG_NEUTRAL); + begin + nativeFormat := nil; + lastError := GdipCreateStringFormat(formatFlags, language, nativeFormat); + end; + + class function TGPStringFormat.GenericDefault: TGPStringFormat; + begin + if not assigned(GenericDefaultStringFormatBuffer) then + begin + GenericDefaultStringFormatBuffer := TGPStringFormat.Create; + GenericDefaultStringFormatBuffer.lastError := + GdipStringFormatGetGenericDefault(GenericDefaultStringFormatBuffer.nativeFormat); + end; + result := GenericDefaultStringFormatBuffer; + end; + + class function TGPStringFormat.GenericTypographic: TGPStringFormat; + begin + if not assigned(GenericTypographicStringFormatBuffer) then + begin + GenericTypographicStringFormatBuffer := TGPStringFormat.Create; + GenericTypographicStringFormatBuffer.lastError := + GdipStringFormatGetGenericTypographic(GenericTypographicStringFormatBuffer.nativeFormat); + end; + result := GenericTypographicStringFormatBuffer; + end; + + constructor TGPStringFormat.Create(format: TGPStringFormat); + var gpstf: GPSTRINGFORMAT; + begin + nativeFormat := nil; + if assigned(format) then gpstf := format.nativeFormat + else gpstf := nil; + lastError := GdipCloneStringFormat(gpstf, nativeFormat); + end; + + function TGPStringFormat.Clone: TGPStringFormat; + var + clonedStringFormat: GpStringFormat; + begin + clonedStringFormat := nil; + lastError := GdipCloneStringFormat(nativeFormat, clonedStringFormat); + if (lastError = Ok) then + result := TGPStringFormat.Create(clonedStringFormat, lastError) + else + result := nil; + end; + + destructor TGPStringFormat.Destroy; + begin + GdipDeleteStringFormat(nativeFormat); + end; + + function TGPStringFormat.SetFormatFlags(flags: Integer): TStatus; + begin + result := SetStatus(GdipSetStringFormatFlags(nativeFormat, flags)); + end; + + function TGPStringFormat.GetFormatFlags: Integer; + begin + SetStatus(GdipGetStringFormatFlags(nativeFormat, result)); + end; + + function TGPStringFormat.SetAlignment(align: TStringAlignment): TStatus; + begin + result := SetStatus(GdipSetStringFormatAlign(nativeFormat, align)); + end; + + function TGPStringFormat.GetAlignment: TStringAlignment; + begin + SetStatus(GdipGetStringFormatAlign(nativeFormat, result)); + end; + + function TGPStringFormat.SetLineAlignment(align: TStringAlignment): TStatus; + begin + result := SetStatus(GdipSetStringFormatLineAlign(nativeFormat, align)); + end; + + function TGPStringFormat.GetLineAlignment: TStringAlignment; + begin + SetStatus(GdipGetStringFormatLineAlign(nativeFormat, result)); + end; + + function TGPStringFormat.SetHotkeyPrefix(hotkeyPrefix: THotkeyPrefix): TStatus; + begin + result := SetStatus(GdipSetStringFormatHotkeyPrefix(nativeFormat, Integer(hotkeyPrefix))); + end; + + function TGPStringFormat.GetHotkeyPrefix: THotkeyPrefix; + var HotkeyPrefix: Integer; + begin + SetStatus(GdipGetStringFormatHotkeyPrefix(nativeFormat, HotkeyPrefix)); + result := THotkeyPrefix(HotkeyPrefix); + end; + + function TGPStringFormat.SetTabStops(firstTabOffset: Single; count: Integer; tabStops: PSingle): TStatus; + begin + result := SetStatus(GdipSetStringFormatTabStops(nativeFormat, firstTabOffset, count, tabStops)); + end; + + function TGPStringFormat.GetTabStopCount: Integer; + begin + SetStatus(GdipGetStringFormatTabStopCount(nativeFormat, result)); + end; + + function TGPStringFormat.GetTabStops(count: Integer; firstTabOffset, tabStops: PSingle): TStatus; + begin + result := SetStatus(GdipGetStringFormatTabStops(nativeFormat, count, firstTabOffset, tabStops)); + end; + + function TGPStringFormat.SetDigitSubstitution(language: LANGID; substitute: TStringDigitSubstitute): TStatus; + begin + result := SetStatus(GdipSetStringFormatDigitSubstitution(nativeFormat, language, substitute)); + end; + + function TGPStringFormat.GetDigitSubstitutionLanguage: LANGID; + begin + SetStatus(GdipGetStringFormatDigitSubstitution(nativeFormat, @result, nil)); + end; + + function TGPStringFormat.GetDigitSubstitutionMethod: TStringDigitSubstitute; + begin + SetStatus(GdipGetStringFormatDigitSubstitution(nativeFormat, nil, @result)); + end; + + function TGPStringFormat.SetTrimming(trimming: TStringTrimming): TStatus; + begin + result := SetStatus(GdipSetStringFormatTrimming(nativeFormat, trimming)); + end; + + function TGPStringFormat.GetTrimming: TStringTrimming; + begin + SetStatus(GdipGetStringFormatTrimming(nativeFormat, result)); + end; + + function TGPStringFormat.SetMeasurableCharacterRanges(rangeCount: Integer; + ranges: PCharacterRange): TStatus; + begin + result := SetStatus(GdipSetStringFormatMeasurableCharacterRanges(nativeFormat, + rangeCount, ranges)); + end; + + function TGPStringFormat.GetMeasurableCharacterRangeCount: Integer; + begin + SetStatus(GdipGetStringFormatMeasurableCharacterRangeCount(nativeFormat, result)); + end; + + function TGPStringFormat.GetLastStatus: TStatus; + begin + result := lastError; + lastError := Ok; + end; + + function TGPStringFormat.SetStatus(newStatus: GpStatus): TStatus; + begin + if (newStatus <> Ok) then lastError := newStatus; + result := newStatus; + end; + + // operator = + procedure TGPStringFormat.Assign(source: TGPStringFormat); + begin + assert(assigned(source)); + GdipDeleteStringFormat(nativeFormat); + lastError := GdipCloneStringFormat(source.nativeFormat, nativeFormat); + end; + + constructor TGPStringFormat.Create(clonedStringFormat: GpStringFormat; status: TStatus); + begin + lastError := status; + nativeFormat := clonedStringFormat; + end; + + + + // --------------------------------------------------------------------------- + // TAdjustableArrowCap + // --------------------------------------------------------------------------- + + constructor TGPAdjustableArrowCap.Create(height, width: Single; isFilled: Bool = TRUE); + var cap: GpAdjustableArrowCap; + begin + cap := nil; + lastResult := GdipCreateAdjustableArrowCap(height, width, isFilled, cap); + SetNativeCap(cap); + end; + + function TGPAdjustableArrowCap.SetHeight(height: Single): TStatus; + begin + result := SetStatus(GdipSetAdjustableArrowCapHeight(GpAdjustableArrowCap(nativeCap), height)); + end; + + function TGPAdjustableArrowCap.GetHeight: Single; + begin + SetStatus(GdipGetAdjustableArrowCapHeight(GpAdjustableArrowCap(nativeCap), result)); + end; + + function TGPAdjustableArrowCap.SetWidth(width: Single): TStatus; + begin + result := SetStatus(GdipSetAdjustableArrowCapWidth(GpAdjustableArrowCap(nativeCap), width)); + end; + + function TGPAdjustableArrowCap.GetWidth: Single; + begin + SetStatus(GdipGetAdjustableArrowCapWidth(GpAdjustableArrowCap(nativeCap), result)); + end; + + function TGPAdjustableArrowCap.SetMiddleInset(middleInset: Single): TStatus; + begin + result := SetStatus(GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap(nativeCap), middleInset)); + end; + + function TGPAdjustableArrowCap.GetMiddleInset: Single; + begin + SetStatus(GdipGetAdjustableArrowCapMiddleInset( + GpAdjustableArrowCap(nativeCap), result)); + end; + + function TGPAdjustableArrowCap.SetFillState(isFilled: Bool): TStatus; + begin + result := SetStatus(GdipSetAdjustableArrowCapFillState( + GpAdjustableArrowCap(nativeCap), isFilled)); + end; + + function TGPAdjustableArrowCap.IsFilled: BOOL; + begin + SetStatus(GdipGetAdjustableArrowCapFillState( + GpAdjustableArrowCap(nativeCap), result)); + end; + +(**************************************************************************\ +* +* GDI+ Metafile class +* +\**************************************************************************) + + // Playback a metafile from a HMETAFILE + // If deleteWmf is TRUE, then when the metafile is deleted, + // the hWmf will also be deleted. Otherwise, it won't be. + + constructor TGPMetafile.Create(hWmf: HMETAFILE; + var wmfPlaceableFileHeader: TWmfPlaceableFileHeader; deleteWmf: BOOL = FALSE); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipCreateMetafileFromWmf(hWmf, deleteWmf, @wmfPlaceableFileHeader, metafile); + SetNativeImage(metafile); + end; + + // Playback a metafile from a HENHMETAFILE + // If deleteEmf is TRUE, then when the metafile is deleted, + // the hEmf will also be deleted. Otherwise, it won't be. + + constructor TGPMetafile.Create(hEmf: HENHMETAFILE; deleteEmf: BOOL = FALSE); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipCreateMetafileFromEmf(hEmf, deleteEmf, metafile); + SetNativeImage(metafile); + end; + + constructor TGPMetafile.Create(filename: WideString); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipCreateMetafileFromFile(PWideChar(filename), metafile); + SetNativeImage(metafile); + end; + + // Playback a WMF metafile from a file. + + constructor TGPMetafile.Create(filename: Widestring; var wmfPlaceableFileHeader: TWmfPlaceableFileHeader); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipCreateMetafileFromWmfFile(PWideChar(filename), @wmfPlaceableFileHeader, metafile); + SetNativeImage(metafile); + end; + + constructor TGPMetafile.Create(stream: IStream); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipCreateMetafileFromStream(stream, metafile); + SetNativeImage(metafile); + end; + + // Record a metafile to memory. + + constructor TGPMetafile.Create(referenceHdc: HDC; type_: TEmfType = EmfTypeEmfPlusDual; + description: PWCHAR = nil); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipRecordMetafile(referenceHdc, type_, nil, MetafileFrameUnitGdi, + description, metafile); + SetNativeImage(metafile); + end; + + // Record a metafile to memory. + + constructor TGPMetafile.Create(referenceHdc: HDC; frameRect: TGPRectF; + frameUnit: TMetafileFrameUnit = MetafileFrameUnitGdi; + type_: TEmfType = EmfTypeEmfPlusDual; description: PWCHAR = nil); + var metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipRecordMetafile(referenceHdc, type_, @frameRect, frameUnit, + description, metafile); + SetNativeImage(metafile); + end; + + // Record a metafile to memory. + + constructor TGPMetafile.Create(referenceHdc: HDC; frameRect: TGPRect; + frameUnit: TMetafileFrameUnit = MetafileFrameUnitGdi; + type_: TEmfType = EmfTypeEmfPlusDual; description: PWCHAR = nil); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipRecordMetafileI(referenceHdc, type_, @frameRect, frameUnit, + description, metafile); + SetNativeImage(metafile); + end; + + constructor TGPMetafile.Create(fileName: WideString; referenceHdc: HDC; + type_: TEmfType = EmfTypeEmfPlusDual; description: PWCHAR = nil); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipRecordMetafileFileName(PWideChar(fileName), + referenceHdc, type_, nil, MetafileFrameUnitGdi, description, metafile); + SetNativeImage(metafile); + end; + + constructor TGPMetafile.Create(fileName: WideString; referenceHdc: HDC; frameRect: TGPRectF; + frameUnit: TMetafileFrameUnit = MetafileFrameUnitGdi; type_: TEmfType = EmfTypeEmfPlusDual; + description: PWCHAR = nil); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipRecordMetafileFileName(PWideChar(fileName), referenceHdc, + type_, @frameRect, frameUnit, description, metafile); + SetNativeImage(metafile); + end; + + constructor TGPMetafile.Create(fileName: WideString; referenceHdc: HDC; frameRect: TGPRect; + frameUnit: TMetafileFrameUnit = MetafileFrameUnitGdi; type_: TEmfType = EmfTypeEmfPlusDual; + description: PWCHAR = nil); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipRecordMetafileFileNameI(PWideChar(fileName), + referenceHdc, type_, @frameRect, frameUnit, description, metafile); + SetNativeImage(metafile); + end; + + constructor TGPMetafile.Create(stream: IStream; referenceHdc: HDC; + type_: TEmfType = EmfTypeEmfPlusDual; description: PWCHAR = nil); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipRecordMetafileStream(stream, referenceHdc, type_, nil, + MetafileFrameUnitGdi, description, metafile); + SetNativeImage(metafile); + end; + + constructor TGPMetafile.Create(stream: IStream; referenceHdc: HDC; frameRect: TGPRectF; + frameUnit: TMetafileFrameUnit = MetafileFrameUnitGdi; type_: TEmfType = EmfTypeEmfPlusDual; + description: PWCHAR = nil); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipRecordMetafileStream(stream, referenceHdc, type_, + @frameRect, frameUnit, description, metafile); + SetNativeImage(metafile); + end; + + constructor TGPMetafile.Create(stream : IStream; referenceHdc : HDC; frameRect : TGPRect; + frameUnit : TMetafileFrameUnit = MetafileFrameUnitGdi; type_ : TEmfType = EmfTypeEmfPlusDual; + description : PWCHAR = nil); + var + metafile: GpMetafile; + begin + metafile := nil; + lastResult := GdipRecordMetafileStreamI(stream, referenceHdc, type_, + @frameRect, frameUnit, description, metafile); + SetNativeImage(metafile); + end; + + function TGPMetafile.GetMetafileHeader(hWmf: HMETAFILE; + var wmfPlaceableFileHeader: TWmfPlaceableFileHeader; header: TMetafileHeader): TStatus; + begin + result := GdipGetMetafileHeaderFromWmf(hWmf, @wmfPlaceableFileHeader, @header.Type_); + end; + + function TGPMetafile.GetMetafileHeader(hEmf: HENHMETAFILE; header: TMetafileHeader): TStatus; + begin + result := GdipGetMetafileHeaderFromEmf(hEmf, @header.Type_); + end; + + function TGPMetafile.GetMetafileHeader(filename: WideString; header: TMetafileHeader): TStatus; + begin + result := GdipGetMetafileHeaderFromFile(PWideChar(filename), @header.Type_); + end; + + function TGPMetafile.GetMetafileHeader(stream: IStream; header: TMetafileHeader): TStatus; + begin + result := GdipGetMetafileHeaderFromStream(stream, @header.Type_); + end; + + function TGPMetafile.GetMetafileHeader(header: TMetafileHeader): TStatus; + begin + result := SetStatus(GdipGetMetafileHeaderFromMetafile(GpMetafile(nativeImage), + @header.Type_)); + end; + + // Once this method is called, the Metafile object is in an invalid state + // and can no longer be used. It is the responsiblity of the caller to + // invoke DeleteEnhMetaFile to delete this hEmf. + + function TGPMetafile.GetHENHMETAFILE: HENHMETAFILE; + begin + SetStatus(GdipGetHemfFromMetafile(GpMetafile(nativeImage), result)); + end; + + // Used in conjuction with Graphics::EnumerateMetafile to play an EMF+ + // The data must be DWORD aligned if it's an EMF or EMF+. It must be + // WORD aligned if it's a WMF. + + function TGPMetafile.PlayRecord(recordType: TEmfPlusRecordType; flags, dataSize: UINT; + data: PBYTE): TStatus; + begin + result := SetStatus(GdipPlayMetafileRecord(GpMetafile(nativeImage), + recordType, flags, dataSize, data)); + end; + + // If you're using a printer HDC for the metafile, but you want the + // metafile rasterized at screen resolution, then use this API to set + // the rasterization dpi of the metafile to the screen resolution, + // e.g. 96 dpi or 120 dpi. + + function TGPMetafile.SetDownLevelRasterizationLimit(metafileRasterizationLimitDpi: UINT): TStatus; + begin + result := SetStatus(GdipSetMetafileDownLevelRasterizationLimit( + GpMetafile(nativeImage), metafileRasterizationLimitDpi)); + end; + + function TGPMetafile.GetDownLevelRasterizationLimit: UINT; + var metafileRasterizationLimitDpi: UINT; + begin + metafileRasterizationLimitDpi := 0; + SetStatus(GdipGetMetafileDownLevelRasterizationLimit( + GpMetafile(nativeImage), metafileRasterizationLimitDpi)); + result := metafileRasterizationLimitDpi; + end; + + function TGPMetafile.EmfToWmfBits(hemf: HENHMETAFILE; cbData16: UINT; pData16: PBYTE; + iMapMode: Integer = MM_ANISOTROPIC; eFlags: TEmfToWmfBitsFlags = EmfToWmfBitsFlagsDefault): UINT; + begin + result := GdipEmfToWmfBits(hemf, cbData16, pData16, iMapMode, Integer(eFlags)); + end; + + constructor TGPMetafile.Create; + begin + SetNativeImage(nil); + lastResult := Ok; + end; + +(**************************************************************************\ +* +* GDI+ Codec Image APIs +* +\**************************************************************************) + +//-------------------------------------------------------------------------- +// Codec Management APIs +//-------------------------------------------------------------------------- + + function GetImageDecodersSize(out numDecoders, size: UINT): TStatus; + begin + result := GdipGetImageDecodersSize(numDecoders, size); + end; + + function GetImageDecoders(numDecoders, size: UINT; + decoders: PImageCodecInfo): TStatus; + begin + result := GdipGetImageDecoders(numDecoders, size, decoders); + end; + + + function GetImageEncodersSize(out numEncoders, size: UINT): TStatus; + begin + result := GdipGetImageEncodersSize(numEncoders, size); + end; + + function GetImageEncoders(numEncoders, size: UINT; + encoders: PImageCodecInfo): TStatus; + begin + result := GdipGetImageEncoders(numEncoders, size, encoders); + end; + +(**************************************************************************\ +* +* GDI+ Region class implementation +* +\**************************************************************************) + + constructor TGPRegion.Create; + var + region: GpRegion; + begin + region := nil; + lastResult := GdipCreateRegion(region); + SetNativeRegion(region); + end; + + constructor TGPRegion.Create(rect: TGPRectF); + var + region: GpRegion; + begin + region := nil; + lastResult := GdipCreateRegionRect(@rect, region); + SetNativeRegion(region); + end; + + constructor TGPRegion.Create(rect: TGPRect); + var + region: GpRegion; + begin + region := nil; + lastResult := GdipCreateRegionRectI(@rect, region); + SetNativeRegion(region); + end; + + constructor TGPRegion.Create(path: TGPGraphicsPath); + var + region: GpRegion; + begin + region := nil; + lastResult := GdipCreateRegionPath(path.nativePath, region); + SetNativeRegion(region); + end; + + constructor TGPRegion.Create(regionData: PBYTE; size: Integer); + var + region: GpRegion; + begin + region := nil; + lastResult := GdipCreateRegionRgnData(regionData, size, region); + SetNativeRegion(region); + end; + + constructor TGPRegion.Create(hRgn: HRGN); + var + region: GpRegion; + begin + region := nil; + lastResult := GdipCreateRegionHrgn(hRgn, region); + SetNativeRegion(region); + end; + + function TGPRegion.FromHRGN(hRgn: HRGN): TGPRegion; + var + region: GpRegion; + begin + region := nil; + if (GdipCreateRegionHrgn(hRgn, region) = Ok) then + begin + result := TGPRegion.Create(region); + if (result = nil) then + GdipDeleteRegion(region); + exit; + end + else + result := nil; + end; + + destructor TGPRegion.Destroy; + begin + GdipDeleteRegion(nativeRegion); + end; + + function TGPRegion.Clone: TGPRegion; + var region: GpRegion; + begin + region := nil; + SetStatus(GdipCloneRegion(nativeRegion, region)); + result := TGPRegion.Create(region); + end; + + function TGPRegion.MakeInfinite: TStatus; + begin + result := SetStatus(GdipSetInfinite(nativeRegion)); + end; + + function TGPRegion.MakeEmpty: TStatus; + begin + result := SetStatus(GdipSetEmpty(nativeRegion)); + end; + + // Get the size of the buffer needed for the GetData method + function TGPRegion.GetDataSize: UINT; + var bufferSize: UINT; + begin + bufferSize := 0; + SetStatus(GdipGetRegionDataSize(nativeRegion, bufferSize)); + result := bufferSize; + end; + + + // buffer - where to put the data + // bufferSize - how big the buffer is (should be at least as big as GetDataSize()) + // sizeFilled - if not nil, this is an OUT param that says how many bytes + // of data were written to the buffer. + + function TGPRegion.GetData(buffer: PBYTE; bufferSize: UINT; sizeFilled: PUINT = nil): TStatus; + begin + result := SetStatus(GdipGetRegionData(nativeRegion, buffer, bufferSize, sizeFilled)); + end; + + function TGPRegion.Intersect(const rect: TGPRect): TStatus; + begin + result := SetStatus(GdipCombineRegionRectI(nativeRegion, @rect, CombineModeIntersect)); + end; + + function TGPRegion.Intersect(const rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipCombineRegionRect(nativeRegion, @rect, CombineModeIntersect)); + end; + + function TGPRegion.Intersect(path: TGPGraphicsPath): TStatus; + begin + result := SetStatus(GdipCombineRegionPath(nativeRegion, path.nativePath, + CombineModeIntersect)); + end; + + function TGPRegion.Intersect(region: TGPRegion): TStatus; + begin + result := SetStatus(GdipCombineRegionRegion(nativeRegion, region.nativeRegion, + CombineModeIntersect)); + end; + + function TGPRegion.Union(const rect: TGPRect): TStatus; + begin + result := SetStatus(GdipCombineRegionRectI(nativeRegion, @rect, CombineModeUnion)); + end; + + function TGPRegion.Union(const rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipCombineRegionRect(nativeRegion, @rect, CombineModeUnion)); + end; + + function TGPRegion.Union(path: TGPGraphicsPath): TStatus; + begin + result := SetStatus(GdipCombineRegionPath(nativeRegion, path.nativePath, CombineModeUnion)); + end; + + function TGPRegion.Union(region: TGPRegion): TStatus; + begin + result := SetStatus(GdipCombineRegionRegion(nativeRegion, region.nativeRegion, + CombineModeUnion)); + end; + + function TGPRegion.Xor_(const rect: TGPRect): TStatus; + begin + result := SetStatus(GdipCombineRegionRectI(nativeRegion, @rect, CombineModeXor)); + end; + + function TGPRegion.Xor_(const rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipCombineRegionRect(nativeRegion, @rect, CombineModeXor)); + end; + + function TGPRegion.Xor_(path: TGPGraphicsPath): TStatus; + begin + result := SetStatus(GdipCombineRegionPath(nativeRegion, path.nativePath, CombineModeXor)); + end; + + function TGPRegion.Xor_(region: TGPRegion): TStatus; + begin + result := SetStatus(GdipCombineRegionRegion(nativeRegion, region.nativeRegion, + CombineModeXor)); + end; + + function TGPRegion.Exclude(const rect: TGPRect): TStatus; + begin + result := SetStatus(GdipCombineRegionRectI(nativeRegion, @rect, CombineModeExclude)); + end; + + function TGPRegion.Exclude(const rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipCombineRegionRect(nativeRegion, @rect, CombineModeExclude)); + end; + + function TGPRegion.Exclude(path: TGPGraphicsPath): TStatus; + begin + result := SetStatus(GdipCombineRegionPath(nativeRegion, path.nativePath, CombineModeExclude)); + end; + + function TGPRegion.Exclude(region: TGPRegion): TStatus; + begin + result := SetStatus(GdipCombineRegionRegion(nativeRegion, + region.nativeRegion, + CombineModeExclude)); + end; + + function TGPRegion.Complement(const rect: TGPRect): TStatus; + begin + result := SetStatus(GdipCombineRegionRectI(nativeRegion, @rect, + CombineModeComplement)); + end; + + function TGPRegion.Complement(const rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipCombineRegionRect(nativeRegion, @rect, + CombineModeComplement)); + end; + + function TGPRegion.Complement(path: TGPGraphicsPath): TStatus; + begin + result := SetStatus(GdipCombineRegionPath(nativeRegion, + path.nativePath, + CombineModeComplement)); + end; + + function TGPRegion.Complement(region: TGPRegion): TStatus; + begin + result := SetStatus(GdipCombineRegionRegion(nativeRegion, + region.nativeRegion, + CombineModeComplement)); + end; + + function TGPRegion.Translate(dx, dy: Single): TStatus; + begin + result := SetStatus(GdipTranslateRegion(nativeRegion, dx, dy)); + end; + + function TGPRegion.Translate(dx, dy: Integer): TStatus; + begin + result := SetStatus(GdipTranslateRegionI(nativeRegion, dx, dy)); + end; + + function TGPRegion.Transform(matrix: TGPMatrix): TStatus; + begin + result := SetStatus(GdipTransformRegion(nativeRegion, + matrix.nativeMatrix)); + end; + + function TGPRegion.GetBounds(out rect: TGPRect; g: TGPGraphics): TStatus; + begin + result := SetStatus(GdipGetRegionBoundsI(nativeRegion, + g.nativeGraphics, + @rect)); + end; + + function TGPRegion.GetBounds(out rect: TGPRectF; g: TGPGraphics): TStatus; + begin + result := SetStatus(GdipGetRegionBounds(nativeRegion, + g.nativeGraphics, + @rect)); + end; + + function TGPRegion.GetHRGN(g: TGPGraphics): HRGN; + begin + SetStatus(GdipGetRegionHRgn(nativeRegion, g.nativeGraphics, result)); + end; + + function TGPRegion.IsEmpty(g: TGPGraphics): BOOL; + var booln: BOOL; + begin + booln := FALSE; + SetStatus(GdipIsEmptyRegion(nativeRegion, g.nativeGraphics, booln)); + result := booln; + end; + + function TGPRegion.IsInfinite(g: TGPGraphics): BOOL ; + var booln: BOOL; + begin + booln := FALSE; + SetStatus(GdipIsInfiniteRegion(nativeRegion, g.nativeGraphics, booln)); + result := booln; + end; + + function TGPRegion.IsVisible(x, y: Integer; g: TGPGraphics = nil): BOOL; + var + booln: BOOL; + GPX: GpGraphics; + begin + booln := FALSE; + if assigned(g) then gpx := g.nativeGraphics else gpx := nil; + SetStatus(GdipIsVisibleRegionPointI(nativeRegion, X, Y, gpx, booln)); + result := booln; + end; + + function TGPRegion.IsVisible(const point: TGPPoint; g: TGPGraphics = nil): BOOL; + var + booln: BOOL; + GPX: GpGraphics; + begin + booln := FALSE; + if assigned(g) then gpx := g.nativeGraphics else gpx := nil; + SetStatus(GdipIsVisibleRegionPointI(nativeRegion, point.X, point.Y, gpx, booln)); + result := booln; + end; + + function TGPRegion.IsVisible(x, y: Single; g: TGPGraphics = nil): BOOL; + var + booln: BOOL; + GPX: GpGraphics; + begin + booln := FALSE; + if assigned(g) then gpx := g.nativeGraphics else gpx := nil; + SetStatus(GdipIsVisibleRegionPoint(nativeRegion, X, Y, gpx, booln)); + result := booln; + end; + + function TGPRegion.IsVisible(const point: TGPPointF; g: TGPGraphics = nil): BOOL; + var + booln: BOOL; + GPX: GpGraphics; + begin + booln := FALSE; + if assigned(g) then gpx := g.nativeGraphics else gpx := nil; + SetStatus(GdipIsVisibleRegionPoint(nativeRegion, point.X, point.Y, gpx, booln)); + result := booln; + end; + + function TGPRegion.IsVisible(x, y, width, height: Integer; g: TGPGraphics): BOOL; + var + booln: BOOL; + GPX: GpGraphics; + begin + booln := FALSE; + if assigned(g) then gpx := g.nativeGraphics else gpx := nil; + SetStatus(GdipIsVisibleRegionRectI(nativeRegion, + X, + Y, + Width, + Height, + gpx, + booln)); + result := booln; + end; + + function TGPRegion.IsVisible(const rect: TGPRect; g: TGPGraphics = nil): BOOL; + var + booln: BOOL; + GPX: GpGraphics; + begin + booln := FALSE; + if assigned(g) then gpx := g.nativeGraphics else gpx := nil; + SetStatus(GdipIsVisibleRegionRectI(nativeRegion, + rect.X, + rect.Y, + rect.Width, + rect.Height, + gpx, + booln)); + result := booln; + end; + + function TGPRegion.IsVisible(x, y, width, height: Single; g: TGPGraphics = nil): BOOL; + var + booln: BOOL; + GPX: GpGraphics; + begin + booln := FALSE; + if assigned(g) then gpx := g.nativeGraphics else gpx := nil; + SetStatus(GdipIsVisibleRegionRect(nativeRegion, X, + Y, Width, + Height, + gpx, + booln)); + result := booln; + end; + + function TGPRegion.IsVisible(const rect: TGPRectF; g: TGPGraphics = nil): BOOL; + var + booln: BOOL; + GPX: GpGraphics; + begin + booln := FALSE; + if assigned(g) then gpx := g.nativeGraphics else gpx := nil; + SetStatus(GdipIsVisibleRegionRect(nativeRegion, rect.X, + rect.Y, rect.Width, + rect.Height, + gpx, + booln)); + result := booln; + end; + + function TGPRegion.Equals(region: TGPRegion; g: TGPGraphics): BOOL; + var + booln: BOOL; + begin + booln := FALSE; + SetStatus(GdipIsEqualRegion(nativeRegion, + region.nativeRegion, + g.nativeGraphics, + booln)); + result := booln; + end; + + function TGPRegion.GetRegionScansCount(matrix: TGPMatrix): UINT; + var Count: UINT; + begin + count := 0; + SetStatus(GdipGetRegionScansCount(nativeRegion, count, matrix.nativeMatrix)); + result := count; + end; + + // If rects is nil, result := the count of rects in the region. + // Otherwise, assume rects is big enough to hold all the region rects + // and fill them in and result := the number of rects filled in. + // The rects are result :=ed in the units specified by the matrix + // (which is typically a world-to-device transform). + // Note that the number of rects result :=ed can vary, depending on the + // matrix that is used. + + function TGPRegion.GetRegionScans(matrix: TGPMatrix; rects: PGPRectF; out count: Integer): TStatus; + begin + result := SetStatus(GdipGetRegionScans(nativeRegion, + rects, + count, + matrix.nativeMatrix)); + end; + + function TGPRegion.GetRegionScans(matrix: TGPMatrix; rects: PGPRect; out count: Integer): TStatus; + begin + result := SetStatus(GdipGetRegionScansI(nativeRegion, + rects, + count, + matrix.nativeMatrix)); + end; + + function TGPRegion.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + + function TGPRegion.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then lastResult := status; + result := status; + end; + + constructor TGPRegion.Create(nativeRegion: GpRegion); + begin + SetNativeRegion(nativeRegion); + end; + + procedure TGPRegion.SetNativeRegion(nativeRegion: GpRegion); + begin + self.nativeRegion := nativeRegion; + end; + +(**************************************************************************\ +* +* GDI+ CustomLineCap APIs +* +\**************************************************************************) + + constructor TGPCustomLineCap.Create(fillPath, strokePath: TGPGraphicsPath; + baseCap: TLineCap = LineCapFlat; baseInset: Single = 0); + var nativeFillPath, nativeStrokePath: GpPath; + begin + nativeCap := nil; + nativeFillPath := nil; + nativeStrokePath := nil; + + if assigned(fillPath) then nativeFillPath := fillPath.nativePath; + if assigned(strokePath) then nativeStrokePath := strokePath.nativePath; + + lastResult := GdipCreateCustomLineCap(nativeFillPath, nativeStrokePath, + baseCap, baseInset, nativeCap); + end; + + destructor TGPCustomLineCap.Destroy; + begin + GdipDeleteCustomLineCap(nativeCap); + end; + + function TGPCustomLineCap.Clone: TGPCustomLineCap; + var newNativeLineCap: GpCustomLineCap; + begin + newNativeLineCap := nil; + SetStatus(GdipCloneCustomLineCap(nativeCap, newNativeLineCap)); + if (lastResult = Ok) then + begin + result := TGPCustomLineCap.Create(newNativeLineCap, lastResult); + if (result = nil) then + SetStatus(GdipDeleteCustomLineCap(newNativeLineCap)); + end + else + result := nil; + end; + + // This changes both the start and end cap. + function TGPCustomLineCap.SetStrokeCap(strokeCap: TLineCap): TStatus; + begin + result := SetStrokeCaps(strokeCap, strokeCap); + end; + + function TGPCustomLineCap.SetStrokeCaps(startCap, endCap: TLineCap): TStatus; + begin + result := SetStatus(GdipSetCustomLineCapStrokeCaps(nativeCap, startCap, endCap)); + end; + + function TGPCustomLineCap.GetStrokeCaps(out startCap, endCap: TLineCap): TStatus; + begin + result := SetStatus(GdipGetCustomLineCapStrokeCaps(nativeCap, startCap, endCap)); + end; + + function TGPCustomLineCap.SetStrokeJoin(lineJoin: TLineJoin): TStatus; + begin + result := SetStatus(GdipSetCustomLineCapStrokeJoin(nativeCap, lineJoin)); + end; + + function TGPCustomLineCap.GetStrokeJoin: TLineJoin; + begin + SetStatus(GdipGetCustomLineCapStrokeJoin(nativeCap, result)); + end; + + function TGPCustomLineCap.SetBaseCap(baseCap: TLineCap): TStatus; + begin + result := SetStatus(GdipSetCustomLineCapBaseCap(nativeCap, baseCap)); + end; + + function TGPCustomLineCap.GetBaseCap: TLineCap; + begin + SetStatus(GdipGetCustomLineCapBaseCap(nativeCap, result)); + end; + + function TGPCustomLineCap.SetBaseInset(inset: Single): TStatus; + begin + result := SetStatus(GdipSetCustomLineCapBaseInset(nativeCap, inset)); + end; + + function TGPCustomLineCap.GetBaseInset: Single; + begin + SetStatus(GdipGetCustomLineCapBaseInset(nativeCap, result)); + end; + + function TGPCustomLineCap.SetWidthScale(widthScale: Single): TStatus; + begin + result := SetStatus(GdipSetCustomLineCapWidthScale(nativeCap, widthScale)); + end; + + function TGPCustomLineCap.GetWidthScale: Single; + begin + SetStatus(GdipGetCustomLineCapWidthScale(nativeCap, result)); + end; + + function TGPCustomLineCap.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + + constructor TGPCustomLineCap.Create; + begin + nativeCap := nil; + lastResult := Ok; + end; + + constructor TGPCustomLineCap.Create(nativeCap: GpCustomLineCap; status: TStatus); + begin + lastResult := status; + SetNativeCap(nativeCap); + end; + + procedure TGPCustomLineCap.SetNativeCap(nativeCap: GpCustomLineCap); + begin + self.nativeCap := nativeCap; + end; + + function TGPCustomLineCap.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then lastResult := status; + result := status; + end; + +(************************************************************************** +* +* CachedBitmap class definition +* +* GDI+ CachedBitmap is a representation of an accelerated drawing +* that has restrictions on what operations are allowed in order +* to accelerate the drawing to the destination. +* +**************************************************************************) + + constructor TGPCachedBitmap.Create(bitmap: TGPBitmap; graphics: TGPGraphics); + begin + nativeCachedBitmap := nil; + lastResult := GdipCreateCachedBitmap( + GpBitmap(bitmap.nativeImage), + graphics.nativeGraphics, + nativeCachedBitmap); + end; + + destructor TGPCachedBitmap.Destroy; + begin + GdipDeleteCachedBitmap(nativeCachedBitmap); + end; + + function TGPCachedBitmap.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + +(**************************************************************************\ +* +* GDI+ Pen class +* +\**************************************************************************) + + //-------------------------------------------------------------------------- + // Pen class + //-------------------------------------------------------------------------- + + constructor TGPPen.Create(color: TGPColor; width: Single = 1.0); + var unit_: TUnit; + begin + unit_ := UnitWorld; + nativePen := nil; + lastResult := GdipCreatePen1(color, width, unit_, nativePen); + end; + + constructor TGPPen.Create(brush: TGPBrush; width: Single = 1.0); + var unit_: TUnit; + begin + unit_ := UnitWorld; + nativePen := nil; + lastResult := GdipCreatePen2(brush.nativeBrush, width, unit_, nativePen); + end; + + destructor TGPPen.Destroy; + begin + GdipDeletePen(nativePen); + end; + + function TGPPen.Clone: TGPPen; + var clonePen: GpPen; + begin + clonePen := nil; + lastResult := GdipClonePen(nativePen, clonePen); + result := TGPPen.Create(clonePen, lastResult); + end; + + function TGPPen.SetWidth(width: Single): TStatus; + begin + result := SetStatus(GdipSetPenWidth(nativePen, width)); + end; + + function TGPPen.GetWidth: Single; + begin + SetStatus(GdipGetPenWidth(nativePen, result)); + end; + + // Set/get line caps: start, end, and dash + // Line cap and join APIs by using LineCap and LineJoin enums. + + function TGPPen.SetLineCap(startCap, endCap: TLineCap; dashCap: TDashCap): TStatus; + begin + result := SetStatus(GdipSetPenLineCap197819(nativePen, startCap, endCap, dashCap)); + end; + + function TGPPen.SetStartCap(startCap: TLineCap): TStatus; + begin + result := SetStatus(GdipSetPenStartCap(nativePen, startCap)); + end; + + function TGPPen.SetEndCap(endCap: TLineCap): TStatus; + begin + result := SetStatus(GdipSetPenEndCap(nativePen, endCap)); + end; + + function TGPPen.SetDashCap(dashCap: TDashCap): TStatus; + begin + result := SetStatus(GdipSetPenDashCap197819(nativePen, dashCap)); + end; + + function TGPPen.GetStartCap: TLineCap; + begin + SetStatus(GdipGetPenStartCap(nativePen, result)); + end; + + function TGPPen.GetEndCap: TLineCap; + begin + SetStatus(GdipGetPenEndCap(nativePen, result)); + end; + + function TGPPen.GetDashCap: TDashCap; + begin + SetStatus(GdipGetPenDashCap197819(nativePen, result)); + end; + + function TGPPen.SetLineJoin(lineJoin: TLineJoin): TStatus; + begin + result := SetStatus(GdipSetPenLineJoin(nativePen, lineJoin)); + end; + + function TGPPen.GetLineJoin: TLineJoin; + begin + SetStatus(GdipGetPenLineJoin(nativePen, result)); + end; + + function TGPPen.SetCustomStartCap(customCap: TGPCustomLineCap): TStatus; + var nativeCap: GpCustomLineCap; + begin + nativeCap := nil; + if assigned(customCap) then nativeCap := customCap.nativeCap; + result := SetStatus(GdipSetPenCustomStartCap(nativePen, nativeCap)); + end; + + function TGPPen.GetCustomStartCap(customCap: TGPCustomLineCap): TStatus; + begin + if(customCap = nil) then + result := SetStatus(InvalidParameter) + else + result := SetStatus(GdipGetPenCustomStartCap(nativePen, customCap.nativeCap)); + end; + + function TGPPen.SetCustomEndCap(customCap: TGPCustomLineCap): TStatus; + var nativeCap: GpCustomLineCap; + begin + nativeCap := nil; + if assigned(customCap) then nativeCap := customCap.nativeCap; + result := SetStatus(GdipSetPenCustomEndCap(nativePen, nativeCap)); + end; + + function TGPPen.GetCustomEndCap(customCap: TGPCustomLineCap): TStatus; + begin + if(customCap = nil) then + result := SetStatus(InvalidParameter) + else + result := SetStatus(GdipGetPenCustomEndCap(nativePen, customCap.nativeCap)); + end; + + function TGPPen.SetMiterLimit(miterLimit: Single): TStatus; + begin + result := SetStatus(GdipSetPenMiterLimit(nativePen, miterLimit)); + end; + + function TGPPen.GetMiterLimit: Single; + begin + SetStatus(GdipGetPenMiterLimit(nativePen, result)); + end; + + function TGPPen.SetAlignment(penAlignment: TPenAlignment): TStatus; + begin + result := SetStatus(GdipSetPenMode(nativePen, penAlignment)); + end; + + function TGPPen.GetAlignment: TPenAlignment; + begin + SetStatus(GdipGetPenMode(nativePen, result)); + end; + + function TGPPen.SetTransform(matrix: TGPMatrix): TStatus; + begin + result := SetStatus(GdipSetPenTransform(nativePen, matrix.nativeMatrix)); + end; + + function TGPPen.GetTransform(matrix: TGPMatrix): TStatus; + begin + result := SetStatus(GdipGetPenTransform(nativePen, matrix.nativeMatrix)); + end; + + function TGPPen.ResetTransform: TStatus; + begin + result := SetStatus(GdipResetPenTransform(nativePen)); + end; + + function TGPPen.MultiplyTransform(matrix: TGPMatrix; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipMultiplyPenTransform(nativePen, matrix.nativeMatrix, order)); + end; + + function TGPPen.TranslateTransform(dx, dy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipTranslatePenTransform(nativePen, dx, dy, order)); + end; + + function TGPPen.ScaleTransform(sx, sy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipScalePenTransform(nativePen, sx, sy, order)); + end; + + function TGPPen.RotateTransform(angle: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipRotatePenTransform(nativePen, angle, order)); + end; + + function TGPPen.GetPenType: TPenType; + begin + SetStatus(GdipGetPenFillType(nativePen, result)); + end; + + function TGPPen.SetColor(color: TGPColor): TStatus; + begin + result := SetStatus(GdipSetPenColor(nativePen, color)); + end; + + function TGPPen.SetBrush(brush: TGPBrush): TStatus; + begin + result := SetStatus(GdipSetPenBrushFill(nativePen, brush.nativeBrush)); + end; + + function TGPPen.GetColor(out Color: TGPColor): TStatus; + var + type_: TPenType; + argb: DWORD; + begin + type_ := GetPenType; + + if (type_ <> PenTypeSolidColor) then + begin + result := WrongState; + exit; + end; + + SetStatus(GdipGetPenColor(nativePen, argb)); + if (lastResult = Ok) then color := argb; + result := lastResult; + end; + + function TGPPen.GetBrush: TGPBrush; + var + type_: TPenType; + Brush: TGPBrush; + nativeBrush: GpBrush; + begin + type_ := GetPenType; + brush := nil; + + case type_ of + PenTypeSolidColor : brush := TGPSolidBrush.Create; + PenTypeHatchFill : brush := TGPHatchBrush.Create; + PenTypeTextureFill : brush := TGPTextureBrush.Create; + PenTypePathGradient : brush := TGPBrush.Create; + PenTypeLinearGradient : brush := TGPLinearGradientBrush.Create; + end; + + if (brush <> nil) then + begin + SetStatus(GdipGetPenBrushFill(nativePen, nativeBrush)); + brush.SetNativeBrush(nativeBrush); + end; + + result := brush; + end; + + function TGPPen.GetDashStyle: TDashStyle; + begin + SetStatus(GdipGetPenDashStyle(nativePen, result)); + end; + + function TGPPen.SetDashStyle(dashStyle: TDashStyle): TStatus; + begin + result := SetStatus(GdipSetPenDashStyle(nativePen, dashStyle)); + end; + + function TGPPen.GetDashOffset: Single; + begin + SetStatus(GdipGetPenDashOffset(nativePen, result)); + end; + + function TGPPen.SetDashOffset(dashOffset: Single): TStatus; + begin + result := SetStatus(GdipSetPenDashOffset(nativePen, dashOffset)); + end; + + function TGPPen.SetDashPattern(dashArray: PSingle; count: Integer): TStatus; + begin + result := SetStatus(GdipSetPenDashArray(nativePen, dashArray, count)); + end; + + function TGPPen.GetDashPatternCount: Integer; + begin + SetStatus(GdipGetPenDashCount(nativePen, result)); + end; + + function TGPPen.GetDashPattern(dashArray: PSingle; count: Integer): TStatus; + begin + result := SetStatus(GdipGetPenDashArray(nativePen, dashArray, count)); + end; + + function TGPPen.SetCompoundArray(compoundArray: PSingle; count: Integer): TStatus; + begin + result := SetStatus(GdipSetPenCompoundArray(nativePen, compoundArray, count)); + end; + + function TGPPen.GetCompoundArrayCount: Integer; + begin + SetStatus(GdipGetPenCompoundCount(nativePen, result)); + end; + + function TGPPen.GetCompoundArray(compoundArray: PSingle; count: Integer): TStatus; + begin + if (count <= 0) then + result := SetStatus(InvalidParameter) + else + result := SetStatus(GdipGetPenCompoundArray(nativePen, compoundArray, count)); + end; + + function TGPPen.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + + constructor TGPPen.Create(nativePen: GpPen; status: TStatus); + begin + lastResult := status; + SetNativePen(nativePen); + end; + + procedure TGPPen.SetNativePen(nativePen: GpPen); + begin + self.nativePen := nativePen; + end; + + function TGPPen.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then lastResult := status; + result := status; + end; + +(**************************************************************************\ +* +* GDI+ Brush class +* +\**************************************************************************) + +//-------------------------------------------------------------------------- +// Abstract base class for various brush types +//-------------------------------------------------------------------------- + + destructor TGPBrush.Destroy; + begin + GdipDeleteBrush(nativeBrush); + end; + + function TGPBrush.Clone: TGPBrush; + var + brush: GpBrush; + newBrush: TGPBrush; + begin + brush := nil; + SetStatus(GdipCloneBrush(nativeBrush, brush)); + newBrush := TGPBrush.Create(brush, lastResult); + if (newBrush = nil) then + GdipDeleteBrush(brush); + result := newBrush; + end; + + function TGPBrush.GetType: TBrushType; + var type_: TBrushType; + begin + type_ := TBrushType(-1); + SetStatus(GdipGetBrushType(nativeBrush, type_)); + result := type_; + end; + + function TGPBrush.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + + constructor TGPBrush.Create; + begin + SetStatus(NotImplemented); + end; + + constructor TGPBrush.Create(nativeBrush: GpBrush; status: TStatus); + begin + lastResult := status; + SetNativeBrush(nativeBrush); + end; + + procedure TGPBrush.SetNativeBrush(nativeBrush: GpBrush); + begin + self.nativeBrush := nativeBrush; + end; + + function TGPBrush.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then lastResult := status; + result := status; + end; + +//-------------------------------------------------------------------------- +// Solid Fill Brush Object +//-------------------------------------------------------------------------- + + constructor TGPSolidBrush.Create(color: TGPColor); + var + brush: GpSolidFill; + begin + brush := nil; + lastResult := GdipCreateSolidFill(color, brush); + SetNativeBrush(brush); + end; + + function TGPSolidBrush.GetColor(out color: TGPColor): TStatus; + begin + SetStatus(GdipGetSolidFillColor(GPSOLIDFILL(nativeBrush), color)); + result := lastResult; + end; + + function TGPSolidBrush.SetColor(color: TGPColor): TStatus; + begin + result := SetStatus(GdipSetSolidFillColor(GpSolidFill(nativeBrush), + color)); + end; + + constructor TGPSolidBrush.Create; + begin + // hide parent function + end; + +//-------------------------------------------------------------------------- +// Texture Brush Fill Object +//-------------------------------------------------------------------------- + + constructor TGPTextureBrush.Create(image: TGPImage; wrapMode: TWrapMode = WrapModeTile); + var texture: GpTexture; + begin + //texture := nil; + lastResult := GdipCreateTexture(image.nativeImage, wrapMode, texture); + SetNativeBrush(texture); + end; + + // When creating a texture brush from a metafile image, the dstRect + // is used to specify the size that the metafile image should be + // rendered at in the device units of the destination graphics. + // It is NOT used to crop the metafile image, so only the width + // and height values matter for metafiles. + + constructor TGPTextureBrush.Create(image: TGPImage; wrapMode: TWrapMode; dstRect: TGPRectF); + var texture: GpTexture; + begin + texture := nil; + lastResult := GdipCreateTexture2(image.nativeImage, wrapMode, dstRect.X, + dstRect.Y, dstRect.Width, dstRect.Height, texture); + SetNativeBrush(texture); + end; + + constructor TGPTextureBrush.Create(image: TGPImage; dstRect: TGPRectF; imageAttributes: TGPImageAttributes = nil); + var texture: GpTexture; + ImgAtt: GpImageAttributes; + begin + texture := nil; + if assigned(imageAttributes) then ImgAtt := imageAttributes.nativeImageAttr + else ImgAtt := nil; + + lastResult := GdipCreateTextureIA(image.nativeImage, ImgAtt, dstRect.X, + dstRect.Y, dstRect.Width, dstRect.Height, texture); + SetNativeBrush(texture); + end; + + constructor TGPTextureBrush.Create(image: TGPImage; dstRect: TGPRect; imageAttributes: TGPImageAttributes = nil); + var texture: GpTexture; + ImgAtt: GpImageAttributes; + begin + texture := nil; + if assigned(imageAttributes) then ImgAtt := imageAttributes.nativeImageAttr + else ImgAtt := nil; + lastResult := GdipCreateTextureIAI(image.nativeImage, ImgAtt, dstRect.X, + dstRect.Y, dstRect.Width, dstRect.Height, texture); + SetNativeBrush(texture); + end; + + constructor TGPTextureBrush.Create(image: TGPImage; wrapMode: TWrapMode; dstRect: TGPRect); + var texture: GpTexture; + begin + texture := nil; + lastResult := GdipCreateTexture2I(image.nativeImage, wrapMode, dstRect.X, + dstRect.Y, dstRect.Width, dstRect.Height, texture); + SetNativeBrush(texture); + end; + + constructor TGPTextureBrush.Create(image: TGPImage; wrapMode: TWrapMode; dstX, dstY, dstWidth, dstHeight: Single); + var texture: GpTexture; + begin + texture := nil; + lastResult := GdipCreateTexture2(image.nativeImage, wrapMode, dstX, dstY, + dstWidth, dstHeight, texture); + SetNativeBrush(texture); + end; + + constructor TGPTextureBrush.Create(image: TGPImage; wrapMode: TWrapMode; dstX, dstY, dstWidth, dstHeight: Integer); + var texture: GpTexture; + begin + texture := nil; + lastResult := GdipCreateTexture2I(image.nativeImage, wrapMode, dstX, dstY, + dstWidth, dstHeight, texture); + SetNativeBrush(texture); + end; + + function TGPTextureBrush.SetTransform(matrix: TGPMatrix): TStatus; + begin + result := SetStatus(GdipSetTextureTransform(GpTexture(nativeBrush), + matrix.nativeMatrix)); + end; + + function TGPTextureBrush.GetTransform(matrix: TGPMatrix): TStatus; + begin + result := SetStatus(GdipGetTextureTransform(GpTexture(nativeBrush), + matrix.nativeMatrix)); + end; + + function TGPTextureBrush.ResetTransform: TStatus; + begin + result := SetStatus(GdipResetTextureTransform(GpTexture(nativeBrush))); + end; + + function TGPTextureBrush.MultiplyTransform(matrix: TGPMatrix; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipMultiplyTextureTransform(GpTexture(nativeBrush), + matrix.nativeMatrix, order)); + end; + + function TGPTextureBrush.TranslateTransform(dx, dy: Single; order: MatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipTranslateTextureTransform(GpTexture(nativeBrush), + dx, dy, order)); + end; + + function TGPTextureBrush.ScaleTransform(sx, sy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipScaleTextureTransform(GpTexture(nativeBrush), + sx, sy, order)); + end; + + function TGPTextureBrush.RotateTransform(angle: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipRotateTextureTransform(GpTexture(nativeBrush), + angle, order)); + end; + + function TGPTextureBrush.SetWrapMode(wrapMode: TWrapMode): TStatus; + begin + result := SetStatus(GdipSetTextureWrapMode(GpTexture(nativeBrush), wrapMode)); + end; + + function TGPTextureBrush.GetWrapMode: TWrapMode; + begin + SetStatus(GdipGetTextureWrapMode(GpTexture(nativeBrush), result)); + end; + + function TGPTextureBrush.GetImage: TGPImage; + var image: GpImage; + begin + SetStatus(GdipGetTextureImage(GpTexture(nativeBrush), image)); + result := TGPImage.Create(image, lastResult); + if (result = nil) then + GdipDisposeImage(image); + end; + + constructor TGPTextureBrush.Create; + begin + // hide parent function + end; + +//-------------------------------------------------------------------------- +// Linear Gradient Brush Object +//-------------------------------------------------------------------------- + + constructor TGPLinearGradientBrush.Create(const point1, point2: TGPPointF; color1, color2: TGPColor); + var brush: GpLineGradient; + begin + brush := nil; + lastResult := GdipCreateLineBrush(@point1, @point2, color1, color2, WrapModeTile, brush); + SetNativeBrush(brush); + end; + + constructor TGPLinearGradientBrush.Create(const point1, point2: TGPPoint; color1, color2: TGPColor); + var brush: GpLineGradient; + begin + brush := nil; + lastResult := GdipCreateLineBrushI(@point1, @point2, color1, + color2, WrapModeTile, brush); + SetNativeBrush(brush); + end; + + constructor TGPLinearGradientBrush.Create(rect: TGPRectF; color1, color2: TGPColor; mode: TLinearGradientMode); + var brush: GpLineGradient; + begin + brush := nil; + lastResult := GdipCreateLineBrushFromRect(@rect, color1, + color2, mode, WrapModeTile, brush); + SetNativeBrush(brush); + end; + + constructor TGPLinearGradientBrush.Create(rect: TGPRect; color1, color2: TGPColor; mode: TLinearGradientMode); + var brush: GpLineGradient; + begin + brush := nil; + lastResult := GdipCreateLineBrushFromRectI(@rect, color1, + color2, mode, WrapModeTile, brush); + SetNativeBrush(brush); + end; + + constructor TGPLinearGradientBrush.Create(rect: TGPRectF; color1, color2: TGPColor; angle: Single; isAngleScalable: BOOL = FALSE); + var brush: GpLineGradient; + begin + brush := nil; + lastResult := GdipCreateLineBrushFromRectWithAngle(@rect, color1, + color2, angle, isAngleScalable, WrapModeTile, brush); + SetNativeBrush(brush); + end; + + constructor TGPLinearGradientBrush.Create(rect: TGPRect; color1, color2: TGPColor; angle: Single; isAngleScalable: BOOL = FALSE); + var brush: GpLineGradient; + begin + brush := nil; + lastResult := GdipCreateLineBrushFromRectWithAngleI(@rect, color1, + color2, angle, isAngleScalable, WrapModeTile, brush); + SetNativeBrush(brush); + end; + + function TGPLinearGradientBrush.SetLinearColors(color1, color2: TGPColor): TStatus; + begin + result := SetStatus(GdipSetLineColors(GpLineGradient(nativeBrush), + color1, color2)); + end; + + function TGPLinearGradientBrush.GetLinearColors(out color1, color2: TGPColor): TStatus; + var colors: array[0..1] of TGPColor; + begin + SetStatus(GdipGetLineColors(GpLineGradient(nativeBrush), @colors)); + if (lastResult = Ok) then + begin + color1 := colors[0]; + color2 := colors[1]; + end; + result := lastResult; + end; + + function TGPLinearGradientBrush.GetRectangle(out rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipGetLineRect(GpLineGradient(nativeBrush), @rect)); + end; + + function TGPLinearGradientBrush.GetRectangle(out rect: TGPRect): TStatus; + begin + result := SetStatus(GdipGetLineRectI(GpLineGradient(nativeBrush), @rect)); + end; + + function TGPLinearGradientBrush.SetGammaCorrection(useGammaCorrection: BOOL): TStatus; + begin + result := SetStatus(GdipSetLineGammaCorrection(GpLineGradient(nativeBrush), + useGammaCorrection)); + end; + + function TGPLinearGradientBrush.GetGammaCorrection: BOOL; + var useGammaCorrection: BOOL; + begin + SetStatus(GdipGetLineGammaCorrection(GpLineGradient(nativeBrush), + useGammaCorrection)); + result := useGammaCorrection; + end; + + function TGPLinearGradientBrush.GetBlendCount: Integer; + var count: Integer; + begin + count := 0; + SetStatus(GdipGetLineBlendCount(GpLineGradient(nativeBrush), count)); + result := count; + end; + + function TGPLinearGradientBrush.SetBlend(blendFactors, blendPositions: PSingle; count: Integer): TStatus; + begin + result := SetStatus(GdipSetLineBlend(GpLineGradient(nativeBrush), + blendFactors, blendPositions, count)); + end; + + function TGPLinearGradientBrush.GetBlend(blendFactors, blendPositions: PSingle; count: Integer): TStatus; + begin + if ((count <= 0) or (blendFactors = nil) or (blendPositions = nil)) then + result := SetStatus(InvalidParameter) + else + result := SetStatus(GdipGetLineBlend(GpLineGradient(nativeBrush), blendFactors, + blendPositions, count)); + end; + + function TGPLinearGradientBrush.GetInterpolationColorCount: Integer; + var count: Integer; + begin + count := 0; + SetStatus(GdipGetLinePresetBlendCount(GpLineGradient(nativeBrush), count)); + result := count; + end; + + function TGPLinearGradientBrush.SetInterpolationColors(presetColors: PGPColor; + blendPositions: PSingle; count: Integer): TStatus; + begin + if (count <= 0) then + result := SetStatus(InvalidParameter) + else + result := SetStatus(GdipSetLinePresetBlend(GpLineGradient(nativeBrush), + PARGB(presetColors), blendPositions, count)); + end; + + function TGPLinearGradientBrush.GetInterpolationColors(presetColors: PGPColor; blendPositions: PSingle; count: Integer): TStatus; + begin + if (count <= 0) then + result := SetStatus(InvalidParameter) + else + result := SetStatus(GdipGetLinePresetBlend(GpLineGradient(nativeBrush), + PARGB(presetColors), blendPositions, count)); + end; + + function TGPLinearGradientBrush.SetBlendBellShape(focus: Single; scale: Single = 1.0): TStatus; + begin + result := SetStatus(GdipSetLineSigmaBlend(GpLineGradient(nativeBrush), focus, scale)); + end; + + function TGPLinearGradientBrush.SetBlendTriangularShape(focus: Single; scale: Single = 1.0): TStatus; + begin + result := SetStatus(GdipSetLineLinearBlend(GpLineGradient(nativeBrush), focus, scale)); + end; + + function TGPLinearGradientBrush.SetTransform(matrix: TGPMatrix): TStatus; + begin + result := SetStatus(GdipSetLineTransform(GpLineGradient(nativeBrush), + matrix.nativeMatrix)); + end; + + function TGPLinearGradientBrush.GetTransform(matrix: TGPMatrix): TStatus; + begin + result := SetStatus(GdipGetLineTransform(GpLineGradient(nativeBrush), + matrix.nativeMatrix)); + end; + + function TGPLinearGradientBrush.ResetTransform: TStatus; + begin + result := SetStatus(GdipResetLineTransform(GpLineGradient(nativeBrush))); + end; + + function TGPLinearGradientBrush.MultiplyTransform(matrix: TGPMatrix; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipMultiplyLineTransform(GpLineGradient(nativeBrush), + matrix.nativeMatrix, + order)); + end; + + function TGPLinearGradientBrush.TranslateTransform(dx, dy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipTranslateLineTransform(GpLineGradient(nativeBrush), + dx, dy, order)); + end; + + function TGPLinearGradientBrush.ScaleTransform(sx, sy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipScaleLineTransform(GpLineGradient(nativeBrush), + sx, sy, order)); + end; + + function TGPLinearGradientBrush.RotateTransform(angle: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipRotateLineTransform(GpLineGradient(nativeBrush), + angle, order)); + end; + + function TGPLinearGradientBrush.SetWrapMode(wrapMode: TWrapMode): TStatus; + begin + result := SetStatus(GdipSetLineWrapMode(GpLineGradient(nativeBrush), wrapMode)); + end; + + function TGPLinearGradientBrush.GetWrapMode: TWrapMode; + begin + SetStatus(GdipGetLineWrapMode(GpLineGradient(nativeBrush), result)); + end; + + constructor TGPLinearGradientBrush.Create; + begin + // hide parent function + end; + +//-------------------------------------------------------------------------- +// Hatch Brush Object +//-------------------------------------------------------------------------- + + constructor TGPHatchBrush.Create(hatchStyle: THatchStyle; foreColor: TGPColor; backColor: TGPColor = aclBlack); + var + brush: GpHatch; + begin + brush := nil; + lastResult := GdipCreateHatchBrush(Integer(hatchStyle), foreColor, backColor, brush); + SetNativeBrush(brush); + end; + + function TGPHatchBrush.GetHatchStyle: THatchStyle; + begin + SetStatus(GdipGetHatchStyle(GpHatch(nativeBrush), result)); + end; + + function TGPHatchBrush.GetForegroundColor(out color: TGPColor): TStatus; + begin + result := SetStatus(GdipGetHatchForegroundColor(GpHatch(nativeBrush), color)); + end; + + function TGPHatchBrush.GetBackgroundColor(out color: TGPColor): TStatus; + begin + result := SetStatus(GdipGetHatchBackgroundColor(GpHatch(nativeBrush), color)); + end; + + constructor TGPHatchBrush.Create; + begin + end; + + constructor TGPImage.Create(filename: WideString; + useEmbeddedColorManagement: BOOL = FALSE); + begin + nativeImage := nil; + if(useEmbeddedColorManagement) then + begin + lastResult := GdipLoadImageFromFileICM( + PWideChar(filename), + nativeImage + ); + end + else + begin + lastResult := GdipLoadImageFromFile( + PWideChar(filename), + nativeImage + ); + end; + end; + + constructor TGPImage.Create(stream: IStream; + useEmbeddedColorManagement: BOOL = FALSE); + begin + nativeImage := nil; + if(useEmbeddedColorManagement) then + lastResult := GdipLoadImageFromStreamICM(stream, nativeImage) + else lastResult := GdipLoadImageFromStream(stream, nativeImage); + end; + + function TGPImage.FromFile(filename: WideString; + useEmbeddedColorManagement: BOOL = FALSE): TGPImage; + begin + result := TGPImage.Create( + PWideChar(filename), + useEmbeddedColorManagement + ); + end; + + function TGPImage.FromStream(stream: IStream; + useEmbeddedColorManagement: BOOL = FALSE): TGPImage; + begin + result := TGPImage.Create( + stream, + useEmbeddedColorManagement + ); + end; + + destructor TGPImage.destroy; + begin + GdipDisposeImage(nativeImage); + end; + + function TGPImage.Clone: TGPImage; + var cloneimage: GpImage; + begin + cloneimage := nil; + SetStatus(GdipCloneImage(nativeImage, cloneimage)); + result := TGPImage.Create(cloneimage, lastResult); + end; + + function TGPImage.Save(filename: WideString; const clsidEncoder: TGUID; + encoderParams: PEncoderParameters = nil): TStatus; + begin + result := SetStatus(GdipSaveImageToFile(nativeImage, + PWideChar(filename), + @clsidEncoder, + encoderParams)); + end; + + function TGPImage.Save(stream: IStream; const clsidEncoder: TGUID; + encoderParams: PEncoderParameters = nil): TStatus; + begin + result := SetStatus(GdipSaveImageToStream(nativeImage, + stream, + @clsidEncoder, + encoderParams)); + end; + + function TGPImage.SaveAdd(encoderParams: PEncoderParameters): TStatus; + begin + result := SetStatus(GdipSaveAdd(nativeImage, + encoderParams)); + end; + + function TGPImage.SaveAdd(newImage: TGPImage; + encoderParams: PEncoderParameters): TStatus; + begin + if (newImage = nil) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + result := SetStatus(GdipSaveAddImage(nativeImage, + newImage.nativeImage, + encoderParams)); + end; + + function TGPImage.GetType: TImageType; + begin + SetStatus(GdipGetImageType(nativeImage, result)); + end; + + function TGPImage.GetPhysicalDimension(out size: TGPSizeF): TStatus; + var + width, height: Single; + status: TStatus; + begin + status := SetStatus(GdipGetImageDimension(nativeImage, width, height)); + size.Width := width; + size.Height := height; + result := status; + end; + + function TGPImage.GetBounds(out srcRect: TGPRectF; out srcUnit: TUnit): TStatus; + begin + result := SetStatus(GdipGetImageBounds(nativeImage, @srcRect, srcUnit)); + end; + + function TGPImage.GetWidth: UINT; + var width: UINT; + begin + width := 0; + SetStatus(GdipGetImageWidth(nativeImage, width)); + result := width; + end; + + function TGPImage.GetHeight: UINT; + var height: UINT; + begin + height := 0; + SetStatus(GdipGetImageHeight(nativeImage, height)); + result := height; + end; + + function TGPImage.GetHorizontalResolution: Single; + var resolution: Single; + begin + resolution := 0.0; + SetStatus(GdipGetImageHorizontalResolution(nativeImage, resolution)); + result := resolution; + end; + + function TGPImage.GetVerticalResolution: Single; + var resolution: Single; + begin + resolution := 0.0; + SetStatus(GdipGetImageVerticalResolution(nativeImage, resolution)); + result := resolution; + end; + + function TGPImage.GetFlags: UINT; + var flags: UINT; + begin + flags := 0; + SetStatus(GdipGetImageFlags(nativeImage, flags)); + result := flags; + end; + + function TGPImage.GetRawFormat(out format: TGUID): TStatus; + begin + result := SetStatus(GdipGetImageRawFormat(nativeImage, @format)); + end; + + function TGPImage.GetPixelFormat: TPixelFormat; + begin + SetStatus(GdipGetImagePixelFormat(nativeImage, result)); + end; + + function TGPImage.GetPaletteSize: Integer; + var size: Integer; + begin + size := 0; + SetStatus(GdipGetImagePaletteSize(nativeImage, size)); + result := size; + end; + + function TGPImage.GetPalette(palette: PColorPalette; size: Integer): TStatus; + begin + result := SetStatus(GdipGetImagePalette(nativeImage, palette, size)); + end; + + function TGPImage.SetPalette(palette: PColorPalette): TStatus; + begin + result := SetStatus(GdipSetImagePalette(nativeImage, palette)); + end; + + function TGPImage.GetThumbnailImage(thumbWidth, thumbHeight: UINT; + callback: GetThumbnailImageAbort = nil; + callbackData: pointer = nil): TGPImage; + var + thumbimage: GpImage; + newImage: TGPImage; + begin + thumbimage := nil; + SetStatus(GdipGetImageThumbnail(nativeImage, + thumbWidth, thumbHeight, + thumbimage, + callback, callbackData)); + + newImage := TGPImage.Create(thumbimage, lastResult); + if (newImage = nil) then + GdipDisposeImage(thumbimage); + + result := newImage; + end; + + function TGPImage.GetFrameDimensionsCount: UINT; + var count: UINT; + begin + count := 0; + SetStatus(GdipImageGetFrameDimensionsCount(nativeImage, count)); + result := count; + end; + + function TGPImage.GetFrameDimensionsList(dimensionIDs: PGUID; count: UINT): TStatus; + begin + result := SetStatus(GdipImageGetFrameDimensionsList(nativeImage, dimensionIDs, count)); + end; + + function TGPImage.GetFrameCount(const dimensionID: TGUID): UINT; + var count: UINT; + begin + count := 0; + SetStatus(GdipImageGetFrameCount(nativeImage, @dimensionID, count)); + result := count; + end; + + function TGPImage.SelectActiveFrame(const dimensionID: TGUID; frameIndex: UINT): TStatus; + begin + result := SetStatus(GdipImageSelectActiveFrame(nativeImage, + @dimensionID, + frameIndex)); + end; + + function TGPImage.RotateFlip(rotateFlipType: TRotateFlipType): TStatus; + begin + result := SetStatus(GdipImageRotateFlip(nativeImage, + rotateFlipType)); + end; + + function TGPImage.GetPropertyCount: UINT; + var numProperty: UINT; + begin + numProperty := 0; + SetStatus(GdipGetPropertyCount(nativeImage, numProperty)); + result := numProperty; + end; + + function TGPImage.GetPropertyIdList(numOfProperty: UINT; list: PPropID): TStatus; + begin + result := SetStatus(GdipGetPropertyIdList(nativeImage, numOfProperty, list)); + end; + + function TGPImage.GetPropertyItemSize(propId: PROPID): UINT; + var size: UINT; + begin + size := 0; + SetStatus(GdipGetPropertyItemSize(nativeImage, propId, size)); + result := size; + end; + + function TGPImage.GetPropertyItem(propId: PROPID; propSize: UINT; + buffer: PPropertyItem): TStatus; + begin + result := SetStatus(GdipGetPropertyItem(nativeImage, + propId, propSize, buffer)); + end; + + function TGPImage.GetPropertySize(out totalBufferSize, numProperties : UINT): TStatus; + begin + result := SetStatus(GdipGetPropertySize(nativeImage, + totalBufferSize, + numProperties)); + end; + + function TGPImage.GetAllPropertyItems(totalBufferSize, numProperties: UINT; + allItems: PPROPERTYITEM): TStatus; + begin + result := SetStatus(GdipGetAllPropertyItems(nativeImage, + totalBufferSize, + numProperties, + allItems)); + end; + + function TGPImage.RemovePropertyItem(propId: TPROPID): TStatus; + begin + result := SetStatus(GdipRemovePropertyItem(nativeImage, propId)); + end; + + function TGPImage.SetPropertyItem(const item: TPropertyItem): TStatus; + begin + result := SetStatus(GdipSetPropertyItem(nativeImage, @item)); + end; + + function TGPImage.GetEncoderParameterListSize(const clsidEncoder: TGUID): UINT; + var size: UINT; + begin + size := 0; + SetStatus(GdipGetEncoderParameterListSize(nativeImage, @clsidEncoder, size)); + result := size; + end; + + function TGPImage.GetEncoderParameterList(const clsidEncoder: TGUID; size: UINT; + buffer: PEncoderParameters): TStatus; + begin + result := SetStatus(GdipGetEncoderParameterList(nativeImage, + @clsidEncoder, + size, + buffer)); + end; + + function TGPImage.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + + constructor TGPImage.Create(nativeImage: GpImage; status: TStatus); + begin + SetNativeImage(nativeImage); + lastResult := status; + end; + + procedure TGPImage.SetNativeImage(nativeImage: GpImage); + begin + self.nativeImage := nativeImage; + end; + + function TGPImage.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then lastResult := status; + result := status; + end; + + // TGPBitmap + + constructor TGPBitmap.Create(filename: WideString; useEmbeddedColorManagement: BOOL = FALSE); + var bitmap: GpBitmap; + begin + bitmap := nil; + if(useEmbeddedColorManagement) then + lastResult := GdipCreateBitmapFromFileICM(PWideChar(filename), bitmap) + else + lastResult := GdipCreateBitmapFromFile(PWideChar(filename), bitmap); + SetNativeImage(bitmap); + end; + + constructor TGPBitmap.Create(stream: IStream; useEmbeddedColorManagement: BOOL = FALSE); + var bitmap: GpBitmap; + begin + bitmap := nil; + if(useEmbeddedColorManagement) then + lastResult := GdipCreateBitmapFromStreamICM(stream, bitmap) + else + lastResult := GdipCreateBitmapFromStream(stream, bitmap); + SetNativeImage(bitmap); + end; + + function TGPBitmap.FromFile(filename: WideString; useEmbeddedColorManagement: BOOL = FALSE): TGPBitmap; + begin + result := TGPBitmap.Create( + PWideChar(filename), + useEmbeddedColorManagement + ); + end; + + function TGPBitmap.FromStream(stream: IStream; useEmbeddedColorManagement: BOOL = FALSE): TGPBitmap; + begin + result := TGPBitmap.Create( + stream, + useEmbeddedColorManagement + ); + end; + + constructor TGPBitmap.Create(width, height, stride: Integer; format: TPixelFormat; scan0: PBYTE); + var bitmap: GpBitmap; + begin + bitmap := nil; + lastResult := GdipCreateBitmapFromScan0(width, + height, + stride, + format, + scan0, + bitmap); + + SetNativeImage(bitmap); + end; + + constructor TGPBitmap.Create(width, height: Integer; format: TPixelFormat = PixelFormat32bppARGB); + var bitmap: GpBitmap; + begin + bitmap := nil; + lastResult := GdipCreateBitmapFromScan0(width, + height, + 0, + format, + nil, + bitmap); + + SetNativeImage(bitmap); + end; + + constructor TGPBitmap.Create(width, height: Integer; target: TGPGraphics); + var bitmap: GpBitmap; + begin + bitmap := nil; + lastResult := GdipCreateBitmapFromGraphics(width, + height, + target.nativeGraphics, + bitmap); + + SetNativeImage(bitmap); + end; + + function TGPBitmap.Clone(rect: TGPRect; format: TPixelFormat): TGPBitmap; + begin + result := Clone(rect.X, rect.Y, rect.Width, rect.Height, format); + end; + + function TGPBitmap.Clone(x, y, width, height: Integer; format: TPixelFormat): TGPBitmap; + var + bitmap: TGPBitmap; + gpdstBitmap: GpBitmap; + begin + gpdstBitmap := nil; + lastResult := GdipCloneBitmapAreaI( + x, + y, + width, + height, + format, + GpBitmap(nativeImage), + gpdstBitmap); + + if (lastResult = Ok) then + begin + bitmap := TGPBitmap.Create(gpdstBitmap); + if (bitmap = nil) then + GdipDisposeImage(gpdstBitmap); + result := bitmap; + exit; + end + else + result := nil; + end; + + function TGPBitmap.Clone(rect: TGPRectF; format: TPixelFormat): TGPBitmap; + begin + result := Clone(rect.X, rect.Y, rect.Width, rect.Height, format); + end; + + function TGPBitmap.Clone(x, y, width, height: Single; format: TPixelFormat): TGPBitmap; + var + bitmap: TGPBitmap; + gpdstBitmap: GpBitmap; + begin + gpdstBitmap := nil; + SetStatus(GdipCloneBitmapArea( + x, + y, + width, + height, + format, + GpBitmap(nativeImage), + gpdstBitmap)); + + if (lastResult = Ok) then + begin + bitmap := TGPBitmap.Create(gpdstBitmap); + if (bitmap = nil) then + GdipDisposeImage(gpdstBitmap); + result := bitmap; + end + else + result := nil; + end; + + function TGPBitmap.LockBits(rect: TGPRect; flags: UINT; format: TPixelFormat; + out lockedBitmapData: TBitmapData): TStatus; + begin + result := SetStatus(GdipBitmapLockBits( + GpBitmap(nativeImage), + @rect, + flags, + format, + @lockedBitmapData)); + end; + + function TGPBitmap.UnlockBits(var lockedBitmapData: TBitmapData): TStatus; + begin + result := SetStatus(GdipBitmapUnlockBits( + GpBitmap(nativeImage), + @lockedBitmapData)); + end; + + function TGPBitmap.GetPixel(x, y: Integer; out color: TGPColor): TStatus; + begin + result := SetStatus(GdipBitmapGetPixel(GpBitmap(nativeImage), x, y, color)); + end; + + function TGPBitmap.SetPixel(x, y: Integer; color: TGPColor): TStatus; + begin + result := SetStatus(GdipBitmapSetPixel( + GpBitmap(nativeImage), + x, y, + color)); + end; + + function TGPBitmap.SetResolution(xdpi, ydpi: Single): TStatus; + begin + result := SetStatus(GdipBitmapSetResolution( + GpBitmap(nativeImage), + xdpi, ydpi)); + end; + + constructor TGPBitmap.Create(var gdiBitmapInfo: TBITMAPINFO; gdiBitmapData: Pointer); + var bitmap: GpBitmap; + begin + bitmap := nil; + lastResult := GdipCreateBitmapFromGdiDib(@gdiBitmapInfo, gdiBitmapData, bitmap); + SetNativeImage(bitmap); + end; + + constructor TGPBitmap.Create(hbm: HBITMAP; hpal: HPALETTE); + var bitmap: GpBitmap; + begin + bitmap := nil; + lastResult := GdipCreateBitmapFromHBITMAP(hbm, hpal, bitmap); + SetNativeImage(bitmap); + end; + + constructor TGPBitmap.Create(hicon: HICON); + var bitmap: GpBitmap; + begin + bitmap := nil; + lastResult := GdipCreateBitmapFromHICON(hicon, bitmap); + SetNativeImage(bitmap); + end; + + constructor TGPBitmap.Create(hInstance: HMODULE; bitmapName: WideString); + var bitmap: GpBitmap; + begin + bitmap := nil; + lastResult := GdipCreateBitmapFromResource(hInstance, PWideChar(bitmapName), bitmap); + SetNativeImage(bitmap); + end; + + function TGPBitmap.FromBITMAPINFO(var gdiBitmapInfo: TBITMAPINFO; gdiBitmapData: Pointer): TGPBitmap; + begin + result := TGPBitmap.Create(gdiBitmapInfo, gdiBitmapData); + end; + + function TGPBitmap.FromHBITMAP(hbm: HBITMAP; hpal: HPALETTE): TGPBitmap; + begin + result := TGPBitmap.Create(hbm, hpal); + end; + + function TGPBitmap.FromHICON(hicon: HICON): TGPBitmap; + begin + result := TGPBitmap.Create(hicon); + end; + + function TGPBitmap.FromResource(hInstance: HMODULE; bitmapName: WideString): TGPBitmap; + begin + result := TGPBitmap.Create(hInstance, PWideChar(bitmapName)); + end; + + function TGPBitmap.GetHBITMAP(colorBackground: TGPColor; out hbmreturn: HBITMAP): TStatus; + begin + result := SetStatus(GdipCreateHBITMAPFromBitmap( + GpBitmap(nativeImage), + hbmreturn, + colorBackground)); + end; + + function TGPBitmap.GetHICON(out hicon: HICON): TStatus; + begin + result := SetStatus(GdipCreateHICONFromBitmap( + GpBitmap(nativeImage), + hicon)); + end; + + constructor TGPBitmap.Create(nativeBitmap: GpBitmap); + begin + lastResult := Ok; + SetNativeImage(nativeBitmap); + end; + +(**************************************************************************\ +* +* GDI+ Graphics Object +* +\**************************************************************************) + + function TGPGraphics.FromHDC(hdc: HDC): TGPGraphics; + begin + result := TGPGraphics.Create(hdc); + end; + + function TGPGraphics.FromHDC(hdc: HDC; hdevice: THANDLE): TGPGraphics; + begin + result := TGPGraphics.Create(hdc, hdevice); + end; + + function TGPGraphics.FromHWND(hwnd: HWND; icm: BOOL = FALSE): TGPGraphics; + begin + result := TGPGraphics.Create(hwnd, icm); + end; + + function TGPGraphics.FromImage(image: TGPImage): TGPGraphics; + begin + result := TGPGraphics.Create(image); + end; + + constructor TGPGraphics.Create(hdc: HDC); + var graphics: GpGraphics; + begin + graphics:= nil; + lastResult := GdipCreateFromHDC(hdc, graphics); + SetNativeGraphics(graphics); + end; + + constructor TGPGraphics.Create(hdc: HDC; hdevice: THANDLE); + var graphics: GpGraphics; + begin + graphics:= nil; + lastResult := GdipCreateFromHDC2(hdc, hdevice, graphics); + SetNativeGraphics(graphics); + end; + + constructor TGPGraphics.Create(hwnd: HWND; icm: BOOL{ = FALSE}); + var graphics: GpGraphics; + begin + graphics:= nil; + if icm then lastResult := GdipCreateFromHWNDICM(hwnd, graphics) + else lastResult := GdipCreateFromHWND(hwnd, graphics); + SetNativeGraphics(graphics); + end; + + constructor TGPGraphics.Create(image: TGPImage); + var graphics: GpGraphics; + begin + graphics:= nil; + if (image <> nil) then + lastResult := GdipGetImageGraphicsContext(image.nativeImage, graphics); + SetNativeGraphics(graphics); + end; + + destructor TGPGraphics.destroy; + begin + GdipDeleteGraphics(nativeGraphics); + end; + + procedure TGPGraphics.Flush(intention: TFlushIntention = FlushIntentionFlush); + begin + GdipFlush(nativeGraphics, intention); + end; + + //------------------------------------------------------------------------ + // GDI Interop methods + //------------------------------------------------------------------------ + + // Locks the graphics until ReleaseDC is called + + function TGPGraphics.GetHDC: HDC; + begin + SetStatus(GdipGetDC(nativeGraphics, result)); + end; + + procedure TGPGraphics.ReleaseHDC(hdc: HDC); + begin + SetStatus(GdipReleaseDC(nativeGraphics, hdc)); + end; + + //------------------------------------------------------------------------ + // Rendering modes + //------------------------------------------------------------------------ + + function TGPGraphics.SetRenderingOrigin(x, y: Integer): TStatus; + begin + result := SetStatus(GdipSetRenderingOrigin(nativeGraphics, x, y)); + end; + + function TGPGraphics.GetRenderingOrigin(out x, y: Integer): TStatus; + begin + result := SetStatus(GdipGetRenderingOrigin(nativeGraphics, x, y)); + end; + + function TGPGraphics.SetCompositingMode(compositingMode: TCompositingMode): TStatus; + begin + result := SetStatus(GdipSetCompositingMode(nativeGraphics, + compositingMode)); + end; + + function TGPGraphics.GetCompositingMode: TCompositingMode; + begin + SetStatus(GdipGetCompositingMode(nativeGraphics, result)); + end; + + function TGPGraphics.SetCompositingQuality(compositingQuality: TCompositingQuality): TStatus; + begin + result := SetStatus(GdipSetCompositingQuality( nativeGraphics, compositingQuality)); + end; + + function TGPGraphics.GetCompositingQuality: TCompositingQuality; + begin + SetStatus(GdipGetCompositingQuality(nativeGraphics, result)); + end; + + function TGPGraphics.SetTextRenderingHint(newMode: TTextRenderingHint): TStatus; + begin + result := SetStatus(GdipSetTextRenderingHint(nativeGraphics, newMode)); + end; + + function TGPGraphics.GetTextRenderingHint: TTextRenderingHint; + begin + SetStatus(GdipGetTextRenderingHint(nativeGraphics, result)); + end; + + function TGPGraphics.SetTextContrast(contrast: UINT): TStatus; + begin + result := SetStatus(GdipSetTextContrast(nativeGraphics, contrast)); + end; + + function TGPGraphics.GetTextContrast: UINT; + begin + SetStatus(GdipGetTextContrast(nativeGraphics, result)); + end; + + function TGPGraphics.GetInterpolationMode: TInterpolationMode; + var mode: TInterpolationMode; + begin + mode := InterpolationModeInvalid; + SetStatus(GdipGetInterpolationMode(nativeGraphics, mode)); + result := mode; + end; + + function TGPGraphics.SetInterpolationMode(interpolationMode: TInterpolationMode): TStatus; + begin + result := SetStatus(GdipSetInterpolationMode(nativeGraphics, + interpolationMode)); + end; + + function TGPGraphics.GetSmoothingMode: TSmoothingMode; + var smoothingMode: TSmoothingMode; + begin + smoothingMode := SmoothingModeInvalid; + SetStatus(GdipGetSmoothingMode(nativeGraphics, smoothingMode)); + result := smoothingMode; + end; + + function TGPGraphics.SetSmoothingMode(smoothingMode: TSmoothingMode): TStatus; + begin + result := SetStatus(GdipSetSmoothingMode(nativeGraphics, smoothingMode)); + end; + + function TGPGraphics.GetPixelOffsetMode: TPixelOffsetMode; + var pixelOffsetMode: TPixelOffsetMode; + begin + pixelOffsetMode := PixelOffsetModeInvalid; + SetStatus(GdipGetPixelOffsetMode(nativeGraphics, pixelOffsetMode)); + result := pixelOffsetMode; + end; + + function TGPGraphics.SetPixelOffsetMode(pixelOffsetMode: TPixelOffsetMode): TStatus; + begin + result := SetStatus(GdipSetPixelOffsetMode(nativeGraphics, pixelOffsetMode)); + end; + + //------------------------------------------------------------------------ + // Manipulate current world transform + //------------------------------------------------------------------------ + + function TGPGraphics.SetTransform(matrix: TGPMatrix): TStatus; + begin + result := SetStatus(GdipSetWorldTransform(nativeGraphics, matrix.nativeMatrix)); + end; + + function TGPGraphics.ResetTransform: TStatus; + begin + result := SetStatus(GdipResetWorldTransform(nativeGraphics)); + end; + + function TGPGraphics.MultiplyTransform(matrix: TGPMatrix; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipMultiplyWorldTransform(nativeGraphics, + matrix.nativeMatrix, + order)); + end; + + function TGPGraphics.TranslateTransform(dx, dy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipTranslateWorldTransform(nativeGraphics, + dx, dy, order)); + end; + + function TGPGraphics.ScaleTransform(sx, sy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipScaleWorldTransform(nativeGraphics, + sx, sy, order)); + end; + + function TGPGraphics.RotateTransform(angle: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipRotateWorldTransform(nativeGraphics, + angle, order)); + end; + + function TGPGraphics.GetTransform(matrix: TGPMatrix): TStatus; + begin + result := SetStatus(GdipGetWorldTransform(nativeGraphics, + matrix.nativeMatrix)); + end; + + function TGPGraphics.SetPageUnit(unit_: TUnit): TStatus; + begin + result := SetStatus(GdipSetPageUnit(nativeGraphics, + unit_)); + end; + + function TGPGraphics.SetPageScale(scale: Single): TStatus; + begin + result := SetStatus(GdipSetPageScale(nativeGraphics, + scale)); + end; + + function TGPGraphics.GetPageUnit: TUnit; + begin + SetStatus(GdipGetPageUnit(nativeGraphics, result)); + end; + + function TGPGraphics.GetPageScale: Single; + begin + SetStatus(GdipGetPageScale(nativeGraphics, result)); + end; + + function TGPGraphics.GetDpiX: Single; + begin + SetStatus(GdipGetDpiX(nativeGraphics, result)); + end; + + function TGPGraphics.GetDpiY: Single; + begin + SetStatus(GdipGetDpiY(nativeGraphics, result)); + end; + + function TGPGraphics.TransformPoints(destSpace: TCoordinateSpace; + srcSpace: TCoordinateSpace; + pts: PGPPointF; + count: Integer): TStatus; + begin + result := SetStatus(GdipTransformPoints(nativeGraphics, + destSpace, + srcSpace, + pts, + count)); + end; + + function TGPGraphics.TransformPoints(destSpace: TCoordinateSpace; + srcSpace: TCoordinateSpace; + pts: PGPPoint; + count: Integer): TStatus; + begin + + result := SetStatus(GdipTransformPointsI(nativeGraphics, + destSpace, + srcSpace, + pts, + count)); + end; + + //------------------------------------------------------------------------ + // GetNearestColor (for <= 8bpp surfaces). Note: Alpha is ignored. + //------------------------------------------------------------------------ + + function TGPGraphics.GetNearestColor(var color: TGPColor): TStatus; + begin + result := SetStatus(GdipGetNearestColor(nativeGraphics, @color)); + end; + + function TGPGraphics.DrawLine(pen: TGPPen; x1, y1, x2, y2: Single): TStatus; + begin + result := SetStatus(GdipDrawLine(nativeGraphics, + pen.nativePen, x1, y1, x2, + y2)); + end; + + function TGPGraphics.DrawLine(pen: TGPPen; const pt1, pt2: TGPPointF): TStatus; + begin + result := DrawLine(pen, pt1.X, pt1.Y, pt2.X, pt2.Y); + end; + + function TGPGraphics.DrawLines(pen: TGPPen; points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawLines(nativeGraphics, + pen.nativePen, + points, count)); + end; + + function TGPGraphics.DrawLine(pen: TGPPen; x1, y1, x2, y2: Integer): TStatus; + begin + result := SetStatus(GdipDrawLineI(nativeGraphics, + pen.nativePen, + x1, + y1, + x2, + y2)); + end; + + function TGPGraphics.DrawLine(pen: TGPPen; const pt1, pt2: TGPPoint): TStatus; + begin + result := DrawLine(pen, + pt1.X, + pt1.Y, + pt2.X, + pt2.Y); + end; + + function TGPGraphics.DrawLines(pen: TGPPen; points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawLinesI(nativeGraphics, + pen.nativePen, + points, + count)); + end; + + function TGPGraphics.DrawArc(pen: TGPPen; x, y, width, height, startAngle, sweepAngle: Single): TStatus; + begin + result := SetStatus(GdipDrawArc(nativeGraphics, + pen.nativePen, + x, + y, + width, + height, + startAngle, + sweepAngle)); + end; + + function TGPGraphics.DrawArc(pen: TGPPen; const rect: TGPRectF; startAngle, sweepAngle: Single): TStatus; + begin + result := DrawArc(pen, rect.X, rect.Y, rect.Width, rect.Height, + startAngle, sweepAngle); + end; + + function TGPGraphics.DrawArc(pen: TGPPen; x, y, width, height: Integer; startAngle, + sweepAngle: Single): TStatus; + begin + result := SetStatus(GdipDrawArcI(nativeGraphics, + pen.nativePen, + x, + y, + width, + height, + startAngle, + sweepAngle)); + end; + + + function TGPGraphics.DrawArc(pen: TGPPen; const rect: TGPRect; startAngle, sweepAngle: Single): TStatus; + begin + result := DrawArc(pen, + rect.X, + rect.Y, + rect.Width, + rect.Height, + startAngle, + sweepAngle); + end; + + function TGPGraphics.DrawBezier(pen: TGPPen; x1, y1, x2, y2, x3, y3, x4, y4: Single): TStatus; + begin + result := SetStatus(GdipDrawBezier(nativeGraphics, + pen.nativePen, x1, y1, + x2, y2, x3, y3, x4, y4)); + end; + + function TGPGraphics.DrawBezier(pen: TGPPen; const pt1, pt2, pt3, pt4: TGPPointF): TStatus; + begin + result := DrawBezier(pen, + pt1.X, + pt1.Y, + pt2.X, + pt2.Y, + pt3.X, + pt3.Y, + pt4.X, + pt4.Y); + end; + + function TGPGraphics.DrawBeziers(pen: TGPPen; points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawBeziers(nativeGraphics, + pen.nativePen, + points, + count)); + end; + + function TGPGraphics.DrawBezier(pen: TGPPen; x1, y1, x2, y2, x3, y3, x4, y4: Integer): TStatus; + begin + result := SetStatus(GdipDrawBezierI(nativeGraphics, + pen.nativePen, + x1, + y1, + x2, + y2, + x3, + y3, + x4, + y4)); + end; + + function TGPGraphics.DrawBezier(pen: TGPPen; const pt1, pt2, pt3, pt4: TGPPoint): TStatus; + begin + result := DrawBezier(pen, + pt1.X, + pt1.Y, + pt2.X, + pt2.Y, + pt3.X, + pt3.Y, + pt4.X, + pt4.Y); + end; + + function TGPGraphics.DrawBeziers(pen: TGPPen; points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawBeziersI(nativeGraphics, + pen.nativePen, + points, + count)); + end; + + function TGPGraphics.DrawRectangle(pen: TGPPen; const rect: TGPRectF): TStatus; + begin + result := DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height); + end; + + function TGPGraphics.DrawRectangle(pen: TGPPen; x, y, width, height: Single): TStatus; + begin + result := SetStatus(GdipDrawRectangle(nativeGraphics, + pen.nativePen, x, y, + width, height)); + end; + + function TGPGraphics.DrawRectangles(pen: TGPPen; rects: PGPRectF; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawRectangles(nativeGraphics, + pen.nativePen, + rects, count)); + end; + + function TGPGraphics.DrawRectangle(pen: TGPPen; const rect: TGPRect): TStatus; + begin + result := DrawRectangle(pen, + rect.X, + rect.Y, + rect.Width, + rect.Height); + end; + + function TGPGraphics.DrawRectangle(pen: TGPPen; x, y, width, height: Integer): TStatus; + begin + result := SetStatus(GdipDrawRectangleI(nativeGraphics, + pen.nativePen, + x, + y, + width, + height)); + end; + + function TGPGraphics.DrawRectangles(pen: TGPPen; rects: PGPRect; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawRectanglesI(nativeGraphics, + pen.nativePen, + rects, + count)); + end; + + function TGPGraphics.DrawEllipse(pen: TGPPen; const rect: TGPRectF): TStatus; + begin + result := DrawEllipse(pen, rect.X, rect.Y, rect.Width, rect.Height); + end; + + function TGPGraphics.DrawEllipse(pen: TGPPen; x, y, width, height: Single): TStatus; + begin + result := SetStatus(GdipDrawEllipse(nativeGraphics, + pen.nativePen, + x, + y, + width, + height)); + end; + + function TGPGraphics.DrawEllipse(pen: TGPPen; const rect: TGPRect): TStatus; + begin + result := DrawEllipse(pen, + rect.X, + rect.Y, + rect.Width, + rect.Height); + end; + + function TGPGraphics.DrawEllipse(pen: TGPPen; x, y, width, height: Integer): TStatus; + begin + result := SetStatus(GdipDrawEllipseI(nativeGraphics, + pen.nativePen, + x, + y, + width, + height)); + end; + + function TGPGraphics.DrawPie(pen: TGPPen; const rect: TGPRectF; startAngle, sweepAngle: Single): TStatus; + begin + result := DrawPie(pen, + rect.X, + rect.Y, + rect.Width, + rect.Height, + startAngle, + sweepAngle); + end; + + function TGPGraphics.DrawPie(pen: TGPPen; x, y, width, height, startAngle, sweepAngle: Single): TStatus; + begin + result := SetStatus(GdipDrawPie(nativeGraphics, + pen.nativePen, + x, + y, + width, + height, + startAngle, + sweepAngle)); + end; + + function TGPGraphics.DrawPie(pen: TGPPen; const rect: TGPRect; startAngle, sweepAngle: Single): TStatus; + begin + result := DrawPie(pen, + rect.X, + rect.Y, + rect.Width, + rect.Height, + startAngle, + sweepAngle); + end; + + function TGPGraphics.DrawPie(pen: TGPPen; x, y, width, height: Integer; + startAngle, sweepAngle: Single): TStatus; + begin + result := SetStatus(GdipDrawPieI(nativeGraphics, + pen.nativePen, + x, + y, + width, + height, + startAngle, + sweepAngle)); + end; + + function TGPGraphics.DrawPolygon(pen: TGPPen; points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawPolygon(nativeGraphics, + pen.nativePen, + points, + count)); + end; + + function TGPGraphics.DrawPolygon(pen: TGPPen; points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawPolygonI(nativeGraphics, + pen.nativePen, + points, + count)); + end; + + function TGPGraphics.DrawPath(pen: TGPPen; path: TGPGraphicsPath): TStatus; + var + nPen: GpPen; + nPath: GpPath; + begin + if assigned(pen) then nPen := pen.nativePen else nPen := nil; + if assigned(path) then nPath := path.nativePath else nPath := nil; + result := SetStatus(GdipDrawPath(nativeGraphics, nPen, nPath)); + end; + + function TGPGraphics.DrawCurve(pen: TGPPen; points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawCurve(nativeGraphics, + pen.nativePen, points, + count)); + end; + + function TGPGraphics.DrawCurve(pen: TGPPen; points: PGPPointF; count: Integer; tension: Single): TStatus; + begin + result := SetStatus(GdipDrawCurve2(nativeGraphics, + pen.nativePen, points, + count, tension)); + end; + + function TGPGraphics.DrawCurve(pen: TGPPen; points: PGPPointF; count, offset, + numberOfSegments: Integer; tension: Single = 0.5): TStatus; + begin + result := SetStatus(GdipDrawCurve3(nativeGraphics, + pen.nativePen, points, + count, offset, + numberOfSegments, tension)); + end; + + function TGPGraphics.DrawCurve(pen: TGPPen; points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawCurveI(nativeGraphics, + pen.nativePen, + points, + count)); + end; + + function TGPGraphics.DrawCurve(pen: TGPPen; points: PGPPoint; count: Integer; tension: Single): TStatus; + begin + result := SetStatus(GdipDrawCurve2I(nativeGraphics, + pen.nativePen, + points, + count, + tension)); + end; + + function TGPGraphics.DrawCurve(pen: TGPPen; points: PGPPoint; count, offset, + numberOfSegments: Integer; tension: Single = 0.5): TStatus; + begin + result := SetStatus(GdipDrawCurve3I(nativeGraphics, + pen.nativePen, + points, + count, + offset, + numberOfSegments, + tension)); + end; + + function TGPGraphics.DrawClosedCurve(pen: TGPPen; points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawClosedCurve(nativeGraphics, + pen.nativePen, + points, count)); + end; + + function TGPGraphics.DrawClosedCurve(pen: TGPPen; points: PGPPointF; count: Integer; + tension: Single): TStatus; + begin + result := SetStatus(GdipDrawClosedCurve2(nativeGraphics, + pen.nativePen, + points, count, + tension)); + end; + + function TGPGraphics.DrawClosedCurve(pen: TGPPen; points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipDrawClosedCurveI(nativeGraphics, + pen.nativePen, + points, + count)); + end; + + function TGPGraphics.DrawClosedCurve(pen: TGPPen; points: PGPPoint; + count: Integer; tension: Single): TStatus; + begin + result := SetStatus(GdipDrawClosedCurve2I(nativeGraphics, + pen.nativePen, + points, + count, + tension)); + end; + + function TGPGraphics.Clear(color: TGPColor): TStatus; + begin + result := SetStatus(GdipGraphicsClear( + nativeGraphics, + color)); + end; + + function TGPGraphics.FillRectangle(brush: TGPBrush; const rect: TGPRectF): TStatus; + begin + result := FillRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height); + end; + + function TGPGraphics.FillRectangle(brush: TGPBrush; x, y, width, height: Single): TStatus; + begin + result := SetStatus(GdipFillRectangle(nativeGraphics, + brush.nativeBrush, x, y, + width, height)); + end; + + function TGPGraphics.FillRectangles(brush: TGPBrush; rects: PGPRectF; count: Integer): TStatus; + begin + result := SetStatus(GdipFillRectangles(nativeGraphics, + brush.nativeBrush, + rects, count)); + end; + + function TGPGraphics.FillRectangle(brush: TGPBrush; const rect: TGPRect): TStatus; + begin + result := FillRectangle(brush, + rect.X, + rect.Y, + rect.Width, + rect.Height); + end; + + function TGPGraphics.FillRectangle(brush: TGPBrush; x, y, width, height: Integer): TStatus; + begin + result := SetStatus(GdipFillRectangleI(nativeGraphics, + brush.nativeBrush, + x, + y, + width, + height)); + end; + + function TGPGraphics.FillRectangles(brush: TGPBrush; rects: PGPRect; count: Integer): TStatus; + begin + result := SetStatus(GdipFillRectanglesI(nativeGraphics, + brush.nativeBrush, + rects, + count)); + end; + + function TGPGraphics.FillPolygon(brush: TGPBrush; points: PGPPointF; count: Integer): TStatus; + begin + result := FillPolygon(brush, points, count, FillModeAlternate); + end; + + function TGPGraphics.FillPolygon(brush: TGPBrush; points: PGPPointF; count: Integer; + fillMode: TFillMode): TStatus; + begin + result := SetStatus(GdipFillPolygon(nativeGraphics, + brush.nativeBrush, + points, count, fillMode)); + end; + + function TGPGraphics.FillPolygon(brush: TGPBrush; points: PGPPoint; count: Integer): TStatus; + begin + result := FillPolygon(brush, points, count, FillModeAlternate); + end; + + function TGPGraphics.FillPolygon(brush: TGPBrush; points: PGPPoint; count: Integer; + fillMode: TFillMode): TStatus; + begin + result := SetStatus(GdipFillPolygonI(nativeGraphics, + brush.nativeBrush, + points, count, + fillMode)); + end; + + function TGPGraphics.FillEllipse(brush: TGPBrush; const rect: TGPRectF): TStatus; + begin + result := FillEllipse(brush, rect.X, rect.Y, rect.Width, rect.Height); + end; + + function TGPGraphics.FillEllipse(brush: TGPBrush; x, y, width, height: Single): TStatus; + begin + result := SetStatus(GdipFillEllipse(nativeGraphics, + brush.nativeBrush, x, y, + width, height)); + end; + + function TGPGraphics.FillEllipse(brush: TGPBrush; const rect: TGPRect): TStatus; + begin + result := FillEllipse(brush, rect.X, rect.Y, rect.Width, rect.Height); + end; + + function TGPGraphics.FillEllipse(brush: TGPBrush; x, y, width, height: Integer): TStatus; + begin + result := SetStatus(GdipFillEllipseI(nativeGraphics, + brush.nativeBrush, + x, + y, + width, + height)); + end; + + function TGPGraphics.FillPie(brush: TGPBrush; const rect: TGPRectF; startAngle, sweepAngle: Single): TStatus; + begin + result := FillPie(brush, rect.X, rect.Y, rect.Width, rect.Height, + startAngle, sweepAngle); + end; + + function TGPGraphics.FillPie(brush: TGPBrush; x, y, width, height, startAngle, sweepAngle: Single): TStatus; + begin + result := SetStatus(GdipFillPie(nativeGraphics, + brush.nativeBrush, x, y, + width, height, startAngle, + sweepAngle)); + end; + + function TGPGraphics.FillPie(brush: TGPBrush; const rect: TGPRect; startAngle, sweepAngle: Single): TStatus; + begin + result := FillPie(brush, rect.X, rect.Y, rect.Width, rect.Height, + startAngle, sweepAngle); + end; + + function TGPGraphics.FillPie(brush: TGPBrush; x, y, width, height: Integer; startAngle, + sweepAngle: Single): TStatus; + begin + result := SetStatus(GdipFillPieI(nativeGraphics, + brush.nativeBrush, + x, + y, + width, + height, + startAngle, + sweepAngle)); + end; + + function TGPGraphics.FillPath(brush: TGPBrush; path: TGPGraphicsPath): TStatus; + begin + result := SetStatus(GdipFillPath(nativeGraphics, + brush.nativeBrush, + path.nativePath)); + end; + + function TGPGraphics.FillClosedCurve(brush: TGPBrush; points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipFillClosedCurve(nativeGraphics, + brush.nativeBrush, + points, count)); + + end; + + function TGPGraphics.FillClosedCurve(brush: TGPBrush; points: PGPPointF; count: Integer; + fillMode: TFillMode; tension: Single = 0.5): TStatus; + begin + result := SetStatus(GdipFillClosedCurve2(nativeGraphics, + brush.nativeBrush, + points, count, + tension, fillMode)); + end; + + function TGPGraphics.FillClosedCurve(brush: TGPBrush; points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipFillClosedCurveI(nativeGraphics, + brush.nativeBrush, + points, + count)); + end; + + function TGPGraphics.FillClosedCurve(brush: TGPBrush; points: PGPPoint; + count: Integer; fillMode: TFillMode; tension: Single = 0.5): TStatus; + begin + result := SetStatus(GdipFillClosedCurve2I(nativeGraphics, + brush.nativeBrush, + points, count, + tension, fillMode)); + end; + + function TGPGraphics.FillRegion(brush: TGPBrush; region: TGPRegion): TStatus; + begin + result := SetStatus(GdipFillRegion(nativeGraphics, + brush.nativeBrush, + region.nativeRegion)); + end; + + + function TGPGraphics.DrawString( string_: WideString; length: Integer; font: TGPFont; + const layoutRect: TGPRectF; stringFormat: TGPStringFormat; brush: TGPBrush): TStatus; + var + nFont: GpFont; + nStringFormat: GpStringFormat; + nBrush: GpBrush; + begin + if assigned(font) then nfont := font.nativeFont else nfont := nil; + if assigned(stringFormat) then nstringFormat := stringFormat.nativeFormat else nstringFormat := nil; + if assigned(brush) then nbrush := brush.nativeBrush else nbrush := nil; + result := SetStatus(GdipDrawString( + nativeGraphics, + PWideChar(string_), + length, + nfont, + @layoutRect, + nstringFormat, + nbrush)); + end; + + function TGPGraphics.DrawString(string_: WideString; length: Integer; font: TGPFont; + const origin: TGPPointF; brush: TGPBrush): TStatus; + var + rect: TGPRectF; + nfont: Gpfont; + nBrush: GpBrush; + begin + rect.X := origin.X; + rect.Y := origin.Y; + rect.Width := 0.0; + rect.Height := 0.0; + if assigned(font) then nfont := font.nativeFont else nfont := nil; + if assigned(Brush) then nBrush := Brush.nativeBrush else nBrush := nil; + result := SetStatus(GdipDrawString( + nativeGraphics, + PWideChar(string_), + length, + nfont, + @rect, + nil, + nbrush)); + end; + + function TGPGraphics.DrawString(string_: WideString; length: Integer; font: TGPFont; + const origin: TGPPointF; stringFormat: TGPStringFormat; brush: TGPBrush): TStatus; + var + rect: TGPRectF; + nFont: GpFont; + nStringFormat: GpStringFormat; + nBrush: GpBrush; + begin + rect.X := origin.X; + rect.Y := origin.Y; + rect.Width := 0.0; + rect.Height := 0.0; + if assigned(font) then nfont := font.nativeFont else nfont := nil; + if assigned(stringFormat) then nstringFormat := stringFormat.nativeFormat else nstringFormat := nil; + if assigned(brush) then nbrush := brush.nativeBrush else nbrush := nil; + result := SetStatus(GdipDrawString( + nativeGraphics, + PWideChar(string_), + length, + nfont, + @rect, + nstringFormat, + nbrush)); + end; + + + function TGPGraphics.MeasureString(string_: WideString; length: Integer; font: TGPFont; + const layoutRect: TGPRectF; stringFormat: TGPStringFormat; out boundingBox: TGPRectF; + codepointsFitted: PInteger = nil; linesFilled: PInteger = nil): TStatus; + var + nFont: GpFont; + nStringFormat: GpStringFormat; + begin + if assigned(font) then nfont := font.nativeFont else nfont := nil; + if assigned(stringFormat) then nstringFormat := stringFormat.nativeFormat else nstringFormat := nil; + result := SetStatus(GdipMeasureString( + nativeGraphics, + PWideChar(string_), + length, + nfont, + @layoutRect, + nstringFormat, + @boundingBox, + codepointsFitted, + linesFilled + )); + end; + + + function TGPGraphics.MeasureString(string_: WideString; length: Integer; font: TGPFont; + const layoutRectSize: TGPSizeF; stringFormat: TGPStringFormat; out size: TGPSizeF; + codepointsFitted: PInteger = nil; linesFilled: PInteger = nil): TStatus; + var + layoutRect, boundingBox: TGPRectF; + status: TStatus; + nFont: GpFont; + nStringFormat: GpStringFormat; + begin + layoutRect.X := 0; + layoutRect.Y := 0; + layoutRect.Width := layoutRectSize.Width; + layoutRect.Height := layoutRectSize.Height; + + if assigned(font) then nfont := font.nativeFont else nfont := nil; + if assigned(stringFormat) then nstringFormat := stringFormat.nativeFormat else nstringFormat := nil; + + status := SetStatus(GdipMeasureString( + nativeGraphics, + PWideChar(string_), + length, + nfont, + @layoutRect, + nstringFormat, + @boundingBox, + codepointsFitted, + linesFilled + )); + + if (status = Ok) then + begin + size.Width := boundingBox.Width; + size.Height := boundingBox.Height; + end; + result := status; + end; + + + function TGPGraphics.MeasureString(string_: WideString ; length: Integer; font: TGPFont; + const origin: TGPPointF; stringFormat: TGPStringFormat; out boundingBox: TGPRectF): TStatus; + var + rect: TGPRectF; + nFont: GpFont; + nstringFormat: GpstringFormat; + begin + rect.X := origin.X; + rect.Y := origin.Y; + rect.Width := 0.0; + rect.Height := 0.0; + + if assigned(font) then nfont := font.nativeFont else nfont := nil; + if assigned(stringFormat) then nstringFormat := stringFormat.nativeFormat else nstringFormat := nil; + + result := SetStatus(GdipMeasureString( + nativeGraphics, + PWideChar(string_), + length, + nfont, + @rect, + nstringFormat, + @boundingBox, + nil, + nil + )); + end; + + + function TGPGraphics.MeasureString(string_: WideString; length: Integer; font: TGPFont; + const layoutRect: TGPRectF; out boundingBox: TGPRectF): TStatus; + var + nFont: GpFont; + begin + if assigned(font) then nfont := font.nativeFont else nfont := nil; + result := SetStatus(GdipMeasureString( + nativeGraphics, + PWideChar(string_), + length, + nfont, + @layoutRect, + nil, + @boundingBox, + nil, + nil + )); + end; + + + function TGPGraphics.MeasureString(string_: WideString; length: Integer; font: TGPFont; + const origin: TGPPointF; out boundingBox: TGPRectF): TStatus; + var + nFont: GpFont; + rect: TGPRectF; + begin + if assigned(font) then nfont := font.nativeFont else nfont := nil; + rect.X := origin.X; + rect.Y := origin.Y; + rect.Width := 0.0; + rect.Height := 0.0; + + result := SetStatus(GdipMeasureString( + nativeGraphics, + PWideChar(string_), + length, + nfont, + @rect, + nil, + @boundingBox, + nil, + nil + )); + end; + + + + function TGPGraphics.MeasureCharacterRanges(string_: WideString; length: Integer; font: TGPFont; + const layoutRect: TGPRectF; stringFormat: TGPStringFormat; regionCount: Integer; + const regions: array of TGPRegion): TStatus; + var + nativeRegions: Pointer; + i: Integer; + Status: TStatus; + nFont: GpFont; + nstringFormat: GpstringFormat; + type + TArrayGpRegion = array of GpRegion; + begin + if assigned(font) then nfont := font.nativeFont else nfont := nil; + if assigned(stringFormat) then nstringFormat := stringFormat.nativeFormat else nstringFormat := nil; + + if (regionCount <= 0) then + begin + result := InvalidParameter; + exit; + end; + + getmem(nativeRegions, Sizeof(GpRegion)* regionCount); + + for i := 0 to regionCount - 1 do + TArrayGpRegion(nativeRegions)[i] := regions[i].nativeRegion; + + status := SetStatus(GdipMeasureCharacterRanges( + nativeGraphics, + PWideChar(string_), + length, + nfont, + @layoutRect, + nstringFormat, + regionCount, + nativeRegions + )); + + freemem(nativeRegions, Sizeof(GpRegion)* regionCount); + result := status; + end; + + function TGPGraphics.DrawDriverString(text: PUINT16; length: Integer; font: TGPFont + ; brush: TGPBrush; positions: PGPPointF; flags: Integer + ; matrix: TGPMatrix): TStatus; + var + nfont: Gpfont; + nbrush: Gpbrush; + nmatrix: Gpmatrix; + begin + if assigned(font) then nfont := font.nativeFont else nfont := nil; + if assigned(brush) then nbrush := brush.nativeBrush else nbrush := nil; + if assigned(matrix) then nmatrix := matrix.nativeMatrix else nmatrix := nil; + + result := SetStatus(GdipDrawDriverString( + nativeGraphics, + text, + length, + nfont, + nbrush, + positions, + flags, + nmatrix)); + end; + + function TGPGraphics.MeasureDriverString(text: PUINT16; length: Integer; font: TGPFont; + positions: PGPPointF; flags: Integer; matrix: TGPMatrix; + out boundingBox: TGPRectF): TStatus; + var + nfont: Gpfont; + nmatrix: Gpmatrix; + begin + if assigned(font) then nfont := font.nativeFont else nfont := nil; + if assigned(matrix) then nmatrix := matrix.nativeMatrix else nmatrix := nil; + + result := SetStatus(GdipMeasureDriverString( + nativeGraphics, + text, + length, + nfont, + positions, + flags, + nmatrix, + @boundingBox + )); + end; + + // Draw a cached bitmap on this graphics destination offset by + // x, y. Note this will fail with WrongState if the CachedBitmap + // native format differs from this Graphics. + + function TGPGraphics.DrawCachedBitmap(cb: TGPCachedBitmap; x, y: Integer): TStatus; + begin + result := SetStatus(GdipDrawCachedBitmap( + nativeGraphics, + cb.nativeCachedBitmap, + x, y + )); + end; + + function TGPGraphics.DrawImage(image: TGPImage; const point: TGPPointF): TStatus; + begin + result := DrawImage(image, point.X, point.Y); + end; + + function TGPGraphics.DrawImage(image: TGPImage; x, y: Single): TStatus; + var + nImage: GpImage; + begin + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + result := SetStatus(GdipDrawImage(nativeGraphics, nImage, x, y)); + end; + + function TGPGraphics.DrawImage(image: TGPImage; const rect: TGPRectF): TStatus; + begin + result := DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height); + end; + + function TGPGraphics.DrawImage(image: TGPImage; x, y, width, height: Single): TStatus; + var + nImage: GpImage; + begin + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + result := SetStatus(GdipDrawImageRect(nativeGraphics, + nimage, + x, + y, + width, + height)); + end; + + function TGPGraphics.DrawImage(image: TGPImage; const point: TGPPoint): TStatus; + begin + result := DrawImage(image, point.X, point.Y); + end; + + function TGPGraphics.DrawImage(image: TGPImage; x, y: Integer): TStatus; + var + nImage: GpImage; + begin + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + result := SetStatus(GdipDrawImageI(nativeGraphics, + nimage, + x, + y)); + end; + + function TGPGraphics.DrawImage(image: TGPImage; const rect: TGPRect): TStatus; + begin + result := DrawImage(image, + rect.X, + rect.Y, + rect.Width, + rect.Height); + end; + + function TGPGraphics.DrawImage(image: TGPImage; x, y, width, height: Integer): TStatus; + var + nImage: GpImage; + begin + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + result := SetStatus(GdipDrawImageRectI(nativeGraphics, + nimage, + x, + y, + width, + height)); + end; + + + // Affine Draw Image + // destPoints.length = 3: rect => parallelogram + // destPoints[0] <=> top-left corner of the source rectangle + // destPoints[1] <=> top-right corner + // destPoints[2] <=> bottom-left corner + // destPoints.length = 4: rect => quad + // destPoints[3] <=> bottom-right corner + + function TGPGraphics.DrawImage(image: TGPImage; destPoints: PGPPointF; count: Integer): TStatus; + var + nImage: GpImage; + begin + if (((count <> 3) and (count <> 4)) or (destPoints = nil)) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + result := SetStatus(GdipDrawImagePoints(nativeGraphics, + nimage, + destPoints, count)); + end; + + function TGPGraphics.DrawImage(image: TGPImage; destPoints: PGPPoint; count: Integer): TStatus; + var + nImage: GpImage; + begin + if (((count <> 3) and (count <> 4))or (destPoints = nil)) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + result := SetStatus(GdipDrawImagePointsI(nativeGraphics, + nimage, + destPoints, + count)); + end; + + function TGPGraphics.DrawImage(image: TGPImage; x, y, srcx, srcy, srcwidth, srcheight: Single; + srcUnit: TUnit): TStatus; + var + nImage: GpImage; + begin + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + result := SetStatus(GdipDrawImagePointRect(nativeGraphics, + nimage, + x, y, + srcx, srcy, + srcwidth, srcheight, srcUnit)); + end; + + function TGPGraphics.DrawImage(image: TGPImage; const destRect: TGPRectF; srcx, srcy, srcwidth, srcheight: Single; + srcUnit: TUnit; imageAttributes: TGPImageAttributes = nil; callback: DrawImageAbort = nil; + callbackData: Pointer = nil): TStatus; + var + nImage: GpImage; + nimageAttributes: GpimageAttributes; + begin + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipDrawImageRectRect(nativeGraphics, + nimage, + destRect.X, + destRect.Y, + destRect.Width, + destRect.Height, + srcx, srcy, + srcwidth, srcheight, + srcUnit, + nimageAttributes, + callback, + callbackData)); + end; + + function TGPGraphics.DrawImage(image: TGPImage; destPoints: PGPPointF; count: Integer; + srcx, srcy, srcwidth, srcheight: Single; srcUnit: TUnit; + imageAttributes: TGPImageAttributes = nil; callback: DrawImageAbort = nil; + callbackData: Pointer = nil): TStatus; + var + nImage: GpImage; + nimageAttributes: GpimageAttributes; + begin + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipDrawImagePointsRect(nativeGraphics, + nimage, + destPoints, count, + srcx, srcy, + srcwidth, + srcheight, + srcUnit, + nimageAttributes, + callback, + callbackData)); + end; + + function TGPGraphics.DrawImage(image: TGPImage; x, y, srcx, srcy, srcwidth, srcheight: Integer; + srcUnit: TUnit): TStatus; + var + nImage: GpImage; + begin + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + result := SetStatus(GdipDrawImagePointRectI(nativeGraphics, + nimage, + x, + y, + srcx, + srcy, + srcwidth, + srcheight, + srcUnit)); + end; + + function TGPGraphics.DrawImage(image: TGPImage; const destRect: TGPRect; srcx, srcy, srcwidth, + srcheight: Integer; srcUnit: TUnit; imageAttributes: TGPImageAttributes = nil; + callback: DrawImageAbort = nil; callbackData: Pointer = nil): TStatus; + var + nImage: GpImage; + nimageAttributes: GpimageAttributes; + begin + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipDrawImageRectRectI(nativeGraphics, + nimage, + destRect.X, + destRect.Y, + destRect.Width, + destRect.Height, + srcx, + srcy, + srcwidth, + srcheight, + srcUnit, + nimageAttributes, + callback, + callbackData)); + end; + + function TGPGraphics.DrawImage(image: TGPImage; destPoints: PGPPoint; + count, srcx, srcy, srcwidth, srcheight: Integer; srcUnit: TUnit; + imageAttributes: TGPImageAttributes = nil; callback: DrawImageAbort = nil; + callbackData: Pointer = nil): TStatus; + var + nImage: GpImage; + nimageAttributes: GpimageAttributes; + begin + if assigned(Image) then nImage := Image.nativeImage else nImage := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + + result := SetStatus(GdipDrawImagePointsRectI(nativeGraphics, + nimage, + destPoints, + count, + srcx, + srcy, + srcwidth, + srcheight, + srcUnit, + nimageAttributes, + callback, + callbackData)); + end; + + // The following methods are for playing an EMF+ to a graphics + // via the enumeration interface. Each record of the EMF+ is + // sent to the callback (along with the callbackData). Then + // the callback can invoke the Metafile::PlayRecord method + // to play the particular record. + + + function TGPGraphics.EnumerateMetafile(metafile: TGPMetafile; const destPoint: TGPPointF; + callback: EnumerateMetafileProc; callbackData: Pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileDestPoint( + nativeGraphics, + nmetafile, + @destPoint, + callback, + callbackData, + nimageAttributes)); + end; + + + function TGPGraphics.EnumerateMetafile(metafile: TGPMetafile; const destPoint: TGPPoint; + callback: EnumerateMetafileProc; callbackData: pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileDestPointI( + nativeGraphics, + nmetafile, + @destPoint, + callback, + callbackData, + nimageAttributes)); + end; + + + function TGPGraphics.EnumerateMetafile(metafile: TGPMetafile; const destRect: TGPRectF; + callback: EnumerateMetafileProc; callbackData: Pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileDestRect( + nativeGraphics, + nmetafile, + @destRect, + callback, + callbackData, + nimageAttributes)); + end; + + + function TGPGraphics.EnumerateMetafile(metafile: TGPMetafile; const destRect: TGPRect; + callback: EnumerateMetafileProc; callbackData: Pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileDestRectI( + nativeGraphics, + nmetafile, + @destRect, + callback, + callbackData, + nimageAttributes)); + end; + + + function TGPGraphics.EnumerateMetafile(metafile: TGPMetafile; destPoints: PGPPointF; + count: Integer; callback: EnumerateMetafileProc; callbackData: Pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileDestPoints( + nativeGraphics, + nmetafile, + destPoints, + count, + callback, + callbackData, + nimageAttributes)); + end; + + + function TGPGraphics.EnumerateMetafile(metafile: TGPMetafile; destPoints: PGPPoint; + count: Integer; callback: EnumerateMetafileProc; callbackData: Pointer = nil; + imageAttributes: TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileDestPointsI( + nativeGraphics, + nmetafile, + destPoints, + count, + callback, + callbackData, + nimageAttributes)); + end; + + + function TGPGraphics.EnumerateMetafile(metafile: TGPMetafile; const destPoint: TGPPointF; + const srcRect: TGPRectF; srcUnit: TUnit; callback: EnumerateMetafileProc; + callbackData: pointer = nil; imageAttributes: TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileSrcRectDestPoint( + nativeGraphics, + nmetafile, + @destPoint, + @srcRect, + srcUnit, + callback, + callbackData, + nimageAttributes)); + end; + + + function TGPGraphics.EnumerateMetafile(metafile : TGPMetafile; const destPoint : TGPPoint; + const srcRect : TGPRect; srcUnit : TUnit; callback : EnumerateMetafileProc; + callbackData : Pointer = nil; imageAttributes : TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileSrcRectDestPointI( + nativeGraphics, + nmetafile, + @destPoint, + @srcRect, + srcUnit, + callback, + callbackData, + nimageAttributes)); + end; + + + function TGPGraphics.EnumerateMetafile(metafile: TGPMetafile; const destRect: TGPRectF; + const srcRect: TGPRectF; srcUnit: TUnit; callback: EnumerateMetafileProc; + callbackData: Pointer = nil; imageAttributes: TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileSrcRectDestRect( + nativeGraphics, + nmetafile, + @destRect, + @srcRect, + srcUnit, + callback, + callbackData, + nimageAttributes)); + end; + + + function TGPGraphics.EnumerateMetafile(metafile : TGPMetafile; const destRect, srcRect: TGPRect; + srcUnit : TUnit; callback : EnumerateMetafileProc; callbackData : Pointer = nil; + imageAttributes : TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileSrcRectDestRectI( + nativeGraphics, + nmetafile, + @destRect, + @srcRect, + srcUnit, + callback, + callbackData, + nimageAttributes)); + end; + + + function TGPGraphics.EnumerateMetafile( metafile: TGPMetafile; destPoints: PGPPointF; + count: Integer; const srcRect: TGPRectF; srcUnit: TUnit; callback: EnumerateMetafileProc; + callbackData: Pointer = nil; imageAttributes: TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileSrcRectDestPoints( + nativeGraphics, + nmetafile, + destPoints, + count, + @srcRect, + srcUnit, + callback, + callbackData, + nimageAttributes)); + end; + + + function TGPGraphics.EnumerateMetafile(metafile: TGPMetafile; destPoints: PGPPoint; + count: Integer; const srcRect: TGPRect; srcUnit: TUnit; callback: EnumerateMetafileProc; + callbackData: Pointer = nil; imageAttributes: TGPImageAttributes = nil): TStatus; + var + nMetafile: GpMetafile; + nimageAttributes: GpimageAttributes; + begin + if assigned(Metafile) then nMetafile := GpMetafile(Metafile.nativeImage) else nMetafile := nil; + if assigned(imageAttributes) then nimageAttributes := imageAttributes.nativeImageAttr else nimageAttributes := nil; + result := SetStatus(GdipEnumerateMetafileSrcRectDestPointsI( + nativeGraphics, + nmetafile, + destPoints, + count, + @srcRect, + srcUnit, + callback, + callbackData, + nimageAttributes)); + end; + + function TGPGraphics.SetClip(g: TGPGraphics; combineMode: TCombineMode = CombineModeReplace): TStatus; + begin + result := SetStatus(GdipSetClipGraphics(nativeGraphics, + g.nativeGraphics, + combineMode)); + end; + + function TGPGraphics.SetClip(rect: TGPRectF; combineMode: TCombineMode = CombineModeReplace): TStatus; + begin + result := SetStatus(GdipSetClipRect(nativeGraphics, + rect.X, rect.Y, + rect.Width, rect.Height, + combineMode)); + end; + + function TGPGraphics.SetClip(rect: TGPRect; combineMode: TCombineMode = CombineModeReplace): TStatus; + begin + result := SetStatus(GdipSetClipRectI(nativeGraphics, + rect.X, rect.Y, + rect.Width, rect.Height, + combineMode)); + end; + + function TGPGraphics.SetClip(path: TGPGraphicsPath; combineMode: TCombineMode = CombineModeReplace): TStatus; + begin + result := SetStatus(GdipSetClipPath(nativeGraphics, + path.nativePath, + combineMode)); + end; + + function TGPGraphics.SetClip(region: TGPRegion; combineMode: TCombineMode = CombineModeReplace): TStatus; + begin + result := SetStatus(GdipSetClipRegion(nativeGraphics, + region.nativeRegion, + combineMode)); + end; + + // This is different than the other SetClip methods because it assumes + // that the HRGN is already in device units, so it doesn't transform + // the coordinates in the HRGN. + + function TGPGraphics.SetClip(hRgn: HRGN; combineMode: TCombineMode = CombineModeReplace): TStatus; + begin + result := SetStatus(GdipSetClipHrgn(nativeGraphics, hRgn, + combineMode)); + end; + + function TGPGraphics.IntersectClip(const rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipSetClipRect(nativeGraphics, + rect.X, rect.Y, + rect.Width, rect.Height, + CombineModeIntersect)); + end; + + function TGPGraphics.IntersectClip(const rect: TGPRect): TStatus; + begin + result := SetStatus(GdipSetClipRectI(nativeGraphics, + rect.X, rect.Y, + rect.Width, rect.Height, + CombineModeIntersect)); + end; + + function TGPGraphics.IntersectClip(region: TGPRegion): TStatus; + begin + result := SetStatus(GdipSetClipRegion(nativeGraphics, + region.nativeRegion, + CombineModeIntersect)); + end; + + function TGPGraphics.ExcludeClip(const rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipSetClipRect(nativeGraphics, + rect.X, rect.Y, + rect.Width, rect.Height, + CombineModeExclude)); + end; + + function TGPGraphics.ExcludeClip(const rect: TGPRect): TStatus; + begin + result := SetStatus(GdipSetClipRectI(nativeGraphics, + rect.X, rect.Y, + rect.Width, rect.Height, + CombineModeExclude)); + end; + + function TGPGraphics.ExcludeClip(region: TGPRegion): TStatus; + begin + result := SetStatus(GdipSetClipRegion(nativeGraphics, + region.nativeRegion, + CombineModeExclude)); + end; + + function TGPGraphics.ResetClip: TStatus; + begin + result := SetStatus(GdipResetClip(nativeGraphics)); + end; + + function TGPGraphics.TranslateClip(dx, dy: Single): TStatus; + begin + result := SetStatus(GdipTranslateClip(nativeGraphics, dx, dy)); + end; + + function TGPGraphics.TranslateClip(dx, dy: Integer): TStatus; + begin + result := SetStatus(GdipTranslateClipI(nativeGraphics, + dx, dy)); + end; + + function TGPGraphics.GetClip(region: TGPRegion): TStatus; + begin + result := SetStatus(GdipGetClip(nativeGraphics, + region.nativeRegion)); + end; + + function TGPGraphics.GetClipBounds(out rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipGetClipBounds(nativeGraphics, @rect)); + end; + + function TGPGraphics.GetClipBounds(out rect: TGPRect): TStatus; + begin + result := SetStatus(GdipGetClipBoundsI(nativeGraphics, @rect)); + end; + + function TGPGraphics.IsClipEmpty: Bool; + var booln: BOOL; + begin + booln := FALSE; + SetStatus(GdipIsClipEmpty(nativeGraphics, @booln)); + result := booln; + end; + + function TGPGraphics.GetVisibleClipBounds(out rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipGetVisibleClipBounds(nativeGraphics, @rect)); + end; + + function TGPGraphics.GetVisibleClipBounds(out rect: TGPRect): TStatus; + begin + result := SetStatus(GdipGetVisibleClipBoundsI(nativeGraphics, @rect)); + end; + + function TGPGraphics.IsVisibleClipEmpty: BOOL; + var booln: BOOL; + begin + booln := FALSE; + SetStatus(GdipIsVisibleClipEmpty(nativeGraphics, booln)); + result := booln; + end; + + function TGPGraphics.IsVisible(x, y: Integer): BOOL; + var pt: TGPPoint; + begin + pt.X := x; pt.Y := y; + result := IsVisible(pt); + end; + + function TGPGraphics.IsVisible(const point: TGPPoint): BOOL; + var booln: BOOL; + begin + booln := FALSE; + SetStatus(GdipIsVisiblePointI(nativeGraphics, + point.X, + point.Y, + booln)); + result := booln; + end; + + function TGPGraphics.IsVisible(x, y, width, height: Integer): BOOL; + var booln: BOOL; + begin + booln := TRUE; + SetStatus(GdipIsVisibleRectI(nativeGraphics, + X, + Y, + Width, + Height, + booln)); + result := booln; + end; + + function TGPGraphics.IsVisible(const rect: TGPRect): BOOL; + var booln: BOOL; + begin + booln := TRUE; + SetStatus(GdipIsVisibleRectI(nativeGraphics, + rect.X, + rect.Y, + rect.Width, + rect.Height, + booln)); + result := booln; + end; + + function TGPGraphics.IsVisible(x, y: Single): BOOL; + var booln: BOOL; + begin + booln := FALSE; + SetStatus(GdipIsVisiblePoint(nativeGraphics, + X, + Y, + booln)); + + result := booln; + end; + + function TGPGraphics.IsVisible(const point: TGPPointF): BOOL; + var booln: BOOL; + begin + booln := FALSE; + SetStatus(GdipIsVisiblePoint(nativeGraphics, + point.X, + point.Y, + booln)); + + result := booln; + end; + + function TGPGraphics.IsVisible(x, y, width, height: Single): BOOL; + var booln: BOOL; + begin + booln := TRUE; + SetStatus(GdipIsVisibleRect(nativeGraphics, + X, + Y, + Width, + Height, + booln)); + result := booln; + end; + + function TGPGraphics.IsVisible(const rect: TGPRectF): BOOL; + var booln: BOOL; + begin + booln := TRUE; + SetStatus(GdipIsVisibleRect(nativeGraphics, + rect.X, + rect.Y, + rect.Width, + rect.Height, + booln)); + result := booln; + end; + + function TGPGraphics.Save: GraphicsState; + begin + SetStatus(GdipSaveGraphics(nativeGraphics, result)); + end; + + function TGPGraphics.Restore(gstate: GraphicsState): TStatus; + begin + result := SetStatus(GdipRestoreGraphics(nativeGraphics, + gstate)); + end; + + function TGPGraphics.BeginContainer(const dstrect,srcrect: TGPRectF; unit_: TUnit): GraphicsContainer; + begin + SetStatus(GdipBeginContainer(nativeGraphics, @dstrect, + @srcrect, unit_, result)); + end; + + function TGPGraphics.BeginContainer(const dstrect, srcrect: TGPRect; unit_: TUnit): GraphicsContainer; + begin + SetStatus(GdipBeginContainerI(nativeGraphics, @dstrect, + @srcrect, unit_, result)); + end; + + function TGPGraphics.BeginContainer: GraphicsContainer; + begin + SetStatus(GdipBeginContainer2(nativeGraphics, result)); + end; + + function TGPGraphics.EndContainer(state: GraphicsContainer): TStatus; + begin + result := SetStatus(GdipEndContainer(nativeGraphics, state)); + end; + + // Only valid when recording metafiles. + + function TGPGraphics.AddMetafileComment(data: PBYTE; sizeData: UINT): TStatus; + begin + result := SetStatus(GdipComment(nativeGraphics, sizeData, data)); + end; + + function TGPGraphics.GetHalftonePalette: HPALETTE; + begin + result := GdipCreateHalftonePalette; + end; + + function TGPGraphics.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + + constructor TGPGraphics.Create(graphics: GpGraphics); + begin + lastResult := Ok; + SetNativeGraphics(graphics); + end; + + procedure TGPGraphics.SetNativeGraphics(graphics: GpGraphics); + begin + self.nativeGraphics := graphics; + end; + + function TGPGraphics.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then lastResult := status; + result := status; + end; + + function TGPGraphics.GetNativeGraphics: GpGraphics; + begin + result := self.nativeGraphics; + end; + + function TGPGraphics.GetNativePen(pen: TGPPen): GpPen; + begin + result := pen.nativePen; + end; + +(**************************************************************************\ +* +* GDI+ Font Family class +* +\**************************************************************************) + + constructor TGPFontFamily.Create; + begin + nativeFamily := nil; + lastResult := Ok; + end; + + constructor TGPFontFamily.Create(name: WideString; fontCollection: TGPFontCollection = nil); + var nfontCollection: GpfontCollection; + begin + nativeFamily := nil; + if assigned(fontCollection) then nfontCollection := fontCollection.nativeFontCollection else nfontCollection := nil; + lastResult := GdipCreateFontFamilyFromName(PWideChar(name), nfontCollection, nativeFamily); + end; + + destructor TGPFontFamily.Destroy; + begin + GdipDeleteFontFamily (nativeFamily); + end; + + class function TGPFontFamily.GenericSansSerif: TGPFontFamily; + var + nFontFamily: GpFontFamily; + begin + if (GenericSansSerifFontFamily <> nil) then + begin + result := GenericSansSerifFontFamily; + exit; + end; + GenericSansSerifFontFamily := TGPFontFamily.Create; + GenericSansSerifFontFamily.lastResult := GdipGetGenericFontFamilySansSerif(nFontFamily); + GenericSansSerifFontFamily.nativeFamily := nFontFamily; + result := GenericSansSerifFontFamily; + end; + + class function TGPFontFamily.GenericSerif: TGPFontFamily; + var nFontFamily: GpFontFamily; + begin + if (GenericSerifFontFamily <> nil) then + begin + result := GenericSerifFontFamily; + exit; + end; + + GenericSerifFontFamily := TGPFontFamily.Create;// (GenericSerifFontFamilyBuffer); + GenericSerifFontFamily.lastResult := GdipGetGenericFontFamilySerif(nFontFamily); + GenericSerifFontFamily.nativeFamily := nFontFamily; + result := GenericSerifFontFamily; + end; + + class function TGPFontFamily.GenericMonospace: TGPFontFamily; + var nFontFamily: GpFontFamily; + begin + if (GenericMonospaceFontFamily <> nil) then + begin + result := GenericMonospaceFontFamily; + exit; + end; + GenericMonospaceFontFamily := TGPFontFamily.Create;// (GenericMonospaceFontFamilyBuffer); + GenericMonospaceFontFamily.lastResult := GdipGetGenericFontFamilyMonospace(nFontFamily); + GenericMonospaceFontFamily.nativeFamily := nFontFamily; + result := GenericMonospaceFontFamily; + end; + + function TGPFontFamily.GetFamilyName(out name: string; language: LANGID = 0): TStatus; + var str: array[0..LF_FACESIZE - 1] of WideChar; + begin + result := SetStatus(GdipGetFamilyName(nativeFamily, @str, language)); + name := str; + end; + + function TGPFontFamily.Clone: TGPFontFamily; + var + clonedFamily: GpFontFamily; + begin + clonedFamily := nil; + SetStatus(GdipCloneFontFamily (nativeFamily, clonedFamily)); + result := TGPFontFamily.Create(clonedFamily, lastResult); + end; + + function TGPFontFamily.IsAvailable: BOOL; + begin + result := (nativeFamily <> nil); + end; + + function TGPFontFamily.IsStyleAvailable(style: Integer): BOOL; + var + StyleAvailable: BOOL; + status: TStatus; + begin + status := SetStatus(GdipIsStyleAvailable(nativeFamily, style, StyleAvailable)); + if (status <> Ok) then StyleAvailable := FALSE; + result := StyleAvailable; + end; + + function TGPFontFamily.GetEmHeight(style: Integer): UINT16; + begin + SetStatus(GdipGetEmHeight(nativeFamily, style, result)); + end; + + function TGPFontFamily.GetCellAscent(style: Integer): UINT16; + begin + SetStatus(GdipGetCellAscent(nativeFamily, style, result)); + end; + + function TGPFontFamily.GetCellDescent(style: Integer): UINT16; + begin + SetStatus(GdipGetCellDescent(nativeFamily, style, result)); + end; + + function TGPFontFamily.GetLineSpacing(style: Integer): UINT16; + begin + SetStatus(GdipGetLineSpacing(nativeFamily, style, result)); + end; + + function TGPFontFamily.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + + function TGPFontFamily.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then lastResult := status; + result := status; + end; + + constructor TGPFontFamily.Create(nativeOrig: GpFontFamily; status: TStatus); + begin + lastResult := status; + nativeFamily := nativeOrig; + end; + +(**************************************************************************\ +* +* GDI+ Font class +* +\**************************************************************************) + + constructor TGPFont.Create(hdc: HDC); + var font: GpFont; + begin + font := nil; + lastResult := GdipCreateFontFromDC(hdc, font); + SetNativeFont(font); + end; + + constructor TGPFont.Create(hdc: HDC; logfont: PLogFontA); + var font: GpFont; + begin + font := nil; + if assigned(logfont) then + lastResult := GdipCreateFontFromLogfontA(hdc, logfont, font) + else + lastResult := GdipCreateFontFromDC(hdc, font); + SetNativeFont(font); + end; + + constructor TGPFont.Create(hdc: HDC; logfont: PLogFontW); + var font: GpFont; + begin + font := nil; + if assigned(logfont) then + lastResult := GdipCreateFontFromLogfontW(hdc, logfont, font) + else + lastResult := GdipCreateFontFromDC(hdc, font); + SetNativeFont(font); + end; + + constructor TGPFont.Create(hdc: HDC; hfont: HFONT); + var + font: GpFont; + lf: LOGFONTA; + begin + font := nil; + if BOOL(hfont) then + begin + if( BOOL(GetObjectA(hfont, sizeof(LOGFONTA), @lf))) then + lastResult := GdipCreateFontFromLogfontA(hdc, @lf, font) + else + lastResult := GdipCreateFontFromDC(hdc, font); + end + else + lastResult := GdipCreateFontFromDC(hdc, font); + SetNativeFont(font); + end; + + constructor TGPFont.Create(family: TGPFontFamily; emSize: Single; + style: TFontStyle = FontStyleRegular; unit_: TUnit = UnitPoint); + var + font: GpFont; + nFontFamily: GpFontFamily; + begin + font := nil; + if assigned(Family) then nFontFamily := Family.nativeFamily else nFontFamily := nil; + lastResult := GdipCreateFont(nFontFamily, emSize, Integer(style), Integer(unit_), font); + SetNativeFont(font); + end; + + constructor TGPFont.Create(familyName: WideString; emSize: Single; + style: TFontStyle = FontStyleRegular; unit_: TUnit = UnitPoint; + fontCollection: TGPFontCollection = nil); + var + family: TGPFontFamily; + nativeFamily: GpFontFamily; + begin + nativeFont := nil; + family := TGPFontFamily.Create(familyName, fontCollection); + nativeFamily := family.nativeFamily; + lastResult := family.GetLastStatus; + if (lastResult <> Ok) then + begin + nativeFamily := TGPFontFamily.GenericSansSerif.nativeFamily; + lastResult := TGPFontFamily.GenericSansSerif.lastResult; + if (lastResult <> Ok) then + begin + family.Free; + exit; + end; + end; + + lastResult := GdipCreateFont(nativeFamily, + emSize, + integer(style), + integer(unit_), + nativeFont); + + if (lastResult <> Ok) then + begin + nativeFamily := TGPFontFamily.GenericSansSerif.nativeFamily; + lastResult := TGPFontFamily.GenericSansSerif.lastResult; + if (lastResult <> Ok) then + begin + family.Free; + exit; + end; + + lastResult := GdipCreateFont( + nativeFamily, + emSize, + Integer(style), + Integer(unit_), + nativeFont); + end; + family.Free; + end; + + function TGPFont.GetLogFontA(g: TGPGraphics; out logfontA: TLogFontA): TStatus; + var nGraphics: GpGraphics; + begin + if assigned(g) then nGraphics := g.nativeGraphics else nGraphics := nil; + result := SetStatus(GdipGetLogFontA(nativeFont, nGraphics, logfontA)); + end; + + function TGPFont.GetLogFontW(g: TGPGraphics; out logfontW: TLogFontW): TStatus; + var nGraphics: GpGraphics; + begin + if assigned(g) then nGraphics := g.nativeGraphics else nGraphics := nil; + result := SetStatus(GdipGetLogFontW(nativeFont, nGraphics, logfontW)); + end; + + function TGPFont.Clone: TGPFont; + var cloneFont: GpFont; + begin + cloneFont := nil; + SetStatus(GdipCloneFont(nativeFont, cloneFont)); + result := TGPFont.Create(cloneFont, lastResult); + end; + + destructor TGPFont.Destroy; + begin + GdipDeleteFont(nativeFont); + end; + + function TGPFont.IsAvailable: BOOL; + begin + result := (nativeFont <> nil); + end; + + function TGPFont.GetStyle: Integer; + begin + SetStatus(GdipGetFontStyle(nativeFont, result)); + end; + + function TGPFont.GetSize: Single; + begin + SetStatus(GdipGetFontSize(nativeFont, result)); + end; + + function TGPFont.GetUnit: TUnit; + begin + SetStatus(GdipGetFontUnit(nativeFont, result)); + end; + + function TGPFont.GetLastStatus: TStatus; + begin + result := lastResult; + end; + + function TGPFont.GetHeight(graphics: TGPGraphics): Single; + var ngraphics: Gpgraphics; + begin + if assigned(graphics) then ngraphics := graphics.nativeGraphics else ngraphics := nil; + SetStatus(GdipGetFontHeight(nativeFont, ngraphics, result)); + end; + + function TGPFont.GetHeight(dpi: Single): Single; + begin + SetStatus(GdipGetFontHeightGivenDPI(nativeFont, dpi, result)); + end; + + function TGPFont.GetFamily(family: TGPFontFamily): TStatus; + var + status: TStatus; + nFamily: GpFontFamily; + begin + if (family = nil) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + + status := GdipGetFamily(nativeFont, nFamily); + family.nativeFamily := nFamily; + family.SetStatus(status); + result := SetStatus(status); + end; + + constructor TGPFont.Create(font: GpFont; status: TStatus); + begin + lastResult := status; + SetNativeFont(font); + end; + + procedure TGPFont.SetNativeFont(Font: GpFont); + begin + nativeFont := Font; + end; + + function TGPFont.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then lastResult := status; + result := status; + end; + +(**************************************************************************\ +* +* Font collections (Installed and Private) +* +\**************************************************************************) + + constructor TGPFontCollection.Create; + begin + nativeFontCollection := nil; + end; + + destructor TGPFontCollection.Destroy; + begin + inherited Destroy; + end; + + function TGPFontCollection.GetFamilyCount: Integer; + var + numFound: Integer; + begin + numFound := 0; + lastResult := GdipGetFontCollectionFamilyCount(nativeFontCollection, numFound); + result := numFound; + end; + + function TGPFontCollection.GetFamilies(numSought: Integer; out gpfamilies: array of TGPFontFamily; + out numFound: Integer): TStatus; + var + nativeFamilyList: Pointer; + Status: TStatus; + i: Integer; + type + ArrGpFontFamily = array of GpFontFamily; + begin + if ((numSought <= 0) or (length(gpfamilies) = 0)) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + numFound := 0; + + getMem(nativeFamilyList, numSought * SizeOf(GpFontFamily)); + if nativeFamilyList = nil then + begin + result := SetStatus(OutOfMemory); + exit; + end; + + status := SetStatus(GdipGetFontCollectionFamilyList( + nativeFontCollection, + numSought, + nativeFamilyList, + numFound + )); + + if (status = Ok) then + for i := 0 to numFound - 1 do + GdipCloneFontFamily(ArrGpFontFamily(nativeFamilyList)[i], gpfamilies[i].nativeFamily); + Freemem(nativeFamilyList, numSought * SizeOf(GpFontFamily)); + result := status; + end; + + function TGPFontCollection.GetLastStatus: TStatus; + begin + result := lastResult; + end; + + function TGPFontCollection.SetStatus(status: TStatus): TStatus; + begin + lastResult := status; + result := lastResult; + end; + + + constructor TGPInstalledFontCollection.Create; + begin + nativeFontCollection := nil; + lastResult := GdipNewInstalledFontCollection(nativeFontCollection); + end; + + destructor TGPInstalledFontCollection.Destroy; + begin + inherited Destroy; + end; + + constructor TGPPrivateFontCollection.Create; + begin + nativeFontCollection := nil; + lastResult := GdipNewPrivateFontCollection(nativeFontCollection); + end; + + destructor TGPPrivateFontCollection.destroy; + begin + GdipDeletePrivateFontCollection(nativeFontCollection); + inherited Destroy; + end; + + function TGPPrivateFontCollection.AddFontFile(filename: WideString): TStatus; + begin + result := SetStatus(GdipPrivateAddFontFile(nativeFontCollection, PWideChar(filename))); + end; + + function TGPPrivateFontCollection.AddMemoryFont(memory: Pointer; length: Integer): TStatus; + begin + result := SetStatus(GdipPrivateAddMemoryFont( + nativeFontCollection, + memory, + length)); + end; + +(**************************************************************************\ +* +* GDI+ Graphics Path class +* +\**************************************************************************) + + constructor TGPGraphicsPath.Create(fillMode: TFillMode = FillModeAlternate); + begin + nativePath := nil; + lastResult := GdipCreatePath(fillMode, nativePath); + end; + + constructor TGPGraphicsPath.Create(points: PGPPointF; types: PBYTE; count: Integer; + fillMode: TFillMode = FillModeAlternate); + begin + nativePath := nil; + lastResult := GdipCreatePath2(points, types, count, fillMode, nativePath); + end; + + constructor TGPGraphicsPath.Create(points: PGPPoint; types: PBYTE; count: Integer; + fillMode: TFillMode = FillModeAlternate); + begin + nativePath := nil; + lastResult := GdipCreatePath2I(points, types, count, fillMode, nativePath); + end; + + destructor TGPGraphicsPath.destroy; + begin + GdipDeletePath(nativePath); + end; + + function TGPGraphicsPath.Clone: TGPGraphicsPath; + var + clonepath: GpPath; + begin + clonepath := nil; + SetStatus(GdipClonePath(nativePath, clonepath)); + result := TGPGraphicsPath.Create(clonepath); + end; + + // Reset the path object to empty (and fill mode to FillModeAlternate) + + function TGPGraphicsPath.Reset: TStatus; + begin + result := SetStatus(GdipResetPath(nativePath)); + end; + + function TGPGraphicsPath.GetFillMode: TFillMode; + var FMode: TFillMode; + begin + FMode := FillModeAlternate; + SetStatus(GdipGetPathFillMode(nativePath, result)); + result := FMode; + end; + + function TGPGraphicsPath.SetFillMode(fillmode: TFillMode): TStatus; + begin + result := SetStatus(GdipSetPathFillMode(nativePath, fillmode)); + end; + + function TGPGraphicsPath.GetPathData(pathData: TPathData): TStatus; + var + count: Integer; + begin + count := GetPointCount; + if ((count <= 0) or ((pathData.Count > 0) and (pathData.Count < Count))) then + begin + pathData.Count := 0; + if assigned(pathData.Points) then + begin + FreeMem(pathData.Points); + pathData.Points := nil; + end; + if assigned(pathData.Types) then + begin + freemem(pathData.Types); + pathData.Types := nil; + end; + if (count <= 0) then + begin + result := lastResult; + exit; + end; + end; + + if (pathData.Count = 0) then + begin + getmem(pathData.Points, SizeOf(TGPPointF) * count); + if (pathData.Points = nil) then + begin + result := SetStatus(OutOfMemory); + exit; + end; + Getmem(pathData.Types, count); + if (pathData.Types = nil) then + begin + freemem(pathData.Points); + pathData.Points := nil; + result := SetStatus(OutOfMemory); + exit; + end; + pathData.Count := count; + end; + + result := SetStatus(GdipGetPathData(nativePath, @pathData.Count)); + end; + + function TGPGraphicsPath.StartFigure: TStatus; + begin + result := SetStatus(GdipStartPathFigure(nativePath)); + end; + + function TGPGraphicsPath.CloseFigure: TStatus; + begin + result := SetStatus(GdipClosePathFigure(nativePath)); + end; + + function TGPGraphicsPath.CloseAllFigures: TStatus; + begin + result := SetStatus(GdipClosePathFigures(nativePath)); + end; + + function TGPGraphicsPath.SetMarker: TStatus; + begin + result := SetStatus(GdipSetPathMarker(nativePath)); + end; + + function TGPGraphicsPath.ClearMarkers: TStatus; + begin + result := SetStatus(GdipClearPathMarkers(nativePath)); + end; + + function TGPGraphicsPath.Reverse: TStatus; + begin + result := SetStatus(GdipReversePath(nativePath)); + end; + + function TGPGraphicsPath.GetLastPoint(out lastPoint: TGPPointF): TStatus; + begin + result := SetStatus(GdipGetPathLastPoint(nativePath, + @lastPoint)); + end; + + function TGPGraphicsPath.AddLine(const pt1, pt2: TGPPointF): TStatus; + begin + result := AddLine(pt1.X, pt1.Y, pt2.X, pt2.Y); + end; + + function TGPGraphicsPath.AddLine(x1, y1, x2, y2: Single): TStatus; + begin + result := SetStatus(GdipAddPathLine(nativePath, x1, y1, + x2, y2)); + end; + + function TGPGraphicsPath.AddLines(points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathLine2(nativePath, points, count)); + end; + + function TGPGraphicsPath.AddLine(const pt1, pt2: TGPPoint): TStatus; + begin + result := AddLine(pt1.X, pt1.Y, pt2.X, pt2.Y); + end; + + function TGPGraphicsPath.AddLine(x1, y1, x2, y2: Integer): TStatus; + begin + result := SetStatus(GdipAddPathLineI(nativePath, x1, y1, x2, y2)); + end; + + function TGPGraphicsPath.AddLines(points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathLine2I(nativePath, points, count)); + end; + + function TGPGraphicsPath.AddArc(rect: TGPRectF; startAngle, sweepAngle: Single): TStatus; + begin + result := AddArc(rect.X, rect.Y, rect.Width, rect.Height, + startAngle, sweepAngle); + end; + + function TGPGraphicsPath.AddArc(x, y, width, height, startAngle, sweepAngle: Single): TStatus; + begin + result := SetStatus(GdipAddPathArc(nativePath, x, y, width, height, startAngle, sweepAngle)); + end; + + function TGPGraphicsPath.AddArc(rect: TGPRect; startAngle, sweepAngle: Single): TStatus; + begin + result := AddArc(rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); + end; + + function TGPGraphicsPath.AddArc(x, y, width, height: Integer; startAngle, sweepAngle: Single): TStatus; + begin + result := SetStatus(GdipAddPathArcI(nativePath, x, y, width, height, startAngle, sweepAngle)); + end; + + function TGPGraphicsPath.AddBezier(pt1, pt2, pt3, pt4: TGPPointF): TStatus; + begin + result := AddBezier(pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); + end; + + function TGPGraphicsPath.AddBezier(x1, y1, x2, y2, x3, y3, x4, y4: Single): TStatus; + begin + result := SetStatus(GdipAddPathBezier(nativePath, x1, y1, x2, y2, x3, y3, x4, y4)); + end; + + function TGPGraphicsPath.AddBeziers(points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathBeziers(nativePath, points, count)); + end; + + function TGPGraphicsPath.AddBezier(pt1, pt2, pt3, pt4: TGPPoint): TStatus; + begin + result := AddBezier(pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y); + end; + + function TGPGraphicsPath.AddBezier(x1, y1, x2, y2, x3, y3, x4, y4: Integer): TStatus; + begin + result := SetStatus(GdipAddPathBezierI(nativePath, x1, y1, x2, y2, x3, y3, x4, y4)); + end; + + function TGPGraphicsPath.AddBeziers(points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathBeziersI(nativePath, points, count)); + end; + + function TGPGraphicsPath.AddCurve(points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathCurve(nativePath, points, count)); + end; + + function TGPGraphicsPath.AddCurve(points: PGPPointF; count: Integer; + tension: Single): TStatus; + begin + result := SetStatus(GdipAddPathCurve2(nativePath, points, count, tension)); + end; + + function TGPGraphicsPath.AddCurve(points: PGPPointF; count, offset, + numberOfSegments: Integer; tension: Single): TStatus; + begin + result := SetStatus(GdipAddPathCurve3(nativePath, points, count, offset, + numberOfSegments, tension)); + end; + + function TGPGraphicsPath.AddCurve(points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathCurveI(nativePath, points, count)); + end; + + function TGPGraphicsPath.AddCurve(points: PGPPoint; count: Integer; tension: Single): TStatus; + begin + result := SetStatus(GdipAddPathCurve2I(nativePath, points, count, tension)); + end; + + function TGPGraphicsPath.AddCurve(points: PGPPoint; count, offset, + numberOfSegments: Integer; tension: Single): TStatus; + begin + result := SetStatus(GdipAddPathCurve3I(nativePath, points, count, offset, + numberOfSegments, tension)); + end; + + function TGPGraphicsPath.AddClosedCurve(points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathClosedCurve(nativePath, points, count)); + end; + + function TGPGraphicsPath.AddClosedCurve(points: PGPPointF; count: Integer; tension: Single): TStatus; + begin + result := SetStatus(GdipAddPathClosedCurve2(nativePath, points, count, tension)); + end; + + function TGPGraphicsPath.AddClosedCurve(points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathClosedCurveI(nativePath, points, count)); + end; + + + function TGPGraphicsPath.AddClosedCurve(points: PGPPoint; count: Integer; tension: Single): TStatus; + begin + result := SetStatus(GdipAddPathClosedCurve2I(nativePath, points, count, tension)); + end; + + function TGPGraphicsPath.AddRectangle(rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipAddPathRectangle(nativePath, + rect.X, + rect.Y, + rect.Width, + rect.Height)); + end; + + function TGPGraphicsPath.AddRectangles(rects: PGPRectF; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathRectangles(nativePath, + rects, + count)); + end; + + function TGPGraphicsPath.AddRectangle(rect: TGPRect): TStatus; + begin + result := SetStatus(GdipAddPathRectangleI(nativePath, + rect.X, + rect.Y, + rect.Width, + rect.Height)); + end; + + function TGPGraphicsPath.AddRectangles(rects: PGPRect; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathRectanglesI(nativePath, + rects, + count)); + end; + + function TGPGraphicsPath.AddEllipse(rect: TGPRectF): TStatus; + begin + result := AddEllipse(rect.X, rect.Y, rect.Width, rect.Height); + end; + + function TGPGraphicsPath.AddEllipse(x, y, width, height: Single): TStatus; + begin + result := SetStatus(GdipAddPathEllipse(nativePath, + x, + y, + width, + height)); + end; + + function TGPGraphicsPath.AddEllipse(rect: TGPRect): TStatus; + begin + result := AddEllipse(rect.X, rect.Y, rect.Width, rect.Height); + end; + + function TGPGraphicsPath.AddEllipse(x, y, width, height: Integer): TStatus; + begin + result := SetStatus(GdipAddPathEllipseI(nativePath, + x, + y, + width, + height)); + end; + + function TGPGraphicsPath.AddPie(rect: TGPRectF; startAngle, sweepAngle: Single): TStatus; + begin + result := AddPie(rect.X, rect.Y, rect.Width, rect.Height, startAngle, + sweepAngle); + end; + + function TGPGraphicsPath.AddPie(x, y, width, height, startAngle, sweepAngle: Single): TStatus; + begin + result := SetStatus(GdipAddPathPie(nativePath, x, y, width, + height, startAngle, + sweepAngle)); + end; + + function TGPGraphicsPath.AddPie(rect: TGPRect; startAngle, sweepAngle: Single): TStatus; + begin + result := AddPie(rect.X, + rect.Y, + rect.Width, + rect.Height, + startAngle, + sweepAngle); + end; + + function TGPGraphicsPath.AddPie(x, y, width, height: Integer; startAngle, sweepAngle: Single): TStatus; + begin + result := SetStatus(GdipAddPathPieI(nativePath, + x, + y, + width, + height, + startAngle, + sweepAngle)); + end; + + function TGPGraphicsPath.AddPolygon(points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathPolygon(nativePath, points, count)); + end; + + function TGPGraphicsPath.AddPolygon(points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipAddPathPolygonI(nativePath, points, + count)); + end; + + function TGPGraphicsPath.AddPath(addingPath: TGPGraphicsPath; connect: Bool): TStatus; + var + nativePath2: GpPath; + begin + nativePath2 := nil; + if assigned(addingPath) then nativePath2 := addingPath.nativePath; + result := SetStatus(GdipAddPathPath(nativePath, nativePath2, connect)); + end; + + function TGPGraphicsPath.AddString( + string_: WideString; length: Integer; + family : TGPFontFamily; + style : Integer; + emSize : Single; // World units + origin : TGPPointF; + format : TGPStringFormat): TStatus; + var + rect : TGPRectF; + gpff : GPFONTFAMILY; + gpsf : GPSTRINGFORMAT; + begin + rect.X := origin.X; + rect.Y := origin.Y; + rect.Width := 0.0; + rect.Height := 0.0; + + gpff := nil; + gpsf := nil; + if assigned(family) then gpff := family.nativeFamily; + if assigned(format) then gpsf := format.nativeFormat; + result := SetStatus(GdipAddPathString(nativePath, PWideChar(string_), length, gpff, + style, emSize, @rect, gpsf)); + end; + + function TGPGraphicsPath.AddString( + string_: WideString; + length : Integer; + family : TGPFontFamily; + style : Integer; + emSize : Single; // World units + layoutRect: TGPRectF; + format : TGPStringFormat): TStatus; + var + gpff : GPFONTFAMILY; + gpsf : GPSTRINGFORMAT; + begin + gpff := nil; + gpsf := nil; + if assigned(family) then gpff := family.nativeFamily; + if assigned(format) then gpsf := format.nativeFormat; + result := SetStatus(GdipAddPathString( nativePath, PWideChar(string_), length, gpff, + style, emSize, @layoutRect, gpsf)); + end; + + function TGPGraphicsPath.AddString( + string_: WideString; + length : Integer; + family : TGPFontFamily; + style : Integer; + emSize : Single; // World units + origin : TGPPoint; + format : TGPStringFormat): TStatus; + var + rect : TGPRect; + gpff : GPFONTFAMILY; + gpsf : GPSTRINGFORMAT; + begin + rect.X := origin.X; + rect.Y := origin.Y; + rect.Width := 0; + rect.Height := 0; + gpff := nil; + gpsf := nil; + if assigned(family) then gpff := family.nativeFamily; + if assigned(format) then gpsf := format.nativeFormat; + result := SetStatus(GdipAddPathStringI(nativePath, PWideChar(string_), length, gpff, + style, emSize, @rect, gpsf)); + end; + + function TGPGraphicsPath.AddString( + string_: WideString; + length : Integer; + family : TGPFontFamily; + style : Integer; + emSize : Single; // World units + layoutRect: TGPRect; + format : TGPStringFormat): TStatus; + var + gpff : GPFONTFAMILY; + gpsf : GPSTRINGFORMAT; + begin + gpff := nil; + gpsf := nil; + if assigned(family) then gpff := family.nativeFamily; + if assigned(format) then gpsf := format.nativeFormat; + result := SetStatus(GdipAddPathStringI( nativePath, PWideChar(string_), length, gpff, + style, emSize, @layoutRect, gpsf)); + end; + + function TGPGraphicsPath.Transform(matrix: TGPMatrix): TStatus; + begin + if assigned(matrix) then + result := SetStatus(GdipTransformPath(nativePath, matrix.nativeMatrix)) + else + result := Ok; + end; + + // This is not always the tightest bounds. + + function TGPGraphicsPath.GetBounds(out bounds: TGPRectF; matrix: TGPMatrix = nil; pen: TGPPen = nil): TStatus; + var + nativeMatrix: GpMatrix; + nativePen: GpPen; + begin + nativeMatrix := nil; + nativePen := nil; + if assigned(matrix) then nativeMatrix := matrix.nativeMatrix; + if assigned(pen) then nativePen := pen.nativePen; + + result := SetStatus(GdipGetPathWorldBounds(nativePath, @bounds, nativeMatrix, nativePen)); + end; + + function TGPGraphicsPath.GetBounds(out bounds: TGPRect; matrix: TGPMatrix = nil; pen: TGPPen = nil): TStatus; + var + nativeMatrix: GpMatrix; + nativePen: GpPen; + begin + nativeMatrix := nil; + nativePen := nil; + if assigned(matrix) then nativeMatrix := matrix.nativeMatrix; + if assigned(pen) then nativePen := pen.nativePen; + + result := SetStatus(GdipGetPathWorldBoundsI(nativePath, @bounds, nativeMatrix, nativePen)); + end; + + // Once flattened, the resultant path is made of line segments and + // the original path information is lost. When matrix is nil the + // identity matrix is assumed. + + function TGPGraphicsPath.Flatten(matrix: TGPMatrix = nil; flatness: Single = FlatnessDefault): TStatus; + var nativeMatrix: GpMatrix; + begin + nativeMatrix := nil; + if assigned(matrix) then nativeMatrix := matrix.nativeMatrix; + result := SetStatus(GdipFlattenPath(nativePath, nativeMatrix, flatness)); + end; + + function TGPGraphicsPath.Widen(pen: TGPPen; matrix: TGPMatrix = nil; flatness: Single = FlatnessDefault): TStatus; + var nativeMatrix: GpMatrix; + begin + nativeMatrix := nil; + if assigned(matrix) then nativeMatrix := matrix.nativeMatrix; + result := SetStatus(GdipWidenPath(nativePath, pen.nativePen, nativeMatrix, flatness)); + end; + + function TGPGraphicsPath.Outline(matrix: TGPMatrix = nil; flatness: Single = FlatnessDefault): TStatus; + var nativeMatrix: GpMatrix; + begin + nativeMatrix := nil; + if assigned(matrix) then nativeMatrix := matrix.nativeMatrix; + result := SetStatus(GdipWindingModeOutline(nativePath, nativeMatrix, flatness)); + end; + + // Once this is called, the resultant path is made of line segments and + // the original path information is lost. When matrix is nil, the + // identity matrix is assumed. + + function TGPGraphicsPath.Warp(destPoints: PGPPointF; count: Integer; srcRect: TGPRectF; + matrix: TGPMatrix = nil; warpMode: TWarpMode = WarpModePerspective; + flatness: Single = FlatnessDefault): TStatus; + var nativeMatrix: GpMatrix; + begin + nativeMatrix := nil; + if assigned(matrix) then nativeMatrix := matrix.nativeMatrix; + result := SetStatus(GdipWarpPath(nativePath, nativeMatrix, destPoints, + count, srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, + warpMode, flatness)); + end; + + function TGPGraphicsPath.GetPointCount: Integer; + var count: Integer; + begin + count := 0; + SetStatus(GdipGetPointCount(nativePath, count)); + result := count; + end; + + function TGPGraphicsPath.GetPathTypes(types: PBYTE; count: Integer): TStatus; + begin + result := SetStatus(GdipGetPathTypes(nativePath, types, count)); + end; + + function TGPGraphicsPath.GetPathPoints(points: PGPPointF; count: Integer): TStatus; + begin + result := SetStatus(GdipGetPathPoints(nativePath, points, count)); + end; + + function TGPGraphicsPath.GetPathPoints(points: PGPPoint; count: Integer): TStatus; + begin + result := SetStatus(GdipGetPathPointsI(nativePath, points, count)); + end; + + function TGPGraphicsPath.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + + function TGPGraphicsPath.IsVisible(point: TGPPointF; g: TGPGraphics = nil): BOOL; + begin + result := IsVisible(point.X, point.Y, g); + end; + + function TGPGraphicsPath.IsVisible(x, y: Single; g: TGPGraphics = nil): BOOL; + var + booln: BOOL; + nativeGraphics: GpGraphics; + begin + booln := FALSE; + nativeGraphics := nil; + if assigned(g) then nativeGraphics := g.nativeGraphics; + SetStatus(GdipIsVisiblePathPoint(nativePath, x, y, nativeGraphics, booln)); + result := booln; + end; + + function TGPGraphicsPath.IsVisible(point: TGPPoint; g : TGPGraphics = nil): BOOL; + begin + result := IsVisible(point.X, point.Y, g); + end; + + function TGPGraphicsPath.IsVisible(x, y: Integer; g: TGPGraphics = nil): BOOL; + var + booln: BOOL; + nativeGraphics: GpGraphics; + begin + booln := FALSE; + nativeGraphics := nil; + if assigned(g) then nativeGraphics := g.nativeGraphics; + SetStatus(GdipIsVisiblePathPointI(nativePath, x, y, nativeGraphics, booln)); + result := booln; + end; + + function TGPGraphicsPath.IsOutlineVisible(point: TGPPointF; pen: TGPPen; g: TGPGraphics = nil): BOOL; + begin + result := IsOutlineVisible(point.X, point.Y, pen, g); + end; + + function TGPGraphicsPath.IsOutlineVisible(x, y: Single; pen: TGPPen; g: TGPGraphics = nil): BOOL; + var + booln: BOOL; + nativeGraphics: GpGraphics; + nativePen: GpPen; + begin + booln := FALSE; + nativeGraphics := nil; + nativePen := nil; + if assigned(g) then nativeGraphics := g.nativeGraphics; + if assigned(pen) then nativePen := pen.nativePen; + SetStatus(GdipIsOutlineVisiblePathPoint(nativePath, x, y, nativePen, + nativeGraphics, booln)); + result := booln; + end; + + function TGPGraphicsPath.IsOutlineVisible(point: TGPPoint; pen: TGPPen; g: TGPGraphics = nil): BOOL; + begin + result := IsOutlineVisible(point.X, point.Y, pen, g); + end; + + function TGPGraphicsPath.IsOutlineVisible(x, y: Integer; pen: TGPPen; g: TGPGraphics = nil): BOOL; + var + booln: BOOL; + nativeGraphics: GpGraphics; + nativePen: GpPen; + begin + booln := FALSE; + nativeGraphics := nil; + nativePen := nil; + if assigned(g) then nativeGraphics := g.nativeGraphics; + if assigned(pen) then nativePen := pen.nativePen; + SetStatus(GdipIsOutlineVisiblePathPointI(nativePath, x, y, nativePen, + nativeGraphics, booln)); + result := booln; + end; + + constructor TGPGraphicsPath.Create(path: TGPGraphicsPath); + var clonepath: GpPath; + begin + clonepath := nil; + SetStatus(GdipClonePath(path.nativePath, clonepath)); + SetNativePath(clonepath); + end; + + constructor TGPGraphicsPath.Create(nativePath: GpPath); + begin + lastResult := Ok; + SetNativePath(nativePath); + end; + + procedure TGPGraphicsPath.SetNativePath(nativePath: GpPath); + begin + self.nativePath := nativePath; + end; + + function TGPGraphicsPath.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then LastResult := status; + result := status; + end; + +//-------------------------------------------------------------------------- +// GraphisPathIterator class +//-------------------------------------------------------------------------- + + constructor TGPGraphicsPathIterator.Create(path: TGPGraphicsPath); + var + nativePath: GpPath; + iter: GpPathIterator; + begin + nativePath := nil; + if assigned(path) then nativePath := path.nativePath; + iter := nil; + lastResult := GdipCreatePathIter(iter, nativePath); + SetNativeIterator(iter); + end; + + destructor TGPGraphicsPathIterator.Destroy; + begin + GdipDeletePathIter(nativeIterator); + end; + + + function TGPGraphicsPathIterator.NextSubpath(out startIndex, endIndex: Integer; out isClosed: bool): Integer; + begin + SetStatus(GdipPathIterNextSubpath(nativeIterator, result, startIndex, endIndex, isClosed)); + end; + + function TGPGraphicsPathIterator.NextSubpath(path: TGPGraphicsPath; out isClosed: BOOL): Integer; + var + nativePath: GpPath; + resultCount: Integer; + begin + nativePath := nil; + if assigned(path) then nativePath := path.nativePath; + SetStatus(GdipPathIterNextSubpathPath(nativeIterator, resultCount, + nativePath, isClosed)); + result := resultCount; + end; + + function TGPGraphicsPathIterator.NextPathType(out pathType: TPathPointType; out startIndex, endIndex: Integer): Integer; + var + resultCount: Integer; + begin + SetStatus(GdipPathIterNextPathType(nativeIterator, resultCount, @pathType, + startIndex, endIndex)); + result := resultCount; + end; + + function TGPGraphicsPathIterator.NextMarker(out startIndex, endIndex: Integer): Integer; + begin + SetStatus(GdipPathIterNextMarker(nativeIterator, result, startIndex, endIndex)); + end; + + function TGPGraphicsPathIterator.NextMarker(path: TGPGraphicsPath): Integer; + var nativePath: GpPath; + begin + nativePath := nil; + if assigned(path) then nativePath := path.nativePath; + SetStatus(GdipPathIterNextMarkerPath(nativeIterator, result, nativePath)); + end; + + function TGPGraphicsPathIterator.GetCount: Integer; + begin + SetStatus(GdipPathIterGetCount(nativeIterator, result)); + end; + + function TGPGraphicsPathIterator.GetSubpathCount: Integer; + begin + SetStatus(GdipPathIterGetSubpathCount(nativeIterator, result)); + end; + + function TGPGraphicsPathIterator.HasCurve: BOOL; + begin + SetStatus(GdipPathIterHasCurve(nativeIterator, result)); + end; + + procedure TGPGraphicsPathIterator.Rewind; + begin + SetStatus(GdipPathIterRewind(nativeIterator)); + end; + + function TGPGraphicsPathIterator.Enumerate(points: PGPPointF; types: PBYTE; + count: Integer): Integer; + begin + SetStatus(GdipPathIterEnumerate(nativeIterator, result, points, types, count)); + end; + + function TGPGraphicsPathIterator.CopyData(points: PGPPointF; types: PBYTE; + startIndex, endIndex: Integer): Integer; + begin + SetStatus(GdipPathIterCopyData(nativeIterator, result, points, types, + startIndex, endIndex)); + end; + + function TGPGraphicsPathIterator.GetLastStatus: TStatus; + begin + result := lastResult; + lastResult := Ok; + end; + + procedure TGPGraphicsPathIterator.SetNativeIterator(nativeIterator: GpPathIterator); + begin + self.nativeIterator := nativeIterator; + end; + + function TGPGraphicsPathIterator.SetStatus(status: TStatus): TStatus; + begin + if (status <> Ok) then lastResult := status; + result := status; + end; + +//-------------------------------------------------------------------------- +// Path Gradient Brush +//-------------------------------------------------------------------------- + + constructor TGPPathGradientBrush.Create(points: PGPPointF; count: Integer; wrapMode: TWrapMode = WrapModeClamp); + var brush: GpPathGradient; + begin + brush := nil; + lastResult := GdipCreatePathGradient(points, count, wrapMode, brush); + SetNativeBrush(brush); + end; + + constructor TGPPathGradientBrush.Create(points: PGPPoint; count: Integer; wrapMode: TWrapMode = WrapModeClamp); + var brush: GpPathGradient; + begin + brush := nil; + lastResult := GdipCreatePathGradientI(points, count, wrapMode, brush); + SetNativeBrush(brush); + end; + + constructor TGPPathGradientBrush.Create(path: TGPGraphicsPath); + var brush: GpPathGradient; + begin + brush := nil; + lastResult := GdipCreatePathGradientFromPath(path.nativePath, brush); + SetNativeBrush(brush); + end; + + function TGPPathGradientBrush.GetCenterColor(out Color: TGPColor): TStatus; + begin + SetStatus(GdipGetPathGradientCenterColor(GpPathGradient(nativeBrush), Color)); + result := lastResult; + end; + + function TGPPathGradientBrush.SetCenterColor(color: TGPColor): TStatus; + begin + SetStatus(GdipSetPathGradientCenterColor(GpPathGradient(nativeBrush),color)); + result := lastResult; + end; + + function TGPPathGradientBrush.GetPointCount: Integer; + begin + SetStatus(GdipGetPathGradientPointCount(GpPathGradient(nativeBrush), result)); + end; + + function TGPPathGradientBrush.GetSurroundColorCount: Integer; + begin + SetStatus(GdipGetPathGradientSurroundColorCount(GpPathGradient(nativeBrush), result)); + end; + + function TGPPathGradientBrush.GetSurroundColors(colors: PARGB; var count: Integer): TStatus; + var + count1: Integer; + begin + if not assigned(colors) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + + SetStatus(GdipGetPathGradientSurroundColorCount(GpPathGradient(nativeBrush), count1)); + + if(lastResult <> Ok) then + begin + result := lastResult; + exit; + end; + + if((count < count1) or (count1 <= 0)) then + begin + result := SetStatus(InsufficientBuffer); + exit; + end; + + SetStatus(GdipGetPathGradientSurroundColorsWithCount(GpPathGradient(nativeBrush), colors, count1)); + if(lastResult = Ok) then + count := count1; + + result := lastResult; + end; + + function TGPPathGradientBrush.SetSurroundColors(colors: PARGB; var count: Integer): TStatus; + var + count1: Integer; + type + TDynArrDWORD = array of DWORD; + begin + if (colors = nil) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + + count1 := GetPointCount; + + if((count > count1) or (count1 <= 0)) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + + count1 := count; + + SetStatus(GdipSetPathGradientSurroundColorsWithCount( + GpPathGradient(nativeBrush), colors, count1)); + + if(lastResult = Ok) then count := count1; + result := lastResult; + end; + + function TGPPathGradientBrush.GetGraphicsPath(path: TGPGraphicsPath): TStatus; + begin + if(path = nil) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + result := SetStatus(GdipGetPathGradientPath(GpPathGradient(nativeBrush), path.nativePath)); + end; + + function TGPPathGradientBrush.SetGraphicsPath(path: TGPGraphicsPath): TStatus; + begin + if(path = nil) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + result := SetStatus(GdipSetPathGradientPath(GpPathGradient(nativeBrush), path.nativePath)); + end; + + function TGPPathGradientBrush.GetCenterPoint(out point: TGPPointF): TStatus; + begin + result := SetStatus(GdipGetPathGradientCenterPoint(GpPathGradient(nativeBrush), @point)); + end; + + function TGPPathGradientBrush.GetCenterPoint(out point: TGPPoint): TStatus; + begin + result := SetStatus(GdipGetPathGradientCenterPointI(GpPathGradient(nativeBrush), @point)); + end; + + function TGPPathGradientBrush.SetCenterPoint(point: TGPPointF): TStatus; + begin + result := SetStatus(GdipSetPathGradientCenterPoint(GpPathGradient(nativeBrush), @point)); + end; + + function TGPPathGradientBrush.SetCenterPoint(point: TGPPoint): TStatus; + begin + result := SetStatus(GdipSetPathGradientCenterPointI(GpPathGradient(nativeBrush), @point)); + end; + + function TGPPathGradientBrush.GetRectangle(out rect: TGPRectF): TStatus; + begin + result := SetStatus(GdipGetPathGradientRect(GpPathGradient(nativeBrush), @rect)); + end; + + function TGPPathGradientBrush.GetRectangle(out rect: TGPRect): TStatus; + begin + result := SetStatus(GdipGetPathGradientRectI(GpPathGradient(nativeBrush), @rect)); + end; + + function TGPPathGradientBrush.SetGammaCorrection(useGammaCorrection: BOOL): TStatus; + begin + result := SetStatus(GdipSetPathGradientGammaCorrection(GpPathGradient(nativeBrush), + useGammaCorrection)); + end; + + function TGPPathGradientBrush.GetGammaCorrection: BOOL; + begin + SetStatus(GdipGetPathGradientGammaCorrection(GpPathGradient(nativeBrush), result)); + end; + + function TGPPathGradientBrush.GetBlendCount: Integer; + var count: Integer; + begin + count := 0; + SetStatus(GdipGetPathGradientBlendCount(GpPathGradient(nativeBrush), count)); + result := count; + end; + + function TGPPathGradientBrush.GetBlend(blendFactors, blendPositions:PSingle; count: Integer): TStatus; + begin + result := SetStatus(GdipGetPathGradientBlend( + GpPathGradient(nativeBrush), + blendFactors, blendPositions, count)); + end; + + function TGPPathGradientBrush.SetBlend(blendFactors, blendPositions: PSingle; count: Integer): TStatus; + begin + result := SetStatus(GdipSetPathGradientBlend( + GpPathGradient(nativeBrush), + blendFactors, blendPositions, count)); + end; + + function TGPPathGradientBrush.GetInterpolationColorCount: Integer; + var count: Integer; + begin + count := 0; + SetStatus(GdipGetPathGradientPresetBlendCount(GpPathGradient(nativeBrush), count)); + result := count; + end; + + function TGPPathGradientBrush.SetInterpolationColors(presetColors: PARGB; + blendPositions: PSingle; count: Integer): TStatus; + var + status: TStatus; + begin + if ((count <= 0) or (presetColors = nil)) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + + status := SetStatus(GdipSetPathGradientPresetBlend(GpPathGradient(nativeBrush), + presetColors, blendPositions, count)); + result := status; + end; + + function TGPPathGradientBrush.GetInterpolationColors(presetColors: PARGB; + blendPositions: PSingle; count: Integer): TStatus; + var + status: GpStatus; + i: Integer; + argbs: PARGB; + begin + if ((count <= 0) or (presetColors = nil)) then + begin + result := SetStatus(InvalidParameter); + exit; + end; + getmem(argbs, count*SizeOf(ARGB)); + if (argbs = nil) then + begin + result := SetStatus(OutOfMemory); + exit; + end; + + status := SetStatus(GdipGetPathGradientPresetBlend(nativeBrush, argbs, + blendPositions, count)); + + for i := 0 to count - 1 do + TColorDynArray(presetColors)[i] := TColorDynArray(argbs)[i]; + + freemem(argbs); + + result := status; + end; + + function TGPPathGradientBrush.SetBlendBellShape(focus: Single; scale: Single = 1.0): TStatus; + begin + result := SetStatus(GdipSetPathGradientSigmaBlend(GpPathGradient(nativeBrush), focus, scale)); + end; + + function TGPPathGradientBrush.SetBlendTriangularShape(focus: Single; scale: Single = 1.0): TStatus; + begin + result := SetStatus(GdipSetPathGradientLinearBlend(GpPathGradient(nativeBrush), focus, scale)); + end; + + function TGPPathGradientBrush.GetTransform(matrix: TGPMatrix): TStatus; + begin + result := SetStatus(GdipGetPathGradientTransform(GpPathGradient(nativeBrush), + matrix.nativeMatrix)); + end; + + function TGPPathGradientBrush.SetTransform(matrix: TGPMatrix): TStatus; + begin + result := SetStatus(GdipSetPathGradientTransform( + GpPathGradient(nativeBrush), + matrix.nativeMatrix)); + end; + + function TGPPathGradientBrush.ResetTransform: TStatus; + begin + result := SetStatus(GdipResetPathGradientTransform( + GpPathGradient(nativeBrush))); + end; + + function TGPPathGradientBrush.MultiplyTransform(matrix: TGPMatrix; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipMultiplyPathGradientTransform( + GpPathGradient(nativeBrush), + matrix.nativeMatrix, + order)); + end; + + function TGPPathGradientBrush.TranslateTransform(dx, dy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipTranslatePathGradientTransform( + GpPathGradient(nativeBrush), + dx, dy, order)); + end; + + function TGPPathGradientBrush.ScaleTransform(sx, sy: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipScalePathGradientTransform( + GpPathGradient(nativeBrush), + sx, sy, order)); + end; + + function TGPPathGradientBrush.RotateTransform(angle: Single; order: TMatrixOrder = MatrixOrderPrepend): TStatus; + begin + result := SetStatus(GdipRotatePathGradientTransform( + GpPathGradient(nativeBrush), + angle, order)); + end; + + function TGPPathGradientBrush.GetFocusScales(out xScale, yScale: Single): TStatus; + begin + result := SetStatus(GdipGetPathGradientFocusScales( + GpPathGradient(nativeBrush), xScale, yScale)); + end; + + function TGPPathGradientBrush.SetFocusScales(xScale, yScale: Single): TStatus; + begin + result := SetStatus(GdipSetPathGradientFocusScales( + GpPathGradient(nativeBrush), xScale, yScale)); + end; + + function TGPPathGradientBrush.GetWrapMode: TWrapMode; + begin + SetStatus(GdipGetPathGradientWrapMode(GpPathGradient(nativeBrush), result)); + end; + + function TGPPathGradientBrush.SetWrapMode(wrapMode: TWrapMode): TStatus; + begin + result := SetStatus(GdipSetPathGradientWrapMode( + GpPathGradient(nativeBrush), wrapMode)); + end; + + constructor TGPPathGradientBrush.Create; + begin + // йcrase la fonction parent + end; + +initialization +begin + // Initialize StartupInput structure + StartupInput.DebugEventCallback := nil; + StartupInput.SuppressBackgroundThread := False; + StartupInput.SuppressExternalCodecs := False; + StartupInput.GdiplusVersion := 1; + // Initialize GDI+ + GdiplusStartup(gdiplusToken, @StartupInput, nil); + +end; + +finalization +begin + + if assigned(GenericSansSerifFontFamily) then GenericSansSerifFontFamily.Free; + if assigned(GenericSerifFontFamily) then GenericSerifFontFamily.Free; + if assigned(GenericMonospaceFontFamily) then GenericMonospaceFontFamily.Free; + + if assigned(GenericTypographicStringFormatBuffer) then GenericTypographicStringFormatBuffer.free; + if assigned(GenericDefaultStringFormatBuffer) then GenericDefaultStringFormatBuffer.Free; + + // Close GDI + + GdiplusShutdown(gdiplusToken); +end; + +end. diff --git a/Pramougolnik/GDIPUTIL.pas b/Pramougolnik/GDIPUTIL.pas new file mode 100644 index 0000000..22cbe89 --- /dev/null +++ b/Pramougolnik/GDIPUTIL.pas @@ -0,0 +1,378 @@ + {******************************************************************} + { GDI+ Util } + { } + { home page : http://www.progdigy.com } + { email : hgourvest@progdigy.com } + { } + { date : 15-02-2002 } + { } + { The contents of this file are used with permission, subject to } + { the Mozilla Public License Version 1.1 (the "License"); you may } + { not use this file except in compliance with the License. You may } + { obtain a copy of the License at } + { http://www.mozilla.org/MPL/MPL-1.1.html } + { } + { Software distributed under the License is distributed on an } + { "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or } + { implied. See the License for the specific language governing } + { rights and limitations under the License. } + { } + { *****************************************************************} + +unit GDIPUTIL; + +interface +uses + Windows, + GDIPAPI, + GDIPOBJ; + +function ValueTypeFromULONG(Type_: ULONG): String; +function GetMetaDataIDString(id: ULONG): string; +function GetEncoderClsid(format: String; out pClsid: TGUID): integer; +function GetStatus(Stat: TStatus): string; +function PixelFormatString(PixelFormat: TPixelFormat): string; + +{from WinNT.h} +// creates a language identifier from a primary language identifier and a +// sublanguage identifier for the TStringFormat & TFontFamily class. +function MakeLangID(PrimaryLanguage, SubLanguage: LANGID): WORD; + +implementation + +function ValueTypeFromULONG(Type_: ULONG): String; +begin + case Type_ of + 0 : result := 'Nothing'; + 1 : result := 'PropertyTagTypeByte'; + 2 : result := 'PropertyTagTypeASCII'; + 3 : result := 'PropertyTagTypeShort'; + 4 : result := 'PropertyTagTypeLong'; + 5 : result := 'PropertyTagTypeRational'; + 6 : result := 'Nothing'; + 7 : result := 'PropertyTagTypeUndefined'; + 8 : result := 'Nothing'; + 9 : result := 'PropertyTagTypeSLONG'; + 10: result := 'PropertyTagTypeSRational'; + else + result := ''; + end; +end; + +function GetMetaDataIDString(id: ULONG): string; +begin + case id of + PropertyTagExifIFD : result := 'PropertyTagExifIFD'; + PropertyTagGpsIFD : result := 'PropertyTagGpsIFD'; + PropertyTagNewSubfileType : result := 'PropertyTagNewSubfileType'; + PropertyTagSubfileType : result := 'PropertyTagSubfileType'; + PropertyTagImageWidth : result := 'PropertyTagImageWidth'; + PropertyTagImageHeight : result := 'PropertyTagImageHeight'; + PropertyTagBitsPerSample : result := 'PropertyTagBitsPerSample'; + PropertyTagCompression : result := 'PropertyTagCompression'; + PropertyTagPhotometricInterp : result := 'PropertyTagPhotometricInterp'; + PropertyTagThreshHolding : result := 'PropertyTagThreshHolding'; + PropertyTagCellWidth : result := 'PropertyTagCellWidth'; + PropertyTagCellHeight : result := 'PropertyTagCellHeight'; + PropertyTagFillOrder : result := 'PropertyTagFillOrder'; + PropertyTagDocumentName : result := 'PropertyTagDocumentName'; + PropertyTagImageDescription : result := 'PropertyTagImageDescription'; + PropertyTagEquipMake : result := 'PropertyTagEquipMake'; + PropertyTagEquipModel : result := 'PropertyTagEquipModel'; + PropertyTagStripOffsets : result := 'PropertyTagStripOffsets'; + PropertyTagOrientation : result := 'PropertyTagOrientation'; + PropertyTagSamplesPerPixel : result := 'PropertyTagSamplesPerPixel'; + PropertyTagRowsPerStrip : result := 'PropertyTagRowsPerStrip'; + PropertyTagStripBytesCount : result := 'PropertyTagStripBytesCount'; + PropertyTagMinSampleValue : result := 'PropertyTagMinSampleValue'; + PropertyTagMaxSampleValue : result := 'PropertyTagMaxSampleValue'; + PropertyTagXResolution : result := 'PropertyTagXResolution'; + PropertyTagYResolution : result := 'PropertyTagYResolution'; + PropertyTagPlanarConfig : result := 'PropertyTagPlanarConfig'; + PropertyTagPageName : result := 'PropertyTagPageName'; + PropertyTagXPosition : result := 'PropertyTagXPosition'; + PropertyTagYPosition : result := 'PropertyTagYPosition'; + PropertyTagFreeOffset : result := 'PropertyTagFreeOffset'; + PropertyTagFreeByteCounts : result := 'PropertyTagFreeByteCounts'; + PropertyTagGrayResponseUnit : result := 'PropertyTagGrayResponseUnit'; + PropertyTagGrayResponseCurve : result := 'PropertyTagGrayResponseCurve'; + PropertyTagT4Option : result := 'PropertyTagT4Option'; + PropertyTagT6Option : result := 'PropertyTagT6Option'; + PropertyTagResolutionUnit : result := 'PropertyTagResolutionUnit'; + PropertyTagPageNumber : result := 'PropertyTagPageNumber'; + PropertyTagTransferFuncition : result := 'PropertyTagTransferFuncition'; + PropertyTagSoftwareUsed : result := 'PropertyTagSoftwareUsed'; + PropertyTagDateTime : result := 'PropertyTagDateTime'; + PropertyTagArtist : result := 'PropertyTagArtist'; + PropertyTagHostComputer : result := 'PropertyTagHostComputer'; + PropertyTagPredictor : result := 'PropertyTagPredictor'; + PropertyTagWhitePoint : result := 'PropertyTagWhitePoint'; + PropertyTagPrimaryChromaticities : result := 'PropertyTagPrimaryChromaticities'; + PropertyTagColorMap : result := 'PropertyTagColorMap'; + PropertyTagHalftoneHints : result := 'PropertyTagHalftoneHints'; + PropertyTagTileWidth : result := 'PropertyTagTileWidth'; + PropertyTagTileLength : result := 'PropertyTagTileLength'; + PropertyTagTileOffset : result := 'PropertyTagTileOffset'; + PropertyTagTileByteCounts : result := 'PropertyTagTileByteCounts'; + PropertyTagInkSet : result := 'PropertyTagInkSet'; + PropertyTagInkNames : result := 'PropertyTagInkNames'; + PropertyTagNumberOfInks : result := 'PropertyTagNumberOfInks'; + PropertyTagDotRange : result := 'PropertyTagDotRange'; + PropertyTagTargetPrinter : result := 'PropertyTagTargetPrinter'; + PropertyTagExtraSamples : result := 'PropertyTagExtraSamples'; + PropertyTagSampleFormat : result := 'PropertyTagSampleFormat'; + PropertyTagSMinSampleValue : result := 'PropertyTagSMinSampleValue'; + PropertyTagSMaxSampleValue : result := 'PropertyTagSMaxSampleValue'; + PropertyTagTransferRange : result := 'PropertyTagTransferRange'; + PropertyTagJPEGProc : result := 'PropertyTagJPEGProc'; + PropertyTagJPEGInterFormat : result := 'PropertyTagJPEGInterFormat'; + PropertyTagJPEGInterLength : result := 'PropertyTagJPEGInterLength'; + PropertyTagJPEGRestartInterval : result := 'PropertyTagJPEGRestartInterval'; + PropertyTagJPEGLosslessPredictors : result := 'PropertyTagJPEGLosslessPredictors'; + PropertyTagJPEGPointTransforms : result := 'PropertyTagJPEGPointTransforms'; + PropertyTagJPEGQTables : result := 'PropertyTagJPEGQTables'; + PropertyTagJPEGDCTables : result := 'PropertyTagJPEGDCTables'; + PropertyTagJPEGACTables : result := 'PropertyTagJPEGACTables'; + PropertyTagYCbCrCoefficients : result := 'PropertyTagYCbCrCoefficients'; + PropertyTagYCbCrSubsampling : result := 'PropertyTagYCbCrSubsampling'; + PropertyTagYCbCrPositioning : result := 'PropertyTagYCbCrPositioning'; + PropertyTagREFBlackWhite : result := 'PropertyTagREFBlackWhite'; + PropertyTagICCProfile : result := 'PropertyTagICCProfile'; + PropertyTagGamma : result := 'PropertyTagGamma'; + PropertyTagICCProfileDescriptor : result := 'PropertyTagICCProfileDescriptor'; + PropertyTagSRGBRenderingIntent : result := 'PropertyTagSRGBRenderingIntent'; + PropertyTagImageTitle : result := 'PropertyTagImageTitle'; + PropertyTagCopyright : result := 'PropertyTagCopyright'; + PropertyTagResolutionXUnit : result := 'PropertyTagResolutionXUnit'; + PropertyTagResolutionYUnit : result := 'PropertyTagResolutionYUnit'; + PropertyTagResolutionXLengthUnit : result := 'PropertyTagResolutionXLengthUnit'; + PropertyTagResolutionYLengthUnit : result := 'PropertyTagResolutionYLengthUnit'; + PropertyTagPrintFlags : result := 'PropertyTagPrintFlags'; + PropertyTagPrintFlagsVersion : result := 'PropertyTagPrintFlagsVersion'; + PropertyTagPrintFlagsCrop : result := 'PropertyTagPrintFlagsCrop'; + PropertyTagPrintFlagsBleedWidth : result := 'PropertyTagPrintFlagsBleedWidth'; + PropertyTagPrintFlagsBleedWidthScale : result := 'PropertyTagPrintFlagsBleedWidthScale'; + PropertyTagHalftoneLPI : result := 'PropertyTagHalftoneLPI'; + PropertyTagHalftoneLPIUnit : result := 'PropertyTagHalftoneLPIUnit'; + PropertyTagHalftoneDegree : result := 'PropertyTagHalftoneDegree'; + PropertyTagHalftoneShape : result := 'PropertyTagHalftoneShape'; + PropertyTagHalftoneMisc : result := 'PropertyTagHalftoneMisc'; + PropertyTagHalftoneScreen : result := 'PropertyTagHalftoneScreen'; + PropertyTagJPEGQuality : result := 'PropertyTagJPEGQuality'; + PropertyTagGridSize : result := 'PropertyTagGridSize'; + PropertyTagThumbnailFormat : result := 'PropertyTagThumbnailFormat'; + PropertyTagThumbnailWidth : result := 'PropertyTagThumbnailWidth'; + PropertyTagThumbnailHeight : result := 'PropertyTagThumbnailHeight'; + PropertyTagThumbnailColorDepth : result := 'PropertyTagThumbnailColorDepth'; + PropertyTagThumbnailPlanes : result := 'PropertyTagThumbnailPlanes'; + PropertyTagThumbnailRawBytes : result := 'PropertyTagThumbnailRawBytes'; + PropertyTagThumbnailSize : result := 'PropertyTagThumbnailSize'; + PropertyTagThumbnailCompressedSize : result := 'PropertyTagThumbnailCompressedSize'; + PropertyTagColorTransferFunction : result := 'PropertyTagColorTransferFunction'; + PropertyTagThumbnailData : result := 'PropertyTagThumbnailData'; + PropertyTagThumbnailImageWidth : result := 'PropertyTagThumbnailImageWidth'; + PropertyTagThumbnailImageHeight : result := 'PropertyTagThumbnailImageHeight'; + PropertyTagThumbnailBitsPerSample : result := 'PropertyTagThumbnailBitsPerSample'; + PropertyTagThumbnailCompression : result := 'PropertyTagThumbnailCompression'; + PropertyTagThumbnailPhotometricInterp : result := 'PropertyTagThumbnailPhotometricInterp'; + PropertyTagThumbnailImageDescription : result := 'PropertyTagThumbnailImageDescription'; + PropertyTagThumbnailEquipMake : result := 'PropertyTagThumbnailEquipMake'; + PropertyTagThumbnailEquipModel : result := 'PropertyTagThumbnailEquipModel'; + PropertyTagThumbnailStripOffsets : result := 'PropertyTagThumbnailStripOffsets'; + PropertyTagThumbnailOrientation : result := 'PropertyTagThumbnailOrientation'; + PropertyTagThumbnailSamplesPerPixel : result := 'PropertyTagThumbnailSamplesPerPixel'; + PropertyTagThumbnailRowsPerStrip : result := 'PropertyTagThumbnailRowsPerStrip'; + PropertyTagThumbnailStripBytesCount : result := 'PropertyTagThumbnailStripBytesCount'; + PropertyTagThumbnailResolutionX : result := 'PropertyTagThumbnailResolutionX'; + PropertyTagThumbnailResolutionY : result := 'PropertyTagThumbnailResolutionY'; + PropertyTagThumbnailPlanarConfig : result := 'PropertyTagThumbnailPlanarConfig'; + PropertyTagThumbnailResolutionUnit : result := 'PropertyTagThumbnailResolutionUnit'; + PropertyTagThumbnailTransferFunction : result := 'PropertyTagThumbnailTransferFunction'; + PropertyTagThumbnailSoftwareUsed : result := 'PropertyTagThumbnailSoftwareUsed'; + PropertyTagThumbnailDateTime : result := 'PropertyTagThumbnailDateTime'; + PropertyTagThumbnailArtist : result := 'PropertyTagThumbnailArtist'; + PropertyTagThumbnailWhitePoint : result := 'PropertyTagThumbnailWhitePoint'; + PropertyTagThumbnailPrimaryChromaticities : result := 'PropertyTagThumbnailPrimaryChromaticities'; + PropertyTagThumbnailYCbCrCoefficients : result := 'PropertyTagThumbnailYCbCrCoefficients'; + PropertyTagThumbnailYCbCrSubsampling : result := 'PropertyTagThumbnailYCbCrSubsampling'; + PropertyTagThumbnailYCbCrPositioning : result := 'PropertyTagThumbnailYCbCrPositioning'; + PropertyTagThumbnailRefBlackWhite : result := 'PropertyTagThumbnailRefBlackWhite'; + PropertyTagThumbnailCopyRight : result := 'PropertyTagThumbnailCopyRight'; + PropertyTagLuminanceTable : result := 'PropertyTagLuminanceTable'; + PropertyTagChrominanceTable : result := 'PropertyTagChrominanceTable'; + PropertyTagFrameDelay : result := 'PropertyTagFrameDelay'; + PropertyTagLoopCount : result := 'PropertyTagLoopCount'; + PropertyTagPixelUnit : result := 'PropertyTagPixelUnit'; + PropertyTagPixelPerUnitX : result := 'PropertyTagPixelPerUnitX'; + PropertyTagPixelPerUnitY : result := 'PropertyTagPixelPerUnitY'; + PropertyTagPaletteHistogram : result := 'PropertyTagPaletteHistogram'; + PropertyTagExifExposureTime : result := 'PropertyTagExifExposureTime'; + PropertyTagExifFNumber : result := 'PropertyTagExifFNumber'; + PropertyTagExifExposureProg : result := 'PropertyTagExifExposureProg'; + PropertyTagExifSpectralSense : result := 'PropertyTagExifSpectralSense'; + PropertyTagExifISOSpeed : result := 'PropertyTagExifISOSpeed'; + PropertyTagExifOECF : result := 'PropertyTagExifOECF'; + PropertyTagExifVer : result := 'PropertyTagExifVer'; + PropertyTagExifDTOrig : result := 'PropertyTagExifDTOrig'; + PropertyTagExifDTDigitized : result := 'PropertyTagExifDTDigitized'; + PropertyTagExifCompConfig : result := 'PropertyTagExifCompConfig'; + PropertyTagExifCompBPP : result := 'PropertyTagExifCompBPP'; + PropertyTagExifShutterSpeed : result := 'PropertyTagExifShutterSpeed'; + PropertyTagExifAperture : result := 'PropertyTagExifAperture'; + PropertyTagExifBrightness : result := 'PropertyTagExifBrightness'; + PropertyTagExifExposureBias : result := 'PropertyTagExifExposureBias'; + PropertyTagExifMaxAperture : result := 'PropertyTagExifMaxAperture'; + PropertyTagExifSubjectDist : result := 'PropertyTagExifSubjectDist'; + PropertyTagExifMeteringMode : result := 'PropertyTagExifMeteringMode'; + PropertyTagExifLightSource : result := 'PropertyTagExifLightSource'; + PropertyTagExifFlash : result := 'PropertyTagExifFlash'; + PropertyTagExifFocalLength : result := 'PropertyTagExifFocalLength'; + PropertyTagExifMakerNote : result := 'PropertyTagExifMakerNote'; + PropertyTagExifUserComment : result := 'PropertyTagExifUserComment'; + PropertyTagExifDTSubsec : result := 'PropertyTagExifDTSubsec'; + PropertyTagExifDTOrigSS : result := 'PropertyTagExifDTOrigSS'; + PropertyTagExifDTDigSS : result := 'PropertyTagExifDTDigSS'; + PropertyTagExifFPXVer : result := 'PropertyTagExifFPXVer'; + PropertyTagExifColorSpace : result := 'PropertyTagExifColorSpace'; + PropertyTagExifPixXDim : result := 'PropertyTagExifPixXDim'; + PropertyTagExifPixYDim : result := 'PropertyTagExifPixYDim'; + PropertyTagExifRelatedWav : result := 'PropertyTagExifRelatedWav'; + PropertyTagExifInterop : result := 'PropertyTagExifInterop'; + PropertyTagExifFlashEnergy : result := 'PropertyTagExifFlashEnergy'; + PropertyTagExifSpatialFR : result := 'PropertyTagExifSpatialFR'; + PropertyTagExifFocalXRes : result := 'PropertyTagExifFocalXRes'; + PropertyTagExifFocalYRes : result := 'PropertyTagExifFocalYRes'; + PropertyTagExifFocalResUnit : result := 'PropertyTagExifFocalResUnit'; + PropertyTagExifSubjectLoc : result := 'PropertyTagExifSubjectLoc'; + PropertyTagExifExposureIndex : result := 'PropertyTagExifExposureIndex'; + PropertyTagExifSensingMethod : result := 'PropertyTagExifSensingMethod'; + PropertyTagExifFileSource : result := 'PropertyTagExifFileSource'; + PropertyTagExifSceneType : result := 'PropertyTagExifSceneType'; + PropertyTagExifCfaPattern : result := 'PropertyTagExifCfaPattern'; + PropertyTagGpsVer : result := 'PropertyTagGpsVer'; + PropertyTagGpsLatitudeRef : result := 'PropertyTagGpsLatitudeRef'; + PropertyTagGpsLatitude : result := 'PropertyTagGpsLatitude'; + PropertyTagGpsLongitudeRef : result := 'PropertyTagGpsLongitudeRef'; + PropertyTagGpsLongitude : result := 'PropertyTagGpsLongitude'; + PropertyTagGpsAltitudeRef : result := 'PropertyTagGpsAltitudeRef'; + PropertyTagGpsAltitude : result := 'PropertyTagGpsAltitude'; + PropertyTagGpsGpsTime : result := 'PropertyTagGpsGpsTime'; + PropertyTagGpsGpsSatellites : result := 'PropertyTagGpsGpsSatellites'; + PropertyTagGpsGpsStatus : result := 'PropertyTagGpsGpsStatus'; + PropertyTagGpsGpsMeasureMode : result := 'PropertyTagGpsGpsMeasureMode'; + PropertyTagGpsGpsDop : result := 'PropertyTagGpsGpsDop'; + PropertyTagGpsSpeedRef : result := 'PropertyTagGpsSpeedRef'; + PropertyTagGpsSpeed : result := 'PropertyTagGpsSpeed'; + PropertyTagGpsTrackRef : result := 'PropertyTagGpsTrackRef'; + PropertyTagGpsTrack : result := 'PropertyTagGpsTrack'; + PropertyTagGpsImgDirRef : result := 'PropertyTagGpsImgDirRef'; + PropertyTagGpsImgDir : result := 'PropertyTagGpsImgDir'; + PropertyTagGpsMapDatum : result := 'PropertyTagGpsMapDatum'; + PropertyTagGpsDestLatRef : result := 'PropertyTagGpsDestLatRef'; + PropertyTagGpsDestLat : result := 'PropertyTagGpsDestLat'; + PropertyTagGpsDestLongRef : result := 'PropertyTagGpsDestLongRef'; + PropertyTagGpsDestLong : result := 'PropertyTagGpsDestLong'; + PropertyTagGpsDestBearRef : result := 'PropertyTagGpsDestBearRef'; + PropertyTagGpsDestBear : result := 'PropertyTagGpsDestBear'; + PropertyTagGpsDestDistRef : result := 'PropertyTagGpsDestDistRef'; + PropertyTagGpsDestDist : result := 'PropertyTagGpsDestDist'; + else + result := ''; + end; +end; + +function GetEncoderClsid(format: String; out pClsid: TGUID): integer; +var + num, size, j: UINT; + ImageCodecInfo: PImageCodecInfo; +Type + ArrIMgInf = array of TImageCodecInfo; +begin + num := 0; // number of image encoders + size := 0; // size of the image encoder array in bytes + result := -1; + + GetImageEncodersSize(num, size); + if (size = 0) then exit; + + GetMem(ImageCodecInfo, size); + if(ImageCodecInfo = nil) then exit; + + GetImageEncoders(num, size, ImageCodecInfo); + + for j := 0 to num - 1 do + begin + if( ArrIMgInf(ImageCodecInfo)[j].MimeType = format) then + begin + pClsid := ArrIMgInf(ImageCodecInfo)[j].Clsid; + result := j; // Success + end; + end; + FreeMem(ImageCodecInfo, size); +end; + +function GetStatus(Stat: TStatus): string; +begin + case Stat of + Ok : result := 'Ok'; + GenericError : result := 'GenericError'; + InvalidParameter : result := 'InvalidParameter'; + OutOfMemory : result := 'OutOfMemory'; + ObjectBusy : result := 'ObjectBusy'; + InsufficientBuffer : result := 'InsufficientBuffer'; + NotImplemented : result := 'NotImplemented'; + Win32Error : result := 'Win32Error'; + WrongState : result := 'WrongState'; + Aborted : result := 'Aborted'; + FileNotFound : result := 'FileNotFound'; + ValueOverflow : result := 'ValueOverflow'; + AccessDenied : result := 'AccessDenied'; + UnknownImageFormat : result := 'UnknownImageFormat'; + FontFamilyNotFound : result := 'FontFamilyNotFound'; + FontStyleNotFound : result := 'FontStyleNotFound'; + NotTrueTypeFont : result := 'NotTrueTypeFont'; + UnsupportedGdiplusVersion : result := 'UnsupportedGdiplusVersion'; + GdiplusNotInitialized : result := 'GdiplusNotInitialized'; + PropertyNotFound : result := 'PropertyNotFound'; + PropertyNotSupported : result := 'PropertyNotSupported'; + else + result := ''; + end; +end; + +function PixelFormatString(PixelFormat: TPixelFormat): string; +begin + case PixelFormat of + PixelFormatIndexed : result := 'PixelFormatIndexed'; + PixelFormatGDI : result := 'PixelFormatGDI'; + PixelFormatAlpha : result := 'PixelFormatAlpha'; + PixelFormatPAlpha : result := 'PixelFormatPAlpha'; + PixelFormatExtended : result := 'PixelFormatExtended'; + PixelFormatCanonical : result := 'PixelFormatCanonical'; + PixelFormatUndefined : result := 'PixelFormatUndefined'; + PixelFormat1bppIndexed : result := 'PixelFormat1bppIndexed'; + PixelFormat4bppIndexed : result := 'PixelFormat4bppIndexed'; + PixelFormat8bppIndexed : result := 'PixelFormat8bppIndexed'; + PixelFormat16bppGrayScale : result := 'PixelFormat16bppGrayScale'; + PixelFormat16bppRGB555 : result := 'PixelFormat16bppRGB555'; + PixelFormat16bppRGB565 : result := 'PixelFormat16bppRGB565'; + PixelFormat16bppARGB1555 : result := 'PixelFormat16bppARGB1555'; + PixelFormat24bppRGB : result := 'PixelFormat24bppRGB'; + PixelFormat32bppRGB : result := 'PixelFormat32bppRGB'; + PixelFormat32bppARGB : result := 'PixelFormat32bppARGB'; + PixelFormat32bppPARGB : result := 'PixelFormat32bppPARGB'; + PixelFormat48bppRGB : result := 'PixelFormat48bppRGB'; + PixelFormat64bppARGB : result := 'PixelFormat64bppARGB'; + PixelFormat64bppPARGB : result := 'PixelFormat64bppPARGB'; + PixelFormatMax : result := 'PixelFormatMax'; + else + result := ''; + end; +end; + +function MakeLangID(PrimaryLanguage, SubLanguage: LANGID): Word; +begin + result := (SubLanguage shl 10) or PrimaryLanguage; +end; + +end. diff --git a/Pramougolnik/Jedix.inc b/Pramougolnik/Jedix.inc new file mode 100644 index 0000000..26af2e0 --- /dev/null +++ b/Pramougolnik/Jedix.inc @@ -0,0 +1,628 @@ +{******************************************************************************} +{ } +{ The contents of this file are subject to the Mozilla Public License Version } +{ 1.1 (the "License"); you may not use this file except in compliance with the } +{ License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ } +{ } +{ Software distributed under the License is distributed on an "AS IS" basis, } +{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for } +{ the specific language governing rights and limitations under the License. } +{ } +{ The Original Code is JEDI.INC. } +{ } +{ The Initial Developer of the Original Code is Project JEDI } +{ http://www.delphi-jedi.org } +{ } +{******************************************************************************} +{ } +{ This file defines various generic compiler directives used in the JEDI Code } +{ Library (JCL) and JEDI Visual Component Library Library (J-VCL). The } +{ directives in this file are of generic nature and consist mostly of mappings } +{ from the VERXXX directives defined by Delphi and C++ Builder to friendly } +{ names such as DELPHI5 and SUPPORTS_WIDESTRING. These friendly names are } +{ subsequently used in both libraries to test for compiler versions and/or } +{ whether the compiler supports certain features (such as widestring's or 64 } +{ bit integers. Both libraries provide an additional, library specific, } +{ include file. For the JCL this is JCL.INC. These files should be included in } +{ source files instead of this file (which is pulled in automatically). } +{ } +{ Maintainer: Marcel van Brakel } +{ Last modified: July 18, 2006 } +{ } +{******************************************************************************} + +(* + +- Development environment directives + + This file defines two driectives to indicate which development environment the + library is being compiled with. Currently this can either be Delphi or + C++ Builder (in the near future "Kylix" will be added). + + Directive Description + ------------------------------------------------------------------------------ + DELPHI Defined if compiled with Delphi + BCB Defined if compiled with C++ Builder + +- Platform Directives + + Platform directives are not explicitly defined in this file but are defined + by the compiler itself. They are listed here only for completeness. + + Directive Description + ------------------------------------------------------------------------------ + WIN32 Defined when target platform is 32 bit Windows + LINUX Defined when target platform is Linux + +- Delphi Versions + + The following directives are direct mappings from the VERXXX directives to a + friendly name of the associated compiler. These directives are only defined if + the compiler is Delphi (ie DELPHI is defined). + + Directive Description + ------------------------------------------------------------------------------ + DELPHI1 Defined when compiling with Delphi 1 + DELPHI2 Defined when compiling with Delphi 2 + DELPHI3 Defined when compiling with Delphi 3 + DELPHI4 Defined when compiling with Delphi 4 + DELPHI5 Defined when compiling with Delphi 5 + DELPHI6 Defined when compiling with Delphi 6 + DELPHI1_UP Defined when compiling with Delphi 1 or higher + DELPHI2_UP Defined when compiling with Delphi 2 or higher + DELPHI3_UP Defined when compiling with Delphi 3 or higher + DELPHI4_UP Defined when compiling with Delphi 4 or higher + DELPHI5_UP Defined when compiling with Delphi 5 or higher + DELPHI6_UP Defined when compiling with Delphi 6 or higher + DELPHI7_UP Defined when compiling with Delphi 7 or higher + DELPHI8_UP Defined when compiling with Delphi 8 or higher + DELPHI9_UP Defined when compiling with Delphi 9 or higher + DELPHI10_UP Defined when compiling with Delphi 10 or higher + +- C++ Builder Versions + + The following directives are direct mappings from the VERXXX directives to a + friendly name of the associated compiler. These directives are only defined if + the compiler is C++ Builder (ie BCB is defined). + + Directive Description + ------------------------------------------------------------------------------ + BCB1 Defined when compiling with C++ Builder 1 + BCB3 Defined when compiling with C++ Builder 3 + BCB4 Defined when compiling with C++ Builder 4 + BCB5 Defined when compiling with C++ Builder 5 + BCB6 Defined when compiling with C++ Builder 6 + BCB7 Defined when compiling with C++ Builder 7 + BCB1_UP Defined when compiling with C++ Builder 1 or higher + BCB3_UP Defined when compiling with C++ Builder 3 or higher + BCB4_UP Defined when compiling with C++ Builder 4 or higher + BCB5_UP Defined when compiling with C++ Builder 5 or higher + BCB6_UP Defined when compiling with C++ Builder 6 or higher + BCB7_UP Defined when compiling with C++ Builder 7 or higher + BCB8_UP Defined when compiling with C++ Builder 8 or higher + BCB9_UP Defined when compiling with C++ Builder 9 or higher + BCB10_UP Defined when compiling with C++ Builder 10 or higher + +- Compiler Versions + + The following directives are direct mappings from the VERXXX directives to a + friendly name of the associated compiler. Unlike the DELPHI_X and BCB_X + directives, these directives are indepedent of the development environment. + That is, they are defined regardless of whether compilation takes place using + Delphi or C++ Builder. + + Directive Description + ------------------------------------------------------------------------------ + COMPILER1 Defined when compiling with Delphi 1 + COMPILER2 Defined when compiling with Delphi 2 or C++ Builder 1 + COMPILER3 Defined when compiling with Delphi 3 + COMPILER35 Defined when compiling with C++ Builder 3 + COMPILER4 Defined when compiling with Delphi 4 or C++ Builder 4 + COMPILER5 Defined when compiling with Delphi 5 or C++ Builder 5 + COMPILER6 Defined when compiling with Delphi 6 or C++ Builder 6 + COMPILER1_UP Defined when compiling with Delphi 1 or higher + COMPILER2_UP Defined when compiling with Delphi 2 or C++ Builder 1 or higher + COMPILER3_UP Defined when compiling with Delphi 3 or higher + COMPILER35_UP Defined when compiling with C++ Builder 3 or higher + COMPILER4_UP Defined when compiling with Delphi 4 or C++ Builder 4 or higher + COMPILER5_UP Defined when compiling with Delphi 5 or C++ Builder 5 or higher + COMPILER6_UP Defined when compiling with Delphi 6 or C++ Builder 6 or higher + COMPILER7_UP Defined when compiling with Delphi 7 or C++ Builder 7 or higher + COMPILER8_UP Defined when compiling with Delphi 8 or C++ Builder 8 or higher + COMPILER9_UP Defined when compiling with Delphi 9 or C++ Builder 9 or higher + COMPILER10_UP Defined when compiling with Delphi 10 or C++ Builder 10 or higher + +- Feature Directives + + The features directives are used to test if the compiler supports specific + features, such as method overloading, and adjust the sources accordingly. Use + of these directives is preferred over the use of the DELPHI and COMPILER + directives. + + Directive Description + ------------------------------------------------------------------------------ + SUPPORTS_WIDESTRING Compiler supports the WideString type (D3/BCB3 up) + SUPPORTS_INTERFACE Compiler supports interfaces (D3/BCB3) + SUPPORTS_EXTSYM Compiler supports the $EXTERNALSYM directive (D4/BCB3) + SUPPORTS_NODEFINE Compiler supports the $NODEFINE directive (D4/BCB3) + SUPPORTS_INT64 Compiler supports the Int64 type (D4/BCB4) + SUPPORTS_DYNAMICARRAYS Compiler supports dynamic arrays (D4/BCB4) + SUPPORTS_DEFAULTPARAMS Compiler supports default parameters (D4/BCB4) + SUPPORTS_OVERLOAD Compiler supports overloading (D4/BCB4) + +- Compiler Settings + + The compiler settings directives indicate whether a specific compiler setting + is in effect. This facilitates changing compiler settings locally in a more + compact and readible manner. + + Directive Description + ------------------------------------------------------------------------------ + ALIGN_ON Compiling in the A+ state (no alignment) + BOOLEVAL_ON Compiling in the B+ state (complete boolean evaluation) + ASSERTIONS_ON Compiling in the C+ state (assertions on) + DEBUGINFO_ON Compiling in the D+ state (debug info generation on) + IMPORTEDDATA_ON Compiling in the G+ state (creation of imported data references) + LONGSTRINGS_ON Compiling in the H+ state (string defined as AnsiString) + IOCHECKS_ON Compiling in the I+ state (I/O checking enabled) + WRITEABLECONST_ON Compiling in the J+ state (typed constants can be modified) + LOCALSYMBOLS Compiling in the L+ state (local symbol generation) + TYPEINFO_ON Compiling in the M+ state (RTTI generation on) + OPTIMIZATION_ON Compiling in the O+ state (code optimization on) + OPENSTRINGS_ON Compiling in the P+ state (variable string parameters are openstrings) + OVERFLOWCHECKS_ON Compiling in the Q+ state (overflow checing on) + RANGECHECKS_ON Compiling in the R+ state (range checking on) + TYPEDADDRESS_ON Compiling in the T+ state (pointers obtained using the @ operator are typed) + SAFEDIVIDE_ON Compiling in the U+ state (save FDIV instruction through RTL emulation) + VARSTRINGCHECKS_ON Compiling in the V+ state (type checking of shortstrings) + STACKFRAMES_ON Compiling in the W+ state (generation of stack frames) + EXTENDEDSYNTAX_ON Compiling in the X+ state (Delphi extended syntax enabled) + +*) + +//------------------------------------------------------------------------------ +// Compiler settings +//------------------------------------------------------------------------------ + +{$IFOPT A+} {$DEFINE ALIGN_ON} {$ENDIF} +{$IFOPT B+} {$DEFINE BOOLEVAL_ON} {$ENDIF} +{$IFOPT C+} {$DEFINE ASSERTIONS_ON} {$ENDIF} +{$IFOPT D+} {$DEFINE DEBUGINFO_ON} {$ENDIF} +{$IFOPT G+} {$DEFINE IMPORTEDDATA_ON} {$ENDIF} +{$IFOPT H+} {$DEFINE LONGSTRINGS_ON} {$ENDIF} +//HINTS +{$IFOPT I+} {$DEFINE IOCHECKS_ON} {$ENDIF} +{$IFOPT J+} {$DEFINE WRITEABLECONST_ON} {$ENDIF} +{$IFOPT L+} {$DEFINE LOCALSYMBOLS} {$ENDIF} +{$IFOPT M+} {$DEFINE TYPEINFO_ON} {$ENDIF} +{$IFOPT O+} {$DEFINE OPTIMIZATION_ON} {$ENDIF} +{$IFOPT P+} {$DEFINE OPENSTRINGS_ON} {$ENDIF} +{$IFOPT Q+} {$DEFINE OVERFLOWCHECKS_ON} {$ENDIF} +{$IFOPT R+} {$DEFINE RANGECHECKS_ON} {$ENDIF} +//REALCOMPATIBILITY +{$IFOPT T+} {$DEFINE TYPEDADDRESS_ON} {$ENDIF} +{$IFOPT U+} {$DEFINE SAFEDIVIDE_ON} {$ENDIF} +{$IFOPT V+} {$DEFINE VARSTRINGCHECKS_ON} {$ENDIF} +{$IFOPT W+} {$DEFINE STACKFRAMES_ON} {$ENDIF} +//WARNINGS +{$IFOPT X+} {$DEFINE EXTENDEDSYNTAX_ON} {$ENDIF} + +//------------------------------------------------------------------------------ +// VERXXX to COMPILERX, DELPHIX and BCBX mappings +//------------------------------------------------------------------------------ + + + +{$IFDEF VER180} + {$DEFINE COMPILER10} + {$IFDEF BCB} + {$DEFINE BCB10} + {$DEFINE BCB} + {$ELSE} + {$DEFINE DELPHI10} + {$DEFINE DELPHI} + {$ENDIF} +{$ENDIF} + +{$IFDEF VER170} + {$DEFINE COMPILER9} + {$IFDEF BCB} + {$DEFINE BCB9} + {$DEFINE BCB} + {$ELSE} + {$DEFINE DELPHI9} + {$DEFINE DELPHI} + {$ENDIF} +{$ENDIF} + +{$IFDEF VER160} + {$DEFINE COMPILER8} + {$IFDEF BCB} + {$DEFINE BCB8} + {$DEFINE BCB} + {$ELSE} + {$DEFINE DELPHI8} + {$DEFINE DELPHI} + {$ENDIF} +{$ENDIF} + +{$IFDEF VER150} + {$DEFINE COMPILER7} + {$IFDEF BCB} + {$DEFINE BCB7} + {$DEFINE BCB} + {$ELSE} + {$DEFINE DELPHI7} + {$DEFINE DELPHI} + {$ENDIF} +{$ENDIF} + +{$IFDEF VER140} + {$DEFINE COMPILER6} + {$IFDEF BCB} + {$DEFINE BCB6} + {$DEFINE BCB} + {$ELSE} + {$DEFINE DELPHI6} + {$DEFINE DELPHI} + {$ENDIF} +{$ENDIF} + +{$IFDEF VER130} + {$DEFINE COMPILER5} + {$IFDEF BCB} + {$DEFINE BCB5} + {$DEFINE BCB} + {$ELSE} + {$DEFINE DELPHI5} + {$DEFINE DELPHI} + {$ENDIF} +{$ENDIF} + +{$IFDEF VER125} + {$DEFINE COMPILER4} + {$DEFINE BCB4} + {$DEFINE BCB} +{$ENDIF} + +{$IFDEF VER120} + {$DEFINE COMPILER4} + {$DEFINE DELPHI4} + {$DEFINE DELPHI} +{$ENDIF} + +{$IFDEF VER110} + {$DEFINE COMPILER35} + {$DEFINE BCB3} +{$ENDIF} + +{$IFDEF VER100} + {$DEFINE COMPILER3} + {$DEFINE DELPHI3} + {$DEFINE DELPHI} +{$ENDIF} + +{$IFDEF VER93} + {$DEFINE COMPILER2} + {$DEFINE BCB1} + {$DEFINE BCB} +{$ENDIF} + +{$IFDEF VER90} + {$DEFINE COMPILER2} + {$DEFINE DELPHI2} + {$DEFINE DELPHI} +{$ENDIF} + +{$IFDEF VER80} + {$DEFINE COMPILER1} + {$DEFINE DELPHI1} + {$DEFINE DELPHI} +{$ENDIF} + +//------------------------------------------------------------------------------ +// DELPHIX_UP from DELPHIX mappings +//------------------------------------------------------------------------------ + +{$IFDEF DELPHI10} + {$DEFINE DELPHI10_UP} + {$DEFINE DELPHI9_UP} + {$DEFINE DELPHI8_UP} + {$DEFINE DELPHI7_UP} + {$DEFINE DELPHI6_UP} + {$DEFINE DELPHI5_UP} + {$DEFINE DELPHI4_UP} + {$DEFINE DELPHI3_UP} + {$DEFINE DELPHI2_UP} + {$DEFINE DELPHI1_UP} +{$ENDIF} + +{$IFDEF DELPHI9} + {$DEFINE DELPHI9_UP} + {$DEFINE DELPHI8_UP} + {$DEFINE DELPHI7_UP} + {$DEFINE DELPHI6_UP} + {$DEFINE DELPHI5_UP} + {$DEFINE DELPHI4_UP} + {$DEFINE DELPHI3_UP} + {$DEFINE DELPHI2_UP} + {$DEFINE DELPHI1_UP} +{$ENDIF} + +{$IFDEF DELPHI8} + {$DEFINE DELPHI8_UP} + {$DEFINE DELPHI7_UP} + {$DEFINE DELPHI6_UP} + {$DEFINE DELPHI5_UP} + {$DEFINE DELPHI4_UP} + {$DEFINE DELPHI3_UP} + {$DEFINE DELPHI2_UP} + {$DEFINE DELPHI1_UP} +{$ENDIF} + +{$IFDEF DELPHI7} + {$DEFINE DELPHI7_UP} + {$DEFINE DELPHI6_UP} + {$DEFINE DELPHI5_UP} + {$DEFINE DELPHI4_UP} + {$DEFINE DELPHI3_UP} + {$DEFINE DELPHI2_UP} + {$DEFINE DELPHI1_UP} +{$ENDIF} + +{$IFDEF DELPHI6} + {$DEFINE DELPHI6_UP} + {$DEFINE DELPHI5_UP} + {$DEFINE DELPHI4_UP} + {$DEFINE DELPHI3_UP} + {$DEFINE DELPHI2_UP} + {$DEFINE DELPHI1_UP} +{$ENDIF} + +{$IFDEF DELPHI5} + {$DEFINE DELPHI5_UP} + {$DEFINE DELPHI4_UP} + {$DEFINE DELPHI3_UP} + {$DEFINE DELPHI2_UP} + {$DEFINE DELPHI1_UP} +{$ENDIF} + +{$IFDEF DELPHI4} + {$DEFINE DELPHI4_UP} + {$DEFINE DELPHI3_UP} + {$DEFINE DELPHI2_UP} + {$DEFINE DELPHI1_UP} +{$ENDIF} + +{$IFDEF DELPHI3} + {$DEFINE DELPHI3_UP} + {$DEFINE DELPHI2_UP} + {$DEFINE DELPHI1_UP} +{$ENDIF} + +{$IFDEF DELPHI2} + {$DEFINE DELPHI2_UP} + {$DEFINE DELPHI1_UP} +{$ENDIF} + +{$IFDEF DELPHI1} + {$DEFINE DELPHI1_UP} +{$ENDIF} + +//------------------------------------------------------------------------------ +// BCBX_UP from BCBX mappings +//------------------------------------------------------------------------------ + +{$IFDEF BCB10} + {$DEFINE BCB10_UP} + {$DEFINE BCB9_UP} + {$DEFINE BCB8_UP} + {$DEFINE BCB7_UP} + {$DEFINE BCB6_UP} + {$DEFINE BCB5_UP} + {$DEFINE BCB4_UP} + {$DEFINE BCB3_UP} + {$DEFINE BCB1_UP} +{$ENDIF} + +{$IFDEF BCB9} + {$DEFINE BCB9_UP} + {$DEFINE BCB8_UP} + {$DEFINE BCB7_UP} + {$DEFINE BCB6_UP} + {$DEFINE BCB5_UP} + {$DEFINE BCB4_UP} + {$DEFINE BCB3_UP} + {$DEFINE BCB1_UP} +{$ENDIF} + +{$IFDEF BCB8} + {$DEFINE BCB8_UP} + {$DEFINE BCB7_UP} + {$DEFINE BCB6_UP} + {$DEFINE BCB5_UP} + {$DEFINE BCB4_UP} + {$DEFINE BCB3_UP} + {$DEFINE BCB1_UP} +{$ENDIF} + +{$IFDEF BCB7} + {$DEFINE BCB7_UP} + {$DEFINE BCB6_UP} + {$DEFINE BCB5_UP} + {$DEFINE BCB4_UP} + {$DEFINE BCB3_UP} + {$DEFINE BCB1_UP} +{$ENDIF} + +{$IFDEF BCB6} + {$DEFINE BCB6_UP} + {$DEFINE BCB5_UP} + {$DEFINE BCB4_UP} + {$DEFINE BCB3_UP} + {$DEFINE BCB1_UP} +{$ENDIF} + +{$IFDEF BCB5} + {$DEFINE BCB5_UP} + {$DEFINE BCB4_UP} + {$DEFINE BCB3_UP} + {$DEFINE BCB1_UP} +{$ENDIF} + +{$IFDEF BCB4} + {$DEFINE BCB4_UP} + {$DEFINE BCB3_UP} + {$DEFINE BCB1_UP} +{$ENDIF} + +{$IFDEF BCB3} + {$DEFINE BCB3_UP} + {$DEFINE BCB1_UP} +{$ENDIF} + +{$IFDEF BCB1} + {$DEFINE BCB1_UP} +{$ENDIF} + +//------------------------------------------------------------------------------ +// COMPILERX_UP from COMPILERX mappings +//------------------------------------------------------------------------------ + +{$IFDEF COMPILER10} + {$DEFINE COMPILER10_UP} + {$DEFINE COMPILER9_UP} + {$DEFINE COMPILER8_UP} + {$DEFINE COMPILER7_UP} + {$DEFINE COMPILER6_UP} + {$DEFINE COMPILER5_UP} + {$DEFINE COMPILER4_UP} + {$DEFINE COMPILER35_UP} + {$DEFINE COMPILER3_UP} + {$DEFINE COMPILER2_UP} + {$DEFINE COMPILER1_UP} +{$ENDIF} + +{$IFDEF COMPILER9} + {$DEFINE COMPILER9_UP} + {$DEFINE COMPILER8_UP} + {$DEFINE COMPILER7_UP} + {$DEFINE COMPILER6_UP} + {$DEFINE COMPILER5_UP} + {$DEFINE COMPILER4_UP} + {$DEFINE COMPILER35_UP} + {$DEFINE COMPILER3_UP} + {$DEFINE COMPILER2_UP} + {$DEFINE COMPILER1_UP} +{$ENDIF} + +{$IFDEF COMPILER8} + {$DEFINE COMPILER8_UP} + {$DEFINE COMPILER7_UP} + {$DEFINE COMPILER6_UP} + {$DEFINE COMPILER5_UP} + {$DEFINE COMPILER4_UP} + {$DEFINE COMPILER35_UP} + {$DEFINE COMPILER3_UP} + {$DEFINE COMPILER2_UP} + {$DEFINE COMPILER1_UP} +{$ENDIF} + +{$IFDEF COMPILER7} + {$DEFINE COMPILER7_UP} + {$DEFINE COMPILER6_UP} + {$DEFINE COMPILER5_UP} + {$DEFINE COMPILER4_UP} + {$DEFINE COMPILER35_UP} + {$DEFINE COMPILER3_UP} + {$DEFINE COMPILER2_UP} + {$DEFINE COMPILER1_UP} +{$ENDIF} + +{$IFDEF COMPILER6} + {$DEFINE COMPILER6_UP} + {$DEFINE COMPILER5_UP} + {$DEFINE COMPILER4_UP} + {$DEFINE COMPILER35_UP} + {$DEFINE COMPILER3_UP} + {$DEFINE COMPILER2_UP} + {$DEFINE COMPILER1_UP} +{$ENDIF} + +{$IFDEF COMPILER5} + {$DEFINE COMPILER5_UP} + {$DEFINE COMPILER4_UP} + {$DEFINE COMPILER35_UP} + {$DEFINE COMPILER3_UP} + {$DEFINE COMPILER2_UP} + {$DEFINE COMPILER1_UP} +{$ENDIF} + +{$IFDEF COMPILER4} + {$DEFINE COMPILER4_UP} + {$DEFINE COMPILER35_UP} + {$DEFINE COMPILER3_UP} + {$DEFINE COMPILER2_UP} + {$DEFINE COMPILER1_UP} +{$ENDIF} + +{$IFDEF COMPILER35} + {$DEFINE COMPILER35_UP} + {$DEFINE COMPILER3_UP} + {$DEFINE COMPILER2_UP} + {$DEFINE COMPILER1_UP} +{$ENDIF} + +{$IFDEF COMPILER3} + {$DEFINE COMPILER3_UP} + {$DEFINE COMPILER2_UP} + {$DEFINE COMPILER1_UP} +{$ENDIF} + +{$IFDEF COMPILER2} + {$DEFINE COMPILER2_UP} + {$DEFINE COMPILER1_UP} +{$ENDIF} + +{$IFDEF COMPILER1} + {$DEFINE COMPILER1_UP} +{$ENDIF} + +//------------------------------------------------------------------------------ +// Map COMPILERX_UP to friendly feature names +//------------------------------------------------------------------------------ + +{$IFDEF COMPILER3_UP} + {$DEFINE SUPPORTS_WIDESTRING} + {$DEFINE SUPPORTS_INTERFACE} +{$ENDIF} + +{$IFDEF COMPILER35_UP} + {$DEFINE SUPPORTS_EXTSYM} + {$DEFINE SUPPORTS_NODEFINE} +{$ENDIF} + +{$IFDEF COMPILER4_UP} + {$DEFINE SUPPORTS_INT64} + {$DEFINE SUPPORTS_DYNAMICARRAYS} + {$DEFINE SUPPORTS_DEFAULTPARAMS} + {$DEFINE SUPPORTS_OVERLOAD} +{$ENDIF} + +//------------------------------------------------------------------------------ +// Cross-platform related defines +//------------------------------------------------------------------------------ + +{$IFDEF WIN32} + {$DEFINE MSWINDOWS} +{$ENDIF} + +{$IFDEF LINUX} + {$DEFINE UNIX} + {$DEFINE COMPLIB_CLX} +{$ENDIF} + +{$IFNDEF COMPLIB_CLX} + {$DEFINE COMPLIB_VCL} +{$ENDIF} + diff --git a/Pramougolnik/Rectangle.dpr b/Pramougolnik/Rectangle.dpr new file mode 100644 index 0000000..7055173 --- /dev/null +++ b/Pramougolnik/Rectangle.dpr @@ -0,0 +1,13 @@ +program Rectangle; + +uses + Forms, + Unit1 in 'Unit1.pas' {Form1}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/Pramougolnik/Rectangle.dproj b/Pramougolnik/Rectangle.dproj new file mode 100644 index 0000000..ff08c5f --- /dev/null +++ b/Pramougolnik/Rectangle.dproj @@ -0,0 +1,872 @@ +п»ї + + {3D07A99C-1E74-4E6B-8C7B-AF9D58B143B8} + Rectangle.dpr + True + Debug + 1097 + Application + VCL + 18.7 + Win32 + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + false + false + false + true + false + 00400000 + 1 + 1 + vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOfficeXP;$(DCC_UsePackage) + Rectangle + Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) + 1049 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + + + System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + Debug + true + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName) + 1033 + $(BDS)\bin\default_app.manifest + Arrow_Icon.ico + true + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + + + RELEASE;$(DCC_Define) + 0 + false + 0 + + + true + PerMonitorV2 + + + DEBUG;$(DCC_Define) + false + true + + + true + PerMonitorV2 + + + + MainSource + + +

Form1 + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + Delphi.Personality.12 + + + + + Rectangle.dpr + + + + True + True + True + True + + + + + Rectangle.exe + true + + + + + 1 + + + Contents\MacOS + 1 + + + 0 + + + + + classes + 1 + + + + + res\xml + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\armeabi + 1 + + + + + library\lib\mips + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + res\drawable + 1 + + + + + res\values + 1 + + + + + res\values-v21 + 1 + + + + + res\values + 1 + + + + + res\drawable + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-ldpi + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable-normal + 1 + + + + + res\drawable-large + 1 + + + + + res\drawable-xlarge + 1 + + + + + res\values + 1 + + + + + 1 + + + Contents\MacOS + 1 + + + 0 + + + + + Contents\MacOS + 1 + .framework + + + Contents\MacOS + 1 + .framework + + + 0 + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 0 + .bpl + + + + + 0 + + + 0 + + + 0 + + + 0 + + + Contents\Resources\StartUp\ + 0 + + + Contents\Resources\StartUp\ + 0 + + + 0 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + + + ..\ + 1 + + + ..\ + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + ..\ + 1 + + + ..\ + 1 + + + + + Contents + 1 + + + Contents + 1 + + + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + Contents\MacOS + 1 + + + Contents\MacOS + 1 + + + 0 + + + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + + + + + + + + + + 12 + + + + + diff --git a/Pramougolnik/Rectangle.dproj.local b/Pramougolnik/Rectangle.dproj.local new file mode 100644 index 0000000..8c3ad8f --- /dev/null +++ b/Pramougolnik/Rectangle.dproj.local @@ -0,0 +1,6 @@ +п»ї + + + 2019.10.16 13:55:39.544,D:\Vanessa_repo\UITooolsFor1C\Pramougolnik\Rectangle.dproj=D:\Vanessa_repo\UITooolsFor1C\Pramougolnik\Arrow.dproj + + diff --git a/Pramougolnik/Rectangle.identcache b/Pramougolnik/Rectangle.identcache new file mode 100644 index 0000000000000000000000000000000000000000..5ca2067692624736109df91f0a8c5d700450ec71 GIT binary patch literal 138 zcmZQ#U|=wDv5E;x%u6jUPK+-~Ey#}v^$f|+&(A4#%P%r?jtMAA%*`)N&(F!r%#I1o k%PcX}D@ZH`>VpFd5)24RO)g2yOV3HwODQOVn*d}00N7nA#Q*>R literal 0 HcmV?d00001 diff --git a/Pramougolnik/Rectangle.res b/Pramougolnik/Rectangle.res new file mode 100644 index 0000000000000000000000000000000000000000..b50edb7a8bfc61f9729307a0643b65559cea8ee1 GIT binary patch literal 6840 zcmeHMdu$xV8J}|;k~4K;6si`4n&lLvsA2DRZ}-l3;cR0i0UgA|*v1s~LHBlN?Im}+ z$L^jTH%VQPAjAX*g-|un2q{$&LA+_&KPpTp>O)0+P|>2c6aqp*{i{*`sG`bc`OV(# zJ?z+y9V4jZIeoi3^F4mweDlrB?i?Y6a3Ies6CN8&Q^0S7OvvX6B-~sTYLf9dNczd0 zxb7f*c*>GpkMXYuh5RQxKuD?uv4G6omzkjejB%rpz zQ+q$0Z|!Bg%KCcF>0~_qV4#f7*S-!PyzH&oT>)LNNwOlfeHT>S0bn7$j*$csM zUbpr+=-xk5pVgbzHnV+m6Nv5Q4Q1E!uF&_hy&u_cJnHTF!{f7P|DT?ickf}oP5%Aa zS$fRY=7s}F6`UYq#Gp?98H5Nn}W1pFiKz3AP3YTti0 z-kBN(6ni(Bw-jHSyh1yD@XdpNJ$cbSJpAtSUhfN~vsc|F-2qURTNhM}pB%Uhad`c{ zw|~53A09#sZ#r50=a+7}_GW;tz98T_p`FLZTh!ANFW>X$6N~m?;%_It9Y4D3{mVP9 z>4Zu4nX{y#AJbPWQxBZ@?givtFy8mQ{iJvOar&3_@vle#z4-Ug@$shI)B}@afBfNs zak%HL6W(>-|JEB{*tmgx0?e9YOA10oDK~ZCJEh-%ApC8cg{_WA}qi0@fhz0XYxWDf?%P+xFO z3v^cQpRWjbtegpX-f0{oERxP3-zv1~EcTXj$iZp6ci_OO3&&dH-uGaW**?3<^UkgD zyy^9x_i>jG8C=*$ssQr5b)<)M`)5~KvdurqLbG3lx^oSd;yBOX*qtNn6eL70#jb`1 z*!VK2JO%2{$}(Mh3VCjX+KyqF9T71qL^x`ymS&hk9g*7xZs1c9&T$n}Q}UKcJ0fG$ ziF9?gwqz8?p@m$2jDrEw>4=nUbE~5c(}Lpg1w*wh$I@M1wF+Amrw|87W0OxxbVCat=0BX!_=%%r=Pkmdf}9L;A%yqdsMM$ z;PJ5Q7PrP?6{n+Br=xH>*58wj#RVY|yS>p`q|>!aG*&ERVu8I`048;uMSzIO*&w~t z?y*e6wd}!o4T%}9bTw9v!Fl?csj%w9<3~-SMQUmo-LZ;|puz2~jAgYa!Qf^g?i%ix zA6^z>cdUpc0IC#^R2xmDfX1F+(4&=*MYmanf@SjCEYr2Eyi-%C=36oyPH6*02xZd)BTT&lVy+n0z1 zVLNZ15#d^F{8(X-9XD(0RxpkWq&G6NoPrKjOEw}_4W&)*E+Ofu)@vIhMxGAQYDOX_ ztK1!XpvY2rCmo^rYG^qw&*~i!#mSl@h>2b6EXS3MZk6@7BcdyLht^n??gAiIMVN`7 ziPig>iB-GIW;dol5i=`i+7iyxryy$xXRhY?fnmyJw{tm~w?;Wk zE;fa!!$FpFO2wjOyPR&>TqTLPK?BPV$Mf(C`V|SP?ds>UT1R9rjSHeEC)#;2At!lR zQWLzA&?zqnDUDJpX_7ANkHma`mIB{CH?))xrBp7h@ChvqXg#O#DH_*!B`(WCJf6_g zlER>u*zwfd$g&dG<0&ff2`QK6Wmy*aoRU^~Et%G2MOKnjN?i@lVbG P{{1PJ`h7Huuc%J|z2Sz3 literal 0 HcmV?d00001 diff --git a/Pramougolnik/Unit1.dcu b/Pramougolnik/Unit1.dcu new file mode 100644 index 0000000000000000000000000000000000000000..8f567739ed8740b4046d1abe956f6b0cb36503d3 GIT binary patch literal 15333 zcmeHue|%I$mha8IbvrjrlQa-Akp-rMz(#~#e)>QG^Q$3Y($FLwemI~u-M2f9{Uhlg zO4!M~FvzY=8x?2RCyEL)>XR9nCoZ@oq8mpT!Nn1LI*WoV%m-(}h$GD4Zkz%0zNhZJ z>F$8zy!Y8Z_Kz2+s#E8jI_K1>Q>W@yz$po3AKxYjXCtm90{w_`QzV#}_T`BFKm3Cr z&W#oDuHEMkhruGY==~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Ith3)?=~?p8o?e#cpi? literal 0 HcmV?d00001 diff --git a/Pramougolnik/Unit1.ddp b/Pramougolnik/Unit1.ddp new file mode 100644 index 0000000000000000000000000000000000000000..4370276c196a7fa73d6f8917622cba1c4e033dee GIT binary patch literal 51 zcmZRVaB=ks@bJ`g@pN<#a`e>;@DB=c^Y`)e=VxGe;K0Pl$;KI)SCUzhlbT}4#=r!G E07ZHWvj6}9 literal 0 HcmV?d00001 diff --git a/Pramougolnik/Unit1.dfm b/Pramougolnik/Unit1.dfm new file mode 100644 index 0000000..f22aa31 --- /dev/null +++ b/Pramougolnik/Unit1.dfm @@ -0,0 +1,40 @@ +object Form1: TForm1 + Left = 191 + Top = 124 + Caption = 'Form1' + ClientHeight = 636 + ClientWidth = 1290 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object Image1: TImage + Left = 128 + Top = 128 + Width = 441 + Height = 249 + end + object Button1: TButton + Left = 72 + Top = 24 + Width = 75 + Height = 25 + Caption = 'Button1' + TabOrder = 0 + Visible = False + OnClick = Button1Click + end + object RectangleTimer: TTimer + Interval = 10 + OnTimer = RectangleTimerTimer + Left = 176 + Top = 24 + end +end diff --git a/Pramougolnik/Unit1.pas b/Pramougolnik/Unit1.pas new file mode 100644 index 0000000..1f684e8 --- /dev/null +++ b/Pramougolnik/Unit1.pas @@ -0,0 +1,292 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, Math, ExtCtrls, GDIPAPI, GDIPOBJ; + +type + TForm1 = class(TForm) + Button1: TButton; + RectangleTimer: TTimer; + Image1: TImage; + procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure RectangleTimerTimer(Sender: TObject); + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + glX1,glX2,glY1,glY2,glColor, glHowLong:Integer; + glColorR,glColorG,glColorB:Integer; + glFileName:String; + CountTimer,MaxCountTimer:Integer; + glFirstShow:Boolean; + glgraphics : TGPGraphics; + glPN: TGPPen; + glOldX1,glOldX2,glOldY1,glOldY2:integer; + +implementation + +{$R *.dfm} + +function LeftStr(S:String; Kol:Integer):String; + var + Res:String; +begin + + Res:=S; + Delete(Res,Kol+1,Length(Res)); + + LeftStr:=Res; +end; + +function RightStr(S:String; Kol:Integer):String; + var + Res:String; +begin + + Res:=S; + Delete(Res,1,Length(Res)-Kol); + + RightStr:=Res; +end; + + +procedure DrawArrowHead(Canvas: TCanvas; X,Y: Integer; Angle,LW: Extended); +var + A1,A2: Extended; + Arrow: array[0..3] of TPoint; + OldWidth: Integer; +const + Beta=0.322; + LineLen=4.74; + CentLen=3; +begin + Angle:=Pi+Angle; + Arrow[0]:=Point(X,Y); + A1:=Angle-Beta; + A2:=Angle+Beta; + Arrow[1]:=Point(X+Round(LineLen*LW*Cos(A1)),Y-Round(LineLen*LW*Sin(A1))); + Arrow[2]:=Point(X+Round(CentLen*LW*Cos(Angle)),Y-Round(CentLen*LW*Sin(Angle))); + Arrow[3]:=Point(X+Round(LineLen*LW*Cos(A2)),Y-Round(LineLen*LW*Sin(A2))); + OldWidth:=Canvas.Pen.Width; + Canvas.Pen.Width:=1; + Canvas.Polygon(Arrow); + Canvas.Pen.Width:=OldWidth +end; + +procedure DrawRectangle(Canvas: TCanvas; X1,Y1,X2,Y2: Integer; LW: Extended); +begin + glgraphics.DrawRectangle(glPN, X1,Y1, X2-X1,Y2-Y1); +end; + +procedure DrawArrowTimer(); +begin + CountTimer:=0; + MaxCountTimer:=300; + Form1.RectangleTimer.Enabled:=True; +end; + + +procedure TForm1.Button1Click(Sender: TObject); +begin + Form1.Canvas.Pen.Color:=clGreen; + Form1.Canvas.Brush.Color:=clGreen; + Form1.Canvas.Pen.Width:=10; + + DrawRectangle(Form1.Canvas,10,200,800,400,10); +end; + +procedure TForm1.FormCreate(Sender: TObject); + var + i: integer; +begin + Application.ShowMainForm:=false; + glgraphics := TGPGraphics.Create(Form1.Canvas.Handle); + glPN := TGPPen.Create(MakeColor(255, 0, 0, 0)); + + glgraphics.SetSmoothingMode(SmoothingModeAntiAlias); + glgraphics.SetCompositingQuality(CompositingQualityAssumeLinear); + glgraphics.SetInterpolationMode(InterpolationModeHighQualityBilinear); + + Form1.Visible:=false; + { + if ParamCount = 0 then + begin + Form1.Close; + ExitProcess(0); + end; + } + + //X1, Y1, X2, Y2, Цвет, Длительность,{Имя стоп файла(необязательный)} + //если на диске есть стоп файл, значит надо сделать exit + + glFirstShow:=True; + + glX1 := 100; + glY1 := 300; + glX2 := 1800; + glY2 := 350; + glHowLong:=30000; + glColor := 255; + glFileName:=''; + + for i := 1 to ParamCount do + begin + if i=1 then + glX1:=StrToInt(ParamStr(i)); + if i=2 then + glY1:=StrToInt(ParamStr(i)); + if i=3 then + glX2:=StrToInt(ParamStr(i)); + if i=4 then + glY2:=StrToInt(ParamStr(i)); + if i=5 then + glColorR:=StrToInt(ParamStr(i)); + if i=6 then + glColorG:=StrToInt(ParamStr(i)); + if i=7 then + glColorB:=StrToInt(ParamStr(i)); + if i=8 then + glHowLong:=StrToInt(ParamStr(i)); + + + if LeftStr(ParamStr(i),13) = 'stopfilename=' then + begin + glFileName:=RightStr(ParamStr(i),Length(ParamStr(i))-13); + end; + + end; + + DrawArrowTimer(); + +end; + +procedure CopyScreenToImage(); +var + bm: TBitMap; + ms: TMemoryStream; +begin + bm := TBitMap.Create; + bm.Width := Form1.Width; // ширина холста + bm.Height := Form1.Height; // длина холста + BitBlt(bm.Canvas.Handle, 0, 0, bm.Width, bm.Height, + GetDC(0), Form1.Left, Form1.Top, SRCCOPY); // 0, 0, bm.Width, bm.Height здесь это та часть экрана + // которую нужно копировать + + ms := TMemoryStream.Create; + bm.SaveToStream(ms); + ms.Position := 0; + Form1.Image1.Picture.Bitmap.LoadFromStream(ms); + bm.Destroy; + ms.Free; + +end; + + +procedure TForm1.RectangleTimerTimer(Sender: TObject); + var + OffsetX,OffsetY : integer; + ResX,ResY : integer; + Border:integer; + Angle: Extended; +begin + CountTimer:=CountTimer + Round(RectangleTimer.Interval); + + if glFileName <> '' then + begin + if FileExists(glFileName) then + begin + RectangleTimer.Enabled:=False; + ExitProcess(0); + end; + + end; + + + if CountTimer >= glHowLong then + begin + //RectangleTimerTimer.Enabled:=False; + ExitProcess(0); + end; + + if CountTimer > MaxCountTimer then + begin + //ExitProcess(0); + Exit; + end; + + Border:=10; + + + if glFirstShow then + begin + + glFirstShow:=False; + + Form1.TransparentColorValue := TColor(1); + Form1.Color := TColor(1); + Form1.transparentcolor := true; + + Form1.BorderStyle := bsNone; + Form1.Left:=1; + Form1.Top:=1; + Form1.Width:= Max(glX1,glX2)+Border*2; + Form1.Height:=Max(glY1,glY2)+Border*2; + + + Image1.Left:=0; + Image1.Top:=0; + Image1.Width:=Form1.Width; + Image1.Height:=Form1.Height; + + + Form1.Show; + + SetWindowPos(Form1.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE or SWP_NOMOVE); + SetWindowLong(Form1.Handle, GWL_EXSTYLE, GetWindowLong(Form1.Handle, GWL_EXSTYLE) or WS_EX_TRANSPARENT ); + end; + + + +if (CountTimer + Round(RectangleTimer.Interval)) > MaxCountTimer then + begin + Form1.Refresh; +end; + + + + glgraphics := TGPGraphics.Create(Form1.Canvas.Handle); + glPN := TGPPen.Create(MakeColor(255, glColorR, glColorG, glColorB)); + + glgraphics.SetSmoothingMode(SmoothingModeAntiAlias); + glgraphics.SetCompositingQuality(CompositingQualityAssumeLinear); + glgraphics.SetInterpolationMode(InterpolationModeHighQualityBilinear); + + glPN.SetWidth(3); + + + ResX:=glX1+OffsetX; + ResY:=glY1+OffsetY; + + DrawRectangle(Form1.Canvas,glX1,glY1,glX2,glY2,10); + + glOldX1:=glX1; + glOldY1:=glY1; + glOldX2:=ResX; + glOldY2:=ResY; +end; + +procedure TForm1.FormShow(Sender: TObject); +begin + ShowWindow(Application.Handle, SW_HIDE); +end; + +end. diff --git a/Pramougolnik/__history/Rectangle.dpr.~1~ b/Pramougolnik/__history/Rectangle.dpr.~1~ new file mode 100644 index 0000000..501be14 --- /dev/null +++ b/Pramougolnik/__history/Rectangle.dpr.~1~ @@ -0,0 +1,13 @@ +program Arrow; + +uses + Forms, + Unit1 in 'Unit1.pas' {Form1}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/Pramougolnik/__history/Unit1.dfm.~1~ b/Pramougolnik/__history/Unit1.dfm.~1~ new file mode 100644 index 0000000..600e4e6 --- /dev/null +++ b/Pramougolnik/__history/Unit1.dfm.~1~ @@ -0,0 +1,40 @@ +object Form1: TForm1 + Left = 191 + Top = 124 + Width = 1306 + Height = 675 + Caption = 'Form1' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object Image1: TImage + Left = 128 + Top = 128 + Width = 441 + Height = 249 + end + object Button1: TButton + Left = 72 + Top = 24 + Width = 75 + Height = 25 + Caption = 'Button1' + TabOrder = 0 + Visible = False + OnClick = Button1Click + end + object ArrowTimer: TTimer + Interval = 10 + OnTimer = ArrowTimerTimer + Left = 176 + Top = 24 + end +end diff --git a/Pramougolnik/__history/Unit1.dfm.~2~ b/Pramougolnik/__history/Unit1.dfm.~2~ new file mode 100644 index 0000000..f22aa31 --- /dev/null +++ b/Pramougolnik/__history/Unit1.dfm.~2~ @@ -0,0 +1,40 @@ +object Form1: TForm1 + Left = 191 + Top = 124 + Caption = 'Form1' + ClientHeight = 636 + ClientWidth = 1290 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object Image1: TImage + Left = 128 + Top = 128 + Width = 441 + Height = 249 + end + object Button1: TButton + Left = 72 + Top = 24 + Width = 75 + Height = 25 + Caption = 'Button1' + TabOrder = 0 + Visible = False + OnClick = Button1Click + end + object RectangleTimer: TTimer + Interval = 10 + OnTimer = RectangleTimerTimer + Left = 176 + Top = 24 + end +end diff --git a/Pramougolnik/__history/Unit1.pas.~1~ b/Pramougolnik/__history/Unit1.pas.~1~ new file mode 100644 index 0000000..b19b489 --- /dev/null +++ b/Pramougolnik/__history/Unit1.pas.~1~ @@ -0,0 +1,320 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, Math, ExtCtrls, GDIPAPI, GDIPOBJ; + +type + TForm1 = class(TForm) + Button1: TButton; + ArrowTimer: TTimer; + Image1: TImage; + procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure ArrowTimerTimer(Sender: TObject); + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + glX1,glX2,glY1,glY2,glColor, glHowLong:Integer; + glColorR,glColorG,glColorB:Integer; + glFileName:String; + CountTimer,MaxCountTimer:Integer; + glFirstShow:Boolean; + glgraphics : TGPGraphics; + glPN: TGPPen; + glOldX1,glOldX2,glOldY1,glOldY2:integer; + +implementation + +{$R *.dfm} + +function LeftStr(S:String; Kol:Integer):String; + var + Res:String; +begin + + Res:=S; + Delete(Res,Kol+1,Length(Res)); + + LeftStr:=Res; +end; + +function RightStr(S:String; Kol:Integer):String; + var + Res:String; +begin + + Res:=S; + Delete(Res,1,Length(Res)-Kol); + + RightStr:=Res; +end; + + +procedure DrawArrowHead(Canvas: TCanvas; X,Y: Integer; Angle,LW: Extended); +var + A1,A2: Extended; + Arrow: array[0..3] of TPoint; + OldWidth: Integer; +const + Beta=0.322; + LineLen=4.74; + CentLen=3; +begin + Angle:=Pi+Angle; + Arrow[0]:=Point(X,Y); + A1:=Angle-Beta; + A2:=Angle+Beta; + Arrow[1]:=Point(X+Round(LineLen*LW*Cos(A1)),Y-Round(LineLen*LW*Sin(A1))); + Arrow[2]:=Point(X+Round(CentLen*LW*Cos(Angle)),Y-Round(CentLen*LW*Sin(Angle))); + Arrow[3]:=Point(X+Round(LineLen*LW*Cos(A2)),Y-Round(LineLen*LW*Sin(A2))); + OldWidth:=Canvas.Pen.Width; + Canvas.Pen.Width:=1; + Canvas.Polygon(Arrow); + Canvas.Pen.Width:=OldWidth +end; + +procedure DrawArrow(Canvas: TCanvas; X1,Y1,X2,Y2: Integer; LW: Extended); +var + Angle: Extended; +begin + Angle:=ArcTan2(Y1-Y2,X2-X1); + //Canvas.MoveTo(X1,Y1); + //Canvas.LineTo(X2-Round(2*LW*Cos(Angle)),Y2+Round(2*LW*Sin(Angle))); + glgraphics.DrawLine(glPN, X1,Y1, X2-Round(2*LW*Cos(Angle)),Y2+Round(2*LW*Sin(Angle))); + //glgraphics.DrawLine(glPN, 100, 330, 1800, 430); + + DrawArrowHead(Canvas,X2,Y2,Angle,LW); +end; + +procedure DrawArrowTimer(); +begin + CountTimer:=0; + MaxCountTimer:=300; + Form1.ArrowTimer.Enabled:=True; +end; + + +procedure TForm1.Button1Click(Sender: TObject); +begin + Form1.Canvas.Pen.Color:=clGreen; + Form1.Canvas.Brush.Color:=clGreen; + Form1.Canvas.Pen.Width:=10; + + DrawArrow(Form1.Canvas,10,200,800,400,10); +end; + +procedure TForm1.FormCreate(Sender: TObject); + var + i: integer; +begin + Application.ShowMainForm:=false; + glgraphics := TGPGraphics.Create(Form1.Canvas.Handle); + glPN := TGPPen.Create(MakeColor(255, 0, 0, 0)); + + glgraphics.SetSmoothingMode(SmoothingModeAntiAlias); + glgraphics.SetCompositingQuality(CompositingQualityAssumeLinear); + glgraphics.SetInterpolationMode(InterpolationModeHighQualityBilinear); + + Form1.Visible:=false; + { + if ParamCount = 0 then + begin + Form1.Close; + ExitProcess(0); + end; + } + + //X1, Y1, X2, Y2, Цвет, Длительность,{Имя стоп файла(необязательный)} + //если на диске есть стоп файл, значит надо сделать exit + + glFirstShow:=True; + + glX1 := 100; + glY1 := 300; + glX2 := 1800; + glY2 := 350; + glHowLong:=30000; + glColor := 255; + glFileName:=''; + + for i := 1 to ParamCount do + begin + if i=1 then + glX1:=StrToInt(ParamStr(i)); + if i=2 then + glY1:=StrToInt(ParamStr(i)); + if i=3 then + glX2:=StrToInt(ParamStr(i)); + if i=4 then + glY2:=StrToInt(ParamStr(i)); + if i=5 then + glColorR:=StrToInt(ParamStr(i)); + if i=6 then + glColorG:=StrToInt(ParamStr(i)); + if i=7 then + glColorB:=StrToInt(ParamStr(i)); + if i=8 then + glHowLong:=StrToInt(ParamStr(i)); + + + if LeftStr(ParamStr(i),13) = 'stopfilename=' then + begin + glFileName:=RightStr(ParamStr(i),Length(ParamStr(i))-13); + end; + + end; + + DrawArrowTimer(); + +end; + +procedure CopyScreenToImage(); +var + bm: TBitMap; + ms: TMemoryStream; +begin + bm := TBitMap.Create; + bm.Width := Form1.Width; // ширина холста + bm.Height := Form1.Height; // длина холста + BitBlt(bm.Canvas.Handle, 0, 0, bm.Width, bm.Height, + GetDC(0), Form1.Left, Form1.Top, SRCCOPY); // 0, 0, bm.Width, bm.Height здесь это та часть экрана + // которую нужно копировать + + ms := TMemoryStream.Create; + bm.SaveToStream(ms); + ms.Position := 0; + Form1.Image1.Picture.Bitmap.LoadFromStream(ms); + bm.Destroy; + ms.Free; + +end; + + +procedure TForm1.ArrowTimerTimer(Sender: TObject); + var + OffsetX,OffsetY : integer; + ResX,ResY : integer; + Border:integer; + Angle: Extended; +begin + CountTimer:=CountTimer + Round(ArrowTimer.Interval); + + if glFileName <> '' then + begin + if FileExists(glFileName) then + begin + ArrowTimer.Enabled:=False; + ExitProcess(0); + end; + + end; + + + if CountTimer >= glHowLong then + begin + ArrowTimer.Enabled:=False; + ExitProcess(0); + end; + + if CountTimer > MaxCountTimer then + begin + //ExitProcess(0); + Exit; + end; + + Border:=10; + + + if glFirstShow then + begin + + glFirstShow:=False; + + Form1.TransparentColorValue := TColor(1); + Form1.Color := TColor(1); + Form1.transparentcolor := true; + + Form1.BorderStyle := bsNone; + Form1.Left:=1; + Form1.Top:=1; + Form1.Width:= Max(glX1,glX2)+Border*2; + Form1.Height:=Max(glY1,glY2)+Border*2; + + + Image1.Left:=0; + Image1.Top:=0; + Image1.Width:=Form1.Width; + Image1.Height:=Form1.Height; + + CopyScreenToImage(); + + Form1.Show; + + SetWindowPos(Form1.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE or SWP_NOMOVE); + SetWindowLong(Form1.Handle, GWL_EXSTYLE, GetWindowLong(Form1.Handle, GWL_EXSTYLE) or WS_EX_TRANSPARENT ); + end + else + begin + Form1.Canvas.Pen.Color:=TColor(1); + Form1.Canvas.Brush.Color:=TColor(1); + Form1.Canvas.Pen.Width:=10; + + Angle:=ArcTan2(glOldY1-glOldY2,glOldX2-glOldX1); + DrawArrowHead(Form1.Canvas,glOldX2,glOldY2,Angle,10); + end; + + + + Form1.Canvas.Pen.Color:=RGB(glColorR,glColorG,glColorB); + Form1.Canvas.Brush.Color:=RGB(glColorR,glColorG,glColorB); + Form1.Canvas.Pen.Width:=10; + + + OffsetX:= Round((CountTimer/MaxCountTimer)*(glX2-glX1)); + OffsetY:= Round((CountTimer/MaxCountTimer)*(glY2-glY1)); + + if (CountTimer + Round(ArrowTimer.Interval)) > MaxCountTimer then + begin + Form1.Refresh; + end; + + + + glgraphics := TGPGraphics.Create(Form1.Canvas.Handle); + glPN := TGPPen.Create(MakeColor(255, glColorR, glColorG, glColorB)); + + glgraphics.SetSmoothingMode(SmoothingModeAntiAlias); + glgraphics.SetCompositingQuality(CompositingQualityAssumeLinear); + glgraphics.SetInterpolationMode(InterpolationModeHighQualityBilinear); + + glPN.SetWidth(10); + + + ResX:=glX1+OffsetX; + ResY:=glY1+OffsetY; + + + + DrawArrow(Form1.Canvas,glX1,glY1,ResX,ResY,10); + + glOldX1:=glX1; + glOldY1:=glY1; + glOldX2:=ResX; + glOldY2:=ResY; +end; + +procedure TForm1.FormShow(Sender: TObject); +begin + ShowWindow(Application.Handle, SW_HIDE); +end; + +end.