home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 May / CMCD0504.ISO / Software / Freeware / Programare / gdiplusdelphi / pas / GDIPAPI.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2003-04-05  |  308.0 KB  |  7,016 lines

  1.       {******************************************************************}
  2.       { GDI+ API                                                         }
  3.       {                                                                  }
  4.       { home page : http://www.progdigy.com                              }
  5.       { email     : hgourvest@progdigy.com                               }
  6.       {                                                                  }
  7.       { date      : 15-02-2002                                           }
  8.       {                                                                  }
  9.       { The contents of this file are used with permission, subject to   }
  10.       { the Mozilla Public License Version 1.1 (the "License"); you may  }
  11.       { not use this file except in compliance with the License. You may }
  12.       { obtain a copy of the License at                                  }
  13.       { http://www.mozilla.org/MPL/MPL-1.1.html                          }
  14.       {                                                                  }
  15.       { Software distributed under the License is distributed on an      }
  16.       { "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or   }
  17.       { implied. See the License for the specific language governing     }
  18.       { rights and limitations under the License.                        }
  19.       {                                                                  }
  20.       { *****************************************************************}
  21.  
  22. unit GDIPAPI;
  23.  
  24. {$ALIGN ON}
  25. {$MINENUMSIZE 4}
  26.  
  27. interface
  28.  
  29. (**************************************************************************\
  30. *
  31. *   GDI+ public header file
  32. *
  33. \**************************************************************************)
  34.  
  35. uses
  36.   Windows,
  37.   ActiveX,
  38.   DirectDraw,
  39.   Math;
  40.  
  41. type
  42.   INT16   = type Smallint;
  43.   UINT16  = type Word;
  44.   PUINT16 = ^UINT16;
  45.   UINT32  = type Cardinal;
  46.   TSingleDynArray = array of Single;
  47.  
  48. (**************************************************************************\
  49. *
  50. *   GDI+ Private Memory Management APIs
  51. *
  52. \**************************************************************************)
  53.  
  54. const WINGDIPDLL = 'gdiplus.dll';
  55.  
  56. //----------------------------------------------------------------------------
  57. // Memory Allocation APIs
  58. //----------------------------------------------------------------------------
  59.  
  60. {$EXTERNALSYM GdipAlloc}
  61. function GdipAlloc(size: ULONG): pointer; stdcall;
  62. {$EXTERNALSYM GdipFree}
  63. procedure GdipFree(ptr: pointer); stdcall;
  64.  
  65. (**************************************************************************\
  66. *
  67. *   GDI+ base memory allocation class
  68. *
  69. \**************************************************************************)
  70.  
  71. type
  72.   TGdiplusBase = class
  73.   public
  74.     class function NewInstance: TObject; override;
  75.     procedure FreeInstance; override;
  76.   end;
  77.  
  78. (**************************************************************************\
  79. *
  80. *   GDI+ Enumeration Types
  81. *
  82. \**************************************************************************)
  83.  
  84. //--------------------------------------------------------------------------
  85. // Default bezier flattening tolerance in device pixels.
  86. //--------------------------------------------------------------------------
  87.  
  88. const
  89.   {$EXTERNALSYM FlatnessDefault}
  90.   FlatnessDefault = 0.25;
  91.  
  92. //--------------------------------------------------------------------------
  93. // Graphics and Container State cookies
  94. //--------------------------------------------------------------------------
  95. type
  96.   {$EXTERNALSYM GraphicsState}
  97.   GraphicsState     = UINT;
  98.   {$EXTERNALSYM GraphicsContainer}
  99.   GraphicsContainer = UINT;
  100.  
  101. //--------------------------------------------------------------------------
  102. // Fill mode constants
  103. //--------------------------------------------------------------------------
  104.  
  105.   {$EXTERNALSYM FillMode}
  106.   FillMode = (
  107.     FillModeAlternate,        // 0
  108.     FillModeWinding           // 1
  109.   );
  110.   TFillMode = FillMode;
  111.  
  112. //--------------------------------------------------------------------------
  113. // Quality mode constants
  114. //--------------------------------------------------------------------------
  115.  
  116. {$IFDEF DELPHI6_UP}
  117.   {$EXTERNALSYM QualityMode}
  118.   QualityMode = (
  119.     QualityModeInvalid   = -1,
  120.     QualityModeDefault   =  0,
  121.     QualityModeLow       =  1, // Best performance
  122.     QualityModeHigh      =  2  // Best rendering quality
  123.   );
  124.   TQualityMode = QualityMode;
  125. {$ELSE}
  126.   {$EXTERNALSYM QualityMode}
  127.   QualityMode = Integer;
  128.   const
  129.     QualityModeInvalid   = -1;
  130.     QualityModeDefault   =  0;
  131.     QualityModeLow       =  1; // Best performance
  132.     QualityModeHigh      =  2; // Best rendering quality
  133. {$ENDIF}
  134.  
  135. //--------------------------------------------------------------------------
  136. // Alpha Compositing mode constants
  137. //--------------------------------------------------------------------------
  138. type
  139.   {$EXTERNALSYM CompositingMode}
  140.   CompositingMode = (
  141.     CompositingModeSourceOver,    // 0
  142.     CompositingModeSourceCopy     // 1
  143.   );
  144.   TCompositingMode = CompositingMode;
  145.  
  146. //--------------------------------------------------------------------------
  147. // Alpha Compositing quality constants
  148. //--------------------------------------------------------------------------
  149. {$IFDEF DELPHI6_UP}
  150.   {$EXTERNALSYM CompositingQuality}
  151.   CompositingQuality = (
  152.     CompositingQualityInvalid          = ord(QualityModeInvalid),
  153.     CompositingQualityDefault          = ord(QualityModeDefault),
  154.     CompositingQualityHighSpeed        = ord(QualityModeLow),
  155.     CompositingQualityHighQuality      = ord(QualityModeHigh),
  156.     CompositingQualityGammaCorrected,
  157.     CompositingQualityAssumeLinear
  158.   );
  159.   TCompositingQuality = CompositingQuality;
  160. {$ELSE}
  161.   {$EXTERNALSYM CompositingQuality}
  162.   CompositingQuality = Integer;
  163.   const
  164.     CompositingQualityInvalid          = QualityModeInvalid;
  165.     CompositingQualityDefault          = QualityModeDefault;
  166.     CompositingQualityHighSpeed        = QualityModeLow;
  167.     CompositingQualityHighQuality      = QualityModeHigh;
  168.     CompositingQualityGammaCorrected   = 3;
  169.     CompositingQualityAssumeLinear     = 4;
  170.  
  171. type
  172.   TCompositingQuality = CompositingQuality;
  173. {$ENDIF}
  174.  
  175. //--------------------------------------------------------------------------
  176. // Unit constants
  177. //--------------------------------------------------------------------------
  178.  
  179.  // {$EXTERNALSYM Unit}
  180.   Unit_ = (
  181.     UnitWorld,      // 0 -- World coordinate (non-physical unit)
  182.     UnitDisplay,    // 1 -- Variable -- for PageTransform only
  183.     UnitPixel,      // 2 -- Each unit is one device pixel.
  184.     UnitPoint,      // 3 -- Each unit is a printer's point, or 1/72 inch.
  185.     UnitInch,       // 4 -- Each unit is 1 inch.
  186.     UnitDocument,   // 5 -- Each unit is 1/300 inch.
  187.     UnitMillimeter  // 6 -- Each unit is 1 millimeter.
  188.   );
  189.   TUnit = Unit_;
  190.  
  191. //--------------------------------------------------------------------------
  192. // MetafileFrameUnit
  193. //
  194. // The frameRect for creating a metafile can be specified in any of these
  195. // units.  There is an extra frame unit value (MetafileFrameUnitGdi) so
  196. // that units can be supplied in the same units that GDI expects for
  197. // frame rects -- these units are in .01 (1/100ths) millimeter units
  198. // as defined by GDI.
  199. //--------------------------------------------------------------------------
  200. {$IFDEF DELPHI6_UP}
  201.   {$EXTERNALSYM MetafileFrameUnit}
  202.   MetafileFrameUnit = (
  203.     MetafileFrameUnitPixel      = ord(UnitPixel),
  204.     MetafileFrameUnitPoint      = ord(UnitPoint),
  205.     MetafileFrameUnitInch       = ord(UnitInch),
  206.     MetafileFrameUnitDocument   = ord(UnitDocument),
  207.     MetafileFrameUnitMillimeter = ord(UnitMillimeter),
  208.     MetafileFrameUnitGdi        // GDI compatible .01 MM units
  209.   );
  210.   TMetafileFrameUnit = MetafileFrameUnit;
  211. {$ELSE}
  212.   {$EXTERNALSYM MetafileFrameUnit}
  213.   MetafileFrameUnit = Integer;
  214.   const
  215.     MetafileFrameUnitPixel      = 2;
  216.     MetafileFrameUnitPoint      = 3;
  217.     MetafileFrameUnitInch       = 4;
  218.     MetafileFrameUnitDocument   = 5;
  219.     MetafileFrameUnitMillimeter = 6;
  220.     MetafileFrameUnitGdi        = 7; // GDI compatible .01 MM units
  221.  
  222. type
  223.   TMetafileFrameUnit = MetafileFrameUnit;
  224. {$ENDIF}
  225. //--------------------------------------------------------------------------
  226. // Coordinate space identifiers
  227. //--------------------------------------------------------------------------
  228.  
  229.   {$EXTERNALSYM CoordinateSpace}
  230.   CoordinateSpace = (
  231.     CoordinateSpaceWorld,     // 0
  232.     CoordinateSpacePage,      // 1
  233.     CoordinateSpaceDevice     // 2
  234.   );
  235.   TCoordinateSpace = CoordinateSpace;
  236.  
  237. //--------------------------------------------------------------------------
  238. // Various wrap modes for brushes
  239. //--------------------------------------------------------------------------
  240.  
  241.   {$EXTERNALSYM WrapMode}
  242.   WrapMode = (
  243.     WrapModeTile,        // 0
  244.     WrapModeTileFlipX,   // 1
  245.     WrapModeTileFlipY,   // 2
  246.     WrapModeTileFlipXY,  // 3
  247.     WrapModeClamp        // 4
  248.   );
  249.   TWrapMode = WrapMode;
  250.  
  251. //--------------------------------------------------------------------------
  252. // Various hatch styles
  253. //--------------------------------------------------------------------------
  254.  
  255.   {$EXTERNALSYM HatchStyle}
  256.   HatchStyle = (
  257.     HatchStyleHorizontal,                  // = 0,
  258.     HatchStyleVertical,                    // = 1,
  259.     HatchStyleForwardDiagonal,             // = 2,
  260.     HatchStyleBackwardDiagonal,            // = 3,
  261.     HatchStyleCross,                       // = 4,
  262.     HatchStyleDiagonalCross,               // = 5,
  263.     HatchStyle05Percent,                   // = 6,
  264.     HatchStyle10Percent,                   // = 7,
  265.     HatchStyle20Percent,                   // = 8,
  266.     HatchStyle25Percent,                   // = 9,
  267.     HatchStyle30Percent,                   // = 10,
  268.     HatchStyle40Percent,                   // = 11,
  269.     HatchStyle50Percent,                   // = 12,
  270.     HatchStyle60Percent,                   // = 13,
  271.     HatchStyle70Percent,                   // = 14,
  272.     HatchStyle75Percent,                   // = 15,
  273.     HatchStyle80Percent,                   // = 16,
  274.     HatchStyle90Percent,                   // = 17,
  275.     HatchStyleLightDownwardDiagonal,       // = 18,
  276.     HatchStyleLightUpwardDiagonal,         // = 19,
  277.     HatchStyleDarkDownwardDiagonal,        // = 20,
  278.     HatchStyleDarkUpwardDiagonal,          // = 21,
  279.     HatchStyleWideDownwardDiagonal,        // = 22,
  280.     HatchStyleWideUpwardDiagonal,          // = 23,
  281.     HatchStyleLightVertical,               // = 24,
  282.     HatchStyleLightHorizontal,             // = 25,
  283.     HatchStyleNarrowVertical,              // = 26,
  284.     HatchStyleNarrowHorizontal,            // = 27,
  285.     HatchStyleDarkVertical,                // = 28,
  286.     HatchStyleDarkHorizontal,              // = 29,
  287.     HatchStyleDashedDownwardDiagonal,      // = 30,
  288.     HatchStyleDashedUpwardDiagonal,        // = 31,
  289.     HatchStyleDashedHorizontal,            // = 32,
  290.     HatchStyleDashedVertical,              // = 33,
  291.     HatchStyleSmallConfetti,               // = 34,
  292.     HatchStyleLargeConfetti,               // = 35,
  293.     HatchStyleZigZag,                      // = 36,
  294.     HatchStyleWave,                        // = 37,
  295.     HatchStyleDiagonalBrick,               // = 38,
  296.     HatchStyleHorizontalBrick,             // = 39,
  297.     HatchStyleWeave,                       // = 40,
  298.     HatchStylePlaid,                       // = 41,
  299.     HatchStyleDivot,                       // = 42,
  300.     HatchStyleDottedGrid,                  // = 43,
  301.     HatchStyleDottedDiamond,               // = 44,
  302.     HatchStyleShingle,                     // = 45,
  303.     HatchStyleTrellis,                     // = 46,
  304.     HatchStyleSphere,                      // = 47,
  305.     HatchStyleSmallGrid,                   // = 48,
  306.     HatchStyleSmallCheckerBoard,           // = 49,
  307.     HatchStyleLargeCheckerBoard,           // = 50,
  308.     HatchStyleOutlinedDiamond,             // = 51,
  309.     HatchStyleSolidDiamond,                // = 52,
  310.  
  311.     HatchStyleTotal                        // = 53,
  312.   );
  313.  
  314.   const
  315.     HatchStyleLargeGrid = HatchStyleCross; // 4
  316.     HatchStyleMin       = HatchStyleHorizontal;
  317.     HatchStyleMax       = HatchStyleSolidDiamond;
  318.  
  319. type
  320.   THatchStyle = HatchStyle;
  321.  
  322. //--------------------------------------------------------------------------
  323. // Dash style constants
  324. //--------------------------------------------------------------------------
  325.  
  326.   {$EXTERNALSYM DashStyle}
  327.   DashStyle = (
  328.     DashStyleSolid,          // 0
  329.     DashStyleDash,           // 1
  330.     DashStyleDot,            // 2
  331.     DashStyleDashDot,        // 3
  332.     DashStyleDashDotDot,     // 4
  333.     DashStyleCustom          // 5
  334.   );
  335.   TDashStyle = DashStyle;
  336.  
  337. //--------------------------------------------------------------------------
  338. // Dash cap constants
  339. //--------------------------------------------------------------------------
  340. {$IFDEF DELPHI6_UP}
  341.   {$EXTERNALSYM DashCap}
  342.   DashCap = (
  343.     DashCapFlat             = 0,
  344.     DashCapRound            = 2,
  345.     DashCapTriangle         = 3
  346.   );
  347.   TDashCap = DashCap;
  348. {$ELSE}
  349.   {$EXTERNALSYM DashCap}
  350.   DashCap = Integer;
  351.   const
  352.     DashCapFlat             = 0;
  353.     DashCapRound            = 2;
  354.     DashCapTriangle         = 3;
  355.  
  356. type
  357.   TDashCap = DashCap;
  358. {$ENDIF}
  359.  
  360. //--------------------------------------------------------------------------
  361. // Line cap constants (only the lowest 8 bits are used).
  362. //--------------------------------------------------------------------------
  363. {$IFDEF DELPHI6_UP}
  364.   {$EXTERNALSYM LineCap}
  365.   LineCap = (
  366.     LineCapFlat             = 0,
  367.     LineCapSquare           = 1,
  368.     LineCapRound            = 2,
  369.     LineCapTriangle         = 3,
  370.  
  371.     LineCapNoAnchor         = $10, // corresponds to flat cap
  372.     LineCapSquareAnchor     = $11, // corresponds to square cap
  373.     LineCapRoundAnchor      = $12, // corresponds to round cap
  374.     LineCapDiamondAnchor    = $13, // corresponds to triangle cap
  375.     LineCapArrowAnchor      = $14, // no correspondence
  376.  
  377.     LineCapCustom           = $ff, // custom cap
  378.  
  379.     LineCapAnchorMask       = $f0  // mask to check for anchor or not.
  380.   );
  381.   TLineCap = LineCap;
  382. {$ELSE}
  383.   {$EXTERNALSYM LineCap}
  384.   LineCap = Integer;
  385.   const
  386.     LineCapFlat             = 0;
  387.     LineCapSquare           = 1;
  388.     LineCapRound            = 2;
  389.     LineCapTriangle         = 3;
  390.  
  391.     LineCapNoAnchor         = $10; // corresponds to flat cap
  392.     LineCapSquareAnchor     = $11; // corresponds to square cap
  393.     LineCapRoundAnchor      = $12; // corresponds to round cap
  394.     LineCapDiamondAnchor    = $13; // corresponds to triangle cap
  395.     LineCapArrowAnchor      = $14; // no correspondence
  396.  
  397.     LineCapCustom           = $ff; // custom cap
  398.  
  399.     LineCapAnchorMask       = $f0; // mask to check for anchor or not.
  400.  
  401. type
  402.   TLineCap = LineCap;
  403. {$ENDIF}
  404.  
  405. //--------------------------------------------------------------------------
  406. // Custom Line cap type constants
  407. //--------------------------------------------------------------------------
  408.  
  409.   {$EXTERNALSYM CustomLineCapType}
  410.   CustomLineCapType = (
  411.     CustomLineCapTypeDefault,
  412.     CustomLineCapTypeAdjustableArrow
  413.   );
  414.   TCustomLineCapType = CustomLineCapType;
  415.  
  416. //--------------------------------------------------------------------------
  417. // Line join constants
  418. //--------------------------------------------------------------------------
  419.  
  420.   {$EXTERNALSYM LineJoin}
  421.   LineJoin = (
  422.     LineJoinMiter,
  423.     LineJoinBevel,
  424.     LineJoinRound,
  425.     LineJoinMiterClipped
  426.   );
  427.   TLineJoin = LineJoin;
  428.  
  429. //--------------------------------------------------------------------------
  430. // Path point types (only the lowest 8 bits are used.)
  431. //  The lowest 3 bits are interpreted as point type
  432. //  The higher 5 bits are reserved for flags.
  433. //--------------------------------------------------------------------------
  434.  
  435. {$IFDEF DELPHI6_UP}
  436.   {$Z1}
  437.   {$EXTERNALSYM PathPointType}
  438.   PathPointType = (
  439.     PathPointTypeStart           = $00, // move
  440.     PathPointTypeLine            = $01, // line
  441.     PathPointTypeBezier          = $03, // default Bezier (= cubic Bezier)
  442.     PathPointTypePathTypeMask    = $07, // type mask (lowest 3 bits).
  443.     PathPointTypeDashMode        = $10, // currently in dash mode.
  444.     PathPointTypePathMarker      = $20, // a marker for the path.
  445.     PathPointTypeCloseSubpath    = $80, // closed flag
  446.  
  447.     // Path types used for advanced path.
  448.     PathPointTypeBezier3         = $03  // cubic Bezier
  449.   );
  450.   TPathPointType = PathPointType;
  451.   {$Z4}
  452. {$ELSE}
  453.   {$EXTERNALSYM PathPointType}
  454.   PathPointType = Byte;
  455.   const
  456.     PathPointTypeStart          : Byte = $00; // move
  457.     PathPointTypeLine           : Byte = $01; // line
  458.     PathPointTypeBezier         : Byte = $03; // default Bezier (= cubic Bezier)
  459.     PathPointTypePathTypeMask   : Byte = $07; // type mask (lowest 3 bits).
  460.     PathPointTypeDashMode       : Byte = $10; // currently in dash mode.
  461.     PathPointTypePathMarker     : Byte = $20; // a marker for the path.
  462.     PathPointTypeCloseSubpath   : Byte = $80; // closed flag
  463.  
  464.     // Path types used for advanced path.
  465.     PathPointTypeBezier3        : Byte = $03;  // cubic Bezier
  466.  
  467. type
  468.   TPathPointType = PathPointType;
  469. {$ENDIF}
  470.  
  471. //--------------------------------------------------------------------------
  472. // WarpMode constants
  473. //--------------------------------------------------------------------------
  474.  
  475.   {$EXTERNALSYM WarpMode}
  476.   WarpMode = (
  477.     WarpModePerspective,    // 0
  478.     WarpModeBilinear        // 1
  479.   );
  480.   TWarpMode = WarpMode;
  481.  
  482. //--------------------------------------------------------------------------
  483. // LineGradient Mode
  484. //--------------------------------------------------------------------------
  485.  
  486.   {$EXTERNALSYM LinearGradientMode}
  487.   LinearGradientMode = (
  488.     LinearGradientModeHorizontal,         // 0
  489.     LinearGradientModeVertical,           // 1
  490.     LinearGradientModeForwardDiagonal,    // 2
  491.     LinearGradientModeBackwardDiagonal    // 3
  492.   );
  493.   TLinearGradientMode = LinearGradientMode;
  494.  
  495. //--------------------------------------------------------------------------
  496. // Region Comine Modes
  497. //--------------------------------------------------------------------------
  498.  
  499.   {$EXTERNALSYM CombineMode}
  500.   CombineMode = (
  501.     CombineModeReplace,     // 0
  502.     CombineModeIntersect,   // 1
  503.     CombineModeUnion,       // 2
  504.     CombineModeXor,         // 3
  505.     CombineModeExclude,     // 4
  506.     CombineModeComplement   // 5 (Exclude From)
  507.   );
  508.   TCombineMode = CombineMode;
  509.  
  510. //--------------------------------------------------------------------------
  511.  // Image types
  512. //--------------------------------------------------------------------------
  513.  
  514.   {$EXTERNALSYM ImageType}
  515.   ImageType = (
  516.     ImageTypeUnknown,   // 0
  517.     ImageTypeBitmap,    // 1
  518.     ImageTypeMetafile   // 2
  519.   );
  520.   TImageType = ImageType;
  521.  
  522. //--------------------------------------------------------------------------
  523. // Interpolation modes
  524. //--------------------------------------------------------------------------
  525. {$IFDEF DELPHI6_UP}
  526.   {$EXTERNALSYM InterpolationMode}
  527.   InterpolationMode = (
  528.     InterpolationModeInvalid          = ord(QualityModeInvalid),
  529.     InterpolationModeDefault          = ord(QualityModeDefault),
  530.     InterpolationModeLowQuality       = ord(QualityModeLow),
  531.     InterpolationModeHighQuality      = ord(QualityModeHigh),
  532.     InterpolationModeBilinear,
  533.     InterpolationModeBicubic,
  534.     InterpolationModeNearestNeighbor,
  535.     InterpolationModeHighQualityBilinear,
  536.     InterpolationModeHighQualityBicubic
  537.   );
  538.   TInterpolationMode = InterpolationMode;
  539. {$ELSE}
  540.   {$EXTERNALSYM InterpolationMode}
  541.   InterpolationMode = Integer;
  542.   const
  543.     InterpolationModeInvalid             = QualityModeInvalid;
  544.     InterpolationModeDefault             = QualityModeDefault;
  545.     InterpolationModeLowQuality          = QualityModeLow;
  546.     InterpolationModeHighQuality         = QualityModeHigh;
  547.     InterpolationModeBilinear            = 3;
  548.     InterpolationModeBicubic             = 4;
  549.     InterpolationModeNearestNeighbor     = 5;
  550.     InterpolationModeHighQualityBilinear = 6;
  551.     InterpolationModeHighQualityBicubic  = 7;
  552.  
  553. type
  554.   TInterpolationMode = InterpolationMode;
  555. {$ENDIF}
  556.  
  557. //--------------------------------------------------------------------------
  558. // Pen types
  559. //--------------------------------------------------------------------------
  560.  
  561.   {$EXTERNALSYM PenAlignment}
  562.   PenAlignment = (
  563.     PenAlignmentCenter,
  564.     PenAlignmentInset
  565.   );
  566.   TPenAlignment = PenAlignment;
  567.  
  568. //--------------------------------------------------------------------------
  569. // Brush types
  570. //--------------------------------------------------------------------------
  571.  
  572.   {$EXTERNALSYM BrushType}
  573.   BrushType = (
  574.    BrushTypeSolidColor,
  575.    BrushTypeHatchFill,
  576.    BrushTypeTextureFill,
  577.    BrushTypePathGradient,
  578.    BrushTypeLinearGradient 
  579.   );
  580.   TBrushType = BrushType;
  581.  
  582. //--------------------------------------------------------------------------
  583. // Pen's Fill types
  584. //--------------------------------------------------------------------------
  585. {$IFDEF DELPHI6_UP}
  586.   {$EXTERNALSYM PenType}
  587.   PenType = (
  588.    PenTypeSolidColor       =  ord(BrushTypeSolidColor),
  589.    PenTypeHatchFill        =  ord(BrushTypeHatchFill),
  590.    PenTypeTextureFill      =  ord(BrushTypeTextureFill),
  591.    PenTypePathGradient     =  ord(BrushTypePathGradient),
  592.    PenTypeLinearGradient   =  ord(BrushTypeLinearGradient),
  593.    PenTypeUnknown          = -1
  594.   );
  595.   TPenType = PenType;
  596. {$ELSE}
  597.   {$EXTERNALSYM PenType}
  598.   PenType = Integer;
  599.   const
  600.     PenTypeSolidColor       =  0;
  601.     PenTypeHatchFill        =  1;
  602.     PenTypeTextureFill      =  2;
  603.     PenTypePathGradient     =  3;
  604.     PenTypeLinearGradient   =  4;
  605.     PenTypeUnknown          = -1;
  606.  
  607. type
  608.   TPenType = PenType;
  609. {$ENDIF}
  610.  
  611. //--------------------------------------------------------------------------
  612. // Matrix Order
  613. //--------------------------------------------------------------------------
  614.  
  615.   {$EXTERNALSYM MatrixOrder}
  616.   MatrixOrder = (
  617.     MatrixOrderPrepend,
  618.     MatrixOrderAppend
  619.   );
  620.   TMatrixOrder = MatrixOrder;
  621.  
  622. //--------------------------------------------------------------------------
  623. // Generic font families
  624. //--------------------------------------------------------------------------
  625.  
  626.   {$EXTERNALSYM GenericFontFamily}
  627.   GenericFontFamily = (
  628.     GenericFontFamilySerif,
  629.     GenericFontFamilySansSerif,
  630.     GenericFontFamilyMonospace
  631.   );
  632.   TGenericFontFamily = GenericFontFamily;
  633.  
  634. //--------------------------------------------------------------------------
  635. // FontStyle: face types and common styles
  636. //--------------------------------------------------------------------------
  637. type
  638.   {$EXTERNALSYM FontStyle}
  639.   FontStyle = Integer;
  640.   const
  641.     FontStyleRegular    = Integer(0);
  642.     FontStyleBold       = Integer(1);
  643.     FontStyleItalic     = Integer(2);
  644.     FontStyleBoldItalic = Integer(3);
  645.     FontStyleUnderline  = Integer(4);
  646.     FontStyleStrikeout  = Integer(8);
  647.   Type
  648.   TFontStyle = FontStyle;
  649.  
  650. //---------------------------------------------------------------------------
  651. // Smoothing Mode
  652. //---------------------------------------------------------------------------
  653. {$IFDEF DELPHI6_UP}
  654.   {$EXTERNALSYM SmoothingMode}
  655.   SmoothingMode = (
  656.     SmoothingModeInvalid     = ord(QualityModeInvalid),
  657.     SmoothingModeDefault     = ord(QualityModeDefault),
  658.     SmoothingModeHighSpeed   = ord(QualityModeLow),
  659.     SmoothingModeHighQuality = ord(QualityModeHigh),
  660.     SmoothingModeNone,
  661.     SmoothingModeAntiAlias
  662.   );
  663.   TSmoothingMode = SmoothingMode;
  664. {$ELSE}
  665.   {$EXTERNALSYM SmoothingMode}
  666.   SmoothingMode = Integer;
  667.   const
  668.     SmoothingModeInvalid     = QualityModeInvalid;
  669.     SmoothingModeDefault     = QualityModeDefault;
  670.     SmoothingModeHighSpeed   = QualityModeLow;
  671.     SmoothingModeHighQuality = QualityModeHigh;
  672.     SmoothingModeNone        = 3;
  673.     SmoothingModeAntiAlias   = 4;
  674.  
  675. type
  676.   TSmoothingMode = SmoothingMode;
  677. {$ENDIF}
  678.  
  679. //---------------------------------------------------------------------------
  680. // Pixel Format Mode
  681. //---------------------------------------------------------------------------
  682. {$IFDEF DELPHI6_UP}
  683.   {$EXTERNALSYM PixelOffsetMode}
  684.   PixelOffsetMode = (
  685.     PixelOffsetModeInvalid     = Ord(QualityModeInvalid),
  686.     PixelOffsetModeDefault     = Ord(QualityModeDefault),
  687.     PixelOffsetModeHighSpeed   = Ord(QualityModeLow),
  688.     PixelOffsetModeHighQuality = Ord(QualityModeHigh),
  689.     PixelOffsetModeNone,    // No pixel offset
  690.     PixelOffsetModeHalf     // Offset by -0.5, -0.5 for fast anti-alias perf
  691.   );
  692.   TPixelOffsetMode = PixelOffsetMode;
  693. {$ELSE}
  694.   {$EXTERNALSYM PixelOffsetMode}
  695.   PixelOffsetMode = Integer;
  696.   const
  697.     PixelOffsetModeInvalid     = QualityModeInvalid;
  698.     PixelOffsetModeDefault     = QualityModeDefault;
  699.     PixelOffsetModeHighSpeed   = QualityModeLow;
  700.     PixelOffsetModeHighQuality = QualityModeHigh;
  701.     PixelOffsetModeNone        = 3;    // No pixel offset
  702.     PixelOffsetModeHalf        = 4;    // Offset by -0.5, -0.5 for fast anti-alias perf
  703.  
  704. type
  705.   TPixelOffsetMode = PixelOffsetMode;
  706. {$ENDIF}
  707.  
  708. //---------------------------------------------------------------------------
  709. // Text Rendering Hint
  710. //---------------------------------------------------------------------------
  711.  
  712.   {$EXTERNALSYM TextRenderingHint}
  713.   TextRenderingHint = (
  714.     TextRenderingHintSystemDefault,                // Glyph with system default rendering hint
  715.     TextRenderingHintSingleBitPerPixelGridFit,     // Glyph bitmap with hinting
  716.     TextRenderingHintSingleBitPerPixel,            // Glyph bitmap without hinting
  717.     TextRenderingHintAntiAliasGridFit,             // Glyph anti-alias bitmap with hinting
  718.     TextRenderingHintAntiAlias,                    // Glyph anti-alias bitmap without hinting
  719.     TextRenderingHintClearTypeGridFit              // Glyph CT bitmap with hinting
  720.   );
  721.   TTextRenderingHint = TextRenderingHint;
  722.  
  723. //---------------------------------------------------------------------------
  724. // Metafile Types
  725. //---------------------------------------------------------------------------
  726.  
  727.   {$EXTERNALSYM MetafileType}
  728.   MetafileType = (
  729.     MetafileTypeInvalid,            // Invalid metafile
  730.     MetafileTypeWmf,                // Standard WMF
  731.     MetafileTypeWmfPlaceable,       // Placeable WMF
  732.     MetafileTypeEmf,                // EMF (not EMF+)
  733.     MetafileTypeEmfPlusOnly,        // EMF+ without dual, down-level records
  734.     MetafileTypeEmfPlusDual         // EMF+ with dual, down-level records
  735.   );
  736.   TMetafileType = MetafileType;
  737.  
  738. //---------------------------------------------------------------------------
  739. // Specifies the type of EMF to record
  740. //---------------------------------------------------------------------------
  741. {$IFDEF DELPHI6_UP}
  742.   {$EXTERNALSYM EmfType}
  743.   EmfType = (
  744.     EmfTypeEmfOnly     = Ord(MetafileTypeEmf),          // no EMF+, only EMF
  745.     EmfTypeEmfPlusOnly = Ord(MetafileTypeEmfPlusOnly),  // no EMF, only EMF+
  746.     EmfTypeEmfPlusDual = Ord(MetafileTypeEmfPlusDual)   // both EMF+ and EMF
  747.   );
  748.   TEmfType = EmfType;
  749. {$ELSE}
  750.   {$EXTERNALSYM EmfType}
  751.   EmfType = Integer;
  752.   const
  753.     EmfTypeEmfOnly     = Ord(MetafileTypeEmf);          // no EMF+, only EMF
  754.     EmfTypeEmfPlusOnly = Ord(MetafileTypeEmfPlusOnly);  // no EMF, only EMF+
  755.     EmfTypeEmfPlusDual = Ord(MetafileTypeEmfPlusDual);   // both EMF+ and EMF
  756.  
  757. type
  758.   TEmfType = EmfType;
  759. {$ENDIF}
  760.  
  761. //---------------------------------------------------------------------------
  762. // EMF+ Persistent object types
  763. //---------------------------------------------------------------------------
  764.  
  765.   {$EXTERNALSYM ObjectType}
  766.   ObjectType = (
  767.     ObjectTypeInvalid,
  768.     ObjectTypeBrush,
  769.     ObjectTypePen,
  770.     ObjectTypePath,
  771.     ObjectTypeRegion,
  772.     ObjectTypeImage,
  773.     ObjectTypeFont,
  774.     ObjectTypeStringFormat,
  775.     ObjectTypeImageAttributes,
  776.     ObjectTypeCustomLineCap
  777.   );
  778.   TObjectType = ObjectType;
  779.  
  780. const
  781.   ObjectTypeMax = ObjectTypeCustomLineCap;
  782.   ObjectTypeMin = ObjectTypeBrush;
  783.  
  784. function ObjectTypeIsValid(type_: ObjectType): BOOL;
  785.  
  786. //---------------------------------------------------------------------------
  787. // EMF+ Records
  788. //---------------------------------------------------------------------------
  789.  
  790.   // We have to change the WMF record numbers so that they don't conflict with
  791.   // the EMF and EMF+ record numbers.
  792.  
  793. const
  794.   GDIP_EMFPLUS_RECORD_BASE      = $00004000;
  795.   {$EXTERNALSYM GDIP_EMFPLUS_RECORD_BASE}
  796.   GDIP_WMF_RECORD_BASE          = $00010000;
  797.   {$EXTERNALSYM GDIP_WMF_RECORD_BASE}
  798.  
  799. // macros
  800. function GDIP_WMF_RECORD_TO_EMFPLUS(n: integer): Integer;
  801. function GDIP_EMFPLUS_RECORD_TO_WMF(n: integer): Integer;
  802. function GDIP_IS_WMF_RECORDTYPE(n: integer): BOOL;
  803.  
  804.  
  805. {$IFDEF DELPHI6_UP}
  806. type
  807.   {$EXTERNALSYM EmfPlusRecordType}
  808.   EmfPlusRecordType = (
  809.    // Since we have to enumerate GDI records right along with GDI+ records,
  810.    // We list all the GDI records here so that they can be part of the
  811.    // same enumeration type which is used in the enumeration callback.
  812.  
  813.     WmfRecordTypeSetBkColor              = (META_SETBKCOLOR or GDIP_WMF_RECORD_BASE),
  814.     WmfRecordTypeSetBkMode               = (META_SETBKMODE or GDIP_WMF_RECORD_BASE),
  815.     WmfRecordTypeSetMapMode              = (META_SETMAPMODE or GDIP_WMF_RECORD_BASE),
  816.     WmfRecordTypeSetROP2                 = (META_SETROP2 or GDIP_WMF_RECORD_BASE),
  817.     WmfRecordTypeSetRelAbs               = (META_SETRELABS or GDIP_WMF_RECORD_BASE),
  818.     WmfRecordTypeSetPolyFillMode         = (META_SETPOLYFILLMODE or GDIP_WMF_RECORD_BASE),
  819.     WmfRecordTypeSetStretchBltMode       = (META_SETSTRETCHBLTMODE or GDIP_WMF_RECORD_BASE),
  820.     WmfRecordTypeSetTextCharExtra        = (META_SETTEXTCHAREXTRA or GDIP_WMF_RECORD_BASE),
  821.     WmfRecordTypeSetTextColor            = (META_SETTEXTCOLOR or GDIP_WMF_RECORD_BASE),
  822.     WmfRecordTypeSetTextJustification    = (META_SETTEXTJUSTIFICATION or GDIP_WMF_RECORD_BASE),
  823.     WmfRecordTypeSetWindowOrg            = (META_SETWINDOWORG or GDIP_WMF_RECORD_BASE),
  824.     WmfRecordTypeSetWindowExt            = (META_SETWINDOWEXT or GDIP_WMF_RECORD_BASE),
  825.     WmfRecordTypeSetViewportOrg          = (META_SETVIEWPORTORG or GDIP_WMF_RECORD_BASE),
  826.     WmfRecordTypeSetViewportExt          = (META_SETVIEWPORTEXT or GDIP_WMF_RECORD_BASE),
  827.     WmfRecordTypeOffsetWindowOrg         = (META_OFFSETWINDOWORG or GDIP_WMF_RECORD_BASE),
  828.     WmfRecordTypeScaleWindowExt          = (META_SCALEWINDOWEXT or GDIP_WMF_RECORD_BASE),
  829.     WmfRecordTypeOffsetViewportOrg       = (META_OFFSETVIEWPORTORG or GDIP_WMF_RECORD_BASE),
  830.     WmfRecordTypeScaleViewportExt        = (META_SCALEVIEWPORTEXT or GDIP_WMF_RECORD_BASE),
  831.     WmfRecordTypeLineTo                  = (META_LINETO or GDIP_WMF_RECORD_BASE),
  832.     WmfRecordTypeMoveTo                  = (META_MOVETO or GDIP_WMF_RECORD_BASE),
  833.     WmfRecordTypeExcludeClipRect         = (META_EXCLUDECLIPRECT or GDIP_WMF_RECORD_BASE),
  834.     WmfRecordTypeIntersectClipRect       = (META_INTERSECTCLIPRECT or GDIP_WMF_RECORD_BASE),
  835.     WmfRecordTypeArc                     = (META_ARC or GDIP_WMF_RECORD_BASE),
  836.     WmfRecordTypeEllipse                 = (META_ELLIPSE or GDIP_WMF_RECORD_BASE),
  837.     WmfRecordTypeFloodFill               = (META_FLOODFILL or GDIP_WMF_RECORD_BASE),
  838.     WmfRecordTypePie                     = (META_PIE or GDIP_WMF_RECORD_BASE),
  839.     WmfRecordTypeRectangle               = (META_RECTANGLE or GDIP_WMF_RECORD_BASE),
  840.     WmfRecordTypeRoundRect               = (META_ROUNDRECT or GDIP_WMF_RECORD_BASE),
  841.     WmfRecordTypePatBlt                  = (META_PATBLT or GDIP_WMF_RECORD_BASE),
  842.     WmfRecordTypeSaveDC                  = (META_SAVEDC or GDIP_WMF_RECORD_BASE),
  843.     WmfRecordTypeSetPixel                = (META_SETPIXEL or GDIP_WMF_RECORD_BASE),
  844.     WmfRecordTypeOffsetClipRgn           = (META_OFFSETCLIPRGN or GDIP_WMF_RECORD_BASE),
  845.     WmfRecordTypeTextOut                 = (META_TEXTOUT or GDIP_WMF_RECORD_BASE),
  846.     WmfRecordTypeBitBlt                  = (META_BITBLT or GDIP_WMF_RECORD_BASE),
  847.     WmfRecordTypeStretchBlt              = (META_STRETCHBLT or GDIP_WMF_RECORD_BASE),
  848.     WmfRecordTypePolygon                 = (META_POLYGON or GDIP_WMF_RECORD_BASE),
  849.     WmfRecordTypePolyline                = (META_POLYLINE or GDIP_WMF_RECORD_BASE),
  850.     WmfRecordTypeEscape                  = (META_ESCAPE or GDIP_WMF_RECORD_BASE),
  851.     WmfRecordTypeRestoreDC               = (META_RESTOREDC or GDIP_WMF_RECORD_BASE),
  852.     WmfRecordTypeFillRegion              = (META_FILLREGION or GDIP_WMF_RECORD_BASE),
  853.     WmfRecordTypeFrameRegion             = (META_FRAMEREGION or GDIP_WMF_RECORD_BASE),
  854.     WmfRecordTypeInvertRegion            = (META_INVERTREGION or GDIP_WMF_RECORD_BASE),
  855.     WmfRecordTypePaintRegion             = (META_PAINTREGION or GDIP_WMF_RECORD_BASE),
  856.     WmfRecordTypeSelectClipRegion        = (META_SELECTCLIPREGION or GDIP_WMF_RECORD_BASE),
  857.     WmfRecordTypeSelectObject            = (META_SELECTOBJECT or GDIP_WMF_RECORD_BASE),
  858.     WmfRecordTypeSetTextAlign            = (META_SETTEXTALIGN or GDIP_WMF_RECORD_BASE),
  859.     WmfRecordTypeDrawText                = ($062F or GDIP_WMF_RECORD_BASE),  // META_DRAWTEXT
  860.     WmfRecordTypeChord                   = (META_CHORD or GDIP_WMF_RECORD_BASE),
  861.     WmfRecordTypeSetMapperFlags          = (META_SETMAPPERFLAGS or GDIP_WMF_RECORD_BASE),
  862.     WmfRecordTypeExtTextOut              = (META_EXTTEXTOUT or GDIP_WMF_RECORD_BASE),
  863.     WmfRecordTypeSetDIBToDev             = (META_SETDIBTODEV or GDIP_WMF_RECORD_BASE),
  864.     WmfRecordTypeSelectPalette           = (META_SELECTPALETTE or GDIP_WMF_RECORD_BASE),
  865.     WmfRecordTypeRealizePalette          = (META_REALIZEPALETTE or GDIP_WMF_RECORD_BASE),
  866.     WmfRecordTypeAnimatePalette          = (META_ANIMATEPALETTE or GDIP_WMF_RECORD_BASE),
  867.     WmfRecordTypeSetPalEntries           = (META_SETPALENTRIES or GDIP_WMF_RECORD_BASE),
  868.     WmfRecordTypePolyPolygon             = (META_POLYPOLYGON or GDIP_WMF_RECORD_BASE),
  869.     WmfRecordTypeResizePalette           = (META_RESIZEPALETTE or GDIP_WMF_RECORD_BASE),
  870.     WmfRecordTypeDIBBitBlt               = (META_DIBBITBLT or GDIP_WMF_RECORD_BASE),
  871.     WmfRecordTypeDIBStretchBlt           = (META_DIBSTRETCHBLT or GDIP_WMF_RECORD_BASE),
  872.     WmfRecordTypeDIBCreatePatternBrush   = (META_DIBCREATEPATTERNBRUSH or GDIP_WMF_RECORD_BASE),
  873.     WmfRecordTypeStretchDIB              = (META_STRETCHDIB or GDIP_WMF_RECORD_BASE),
  874.     WmfRecordTypeExtFloodFill            = (META_EXTFLOODFILL or GDIP_WMF_RECORD_BASE),
  875.     WmfRecordTypeSetLayout               = ($0149 or GDIP_WMF_RECORD_BASE),  // META_SETLAYOUT
  876.     WmfRecordTypeResetDC                 = ($014C or GDIP_WMF_RECORD_BASE),  // META_RESETDC
  877.     WmfRecordTypeStartDoc                = ($014D or GDIP_WMF_RECORD_BASE),  // META_STARTDOC
  878.     WmfRecordTypeStartPage               = ($004F or GDIP_WMF_RECORD_BASE),  // META_STARTPAGE
  879.     WmfRecordTypeEndPage                 = ($0050 or GDIP_WMF_RECORD_BASE),  // META_ENDPAGE
  880.     WmfRecordTypeAbortDoc                = ($0052 or GDIP_WMF_RECORD_BASE),  // META_ABORTDOC
  881.     WmfRecordTypeEndDoc                  = ($005E or GDIP_WMF_RECORD_BASE),  // META_ENDDOC
  882.     WmfRecordTypeDeleteObject            = (META_DELETEOBJECT or GDIP_WMF_RECORD_BASE),
  883.     WmfRecordTypeCreatePalette           = (META_CREATEPALETTE or GDIP_WMF_RECORD_BASE),
  884.     WmfRecordTypeCreateBrush             = ($00F8 or GDIP_WMF_RECORD_BASE),  // META_CREATEBRUSH
  885.     WmfRecordTypeCreatePatternBrush      = (META_CREATEPATTERNBRUSH or GDIP_WMF_RECORD_BASE),
  886.     WmfRecordTypeCreatePenIndirect       = (META_CREATEPENINDIRECT or GDIP_WMF_RECORD_BASE),
  887.     WmfRecordTypeCreateFontIndirect      = (META_CREATEFONTINDIRECT or GDIP_WMF_RECORD_BASE),
  888.     WmfRecordTypeCreateBrushIndirect     = (META_CREATEBRUSHINDIRECT or GDIP_WMF_RECORD_BASE),
  889.     WmfRecordTypeCreateBitmapIndirect    = ($02FD or GDIP_WMF_RECORD_BASE),  // META_CREATEBITMAPINDIRECT
  890.     WmfRecordTypeCreateBitmap            = ($06FE or GDIP_WMF_RECORD_BASE),  // META_CREATEBITMAP
  891.     WmfRecordTypeCreateRegion            = (META_CREATEREGION or GDIP_WMF_RECORD_BASE),
  892.  
  893.     EmfRecordTypeHeader                  = EMR_HEADER,
  894.     EmfRecordTypePolyBezier              = EMR_POLYBEZIER,
  895.     EmfRecordTypePolygon                 = EMR_POLYGON,
  896.     EmfRecordTypePolyline                = EMR_POLYLINE,
  897.     EmfRecordTypePolyBezierTo            = EMR_POLYBEZIERTO,
  898.     EmfRecordTypePolyLineTo              = EMR_POLYLINETO,
  899.     EmfRecordTypePolyPolyline            = EMR_POLYPOLYLINE,
  900.     EmfRecordTypePolyPolygon             = EMR_POLYPOLYGON,
  901.     EmfRecordTypeSetWindowExtEx          = EMR_SETWINDOWEXTEX,
  902.     EmfRecordTypeSetWindowOrgEx          = EMR_SETWINDOWORGEX,
  903.     EmfRecordTypeSetViewportExtEx        = EMR_SETVIEWPORTEXTEX,
  904.     EmfRecordTypeSetViewportOrgEx        = EMR_SETVIEWPORTORGEX,
  905.     EmfRecordTypeSetBrushOrgEx           = EMR_SETBRUSHORGEX,
  906.     EmfRecordTypeEOF                     = EMR_EOF,
  907.     EmfRecordTypeSetPixelV               = EMR_SETPIXELV,
  908.     EmfRecordTypeSetMapperFlags          = EMR_SETMAPPERFLAGS,
  909.     EmfRecordTypeSetMapMode              = EMR_SETMAPMODE,
  910.     EmfRecordTypeSetBkMode               = EMR_SETBKMODE,
  911.     EmfRecordTypeSetPolyFillMode         = EMR_SETPOLYFILLMODE,
  912.     EmfRecordTypeSetROP2                 = EMR_SETROP2,
  913.     EmfRecordTypeSetStretchBltMode       = EMR_SETSTRETCHBLTMODE,
  914.     EmfRecordTypeSetTextAlign            = EMR_SETTEXTALIGN,
  915.     EmfRecordTypeSetColorAdjustment      = EMR_SETCOLORADJUSTMENT,
  916.     EmfRecordTypeSetTextColor            = EMR_SETTEXTCOLOR,
  917.     EmfRecordTypeSetBkColor              = EMR_SETBKCOLOR,
  918.     EmfRecordTypeOffsetClipRgn           = EMR_OFFSETCLIPRGN,
  919.     EmfRecordTypeMoveToEx                = EMR_MOVETOEX,
  920.     EmfRecordTypeSetMetaRgn              = EMR_SETMETARGN,
  921.     EmfRecordTypeExcludeClipRect         = EMR_EXCLUDECLIPRECT,
  922.     EmfRecordTypeIntersectClipRect       = EMR_INTERSECTCLIPRECT,
  923.     EmfRecordTypeScaleViewportExtEx      = EMR_SCALEVIEWPORTEXTEX,
  924.     EmfRecordTypeScaleWindowExtEx        = EMR_SCALEWINDOWEXTEX,
  925.     EmfRecordTypeSaveDC                  = EMR_SAVEDC,
  926.     EmfRecordTypeRestoreDC               = EMR_RESTOREDC,
  927.     EmfRecordTypeSetWorldTransform       = EMR_SETWORLDTRANSFORM,
  928.     EmfRecordTypeModifyWorldTransform    = EMR_MODIFYWORLDTRANSFORM,
  929.     EmfRecordTypeSelectObject            = EMR_SELECTOBJECT,
  930.     EmfRecordTypeCreatePen               = EMR_CREATEPEN,
  931.     EmfRecordTypeCreateBrushIndirect     = EMR_CREATEBRUSHINDIRECT,
  932.     EmfRecordTypeDeleteObject            = EMR_DELETEOBJECT,
  933.     EmfRecordTypeAngleArc                = EMR_ANGLEARC,
  934.     EmfRecordTypeEllipse                 = EMR_ELLIPSE,
  935.     EmfRecordTypeRectangle               = EMR_RECTANGLE,
  936.     EmfRecordTypeRoundRect               = EMR_ROUNDRECT,
  937.     EmfRecordTypeArc                     = EMR_ARC,
  938.     EmfRecordTypeChord                   = EMR_CHORD,
  939.     EmfRecordTypePie                     = EMR_PIE,
  940.     EmfRecordTypeSelectPalette           = EMR_SELECTPALETTE,
  941.     EmfRecordTypeCreatePalette           = EMR_CREATEPALETTE,
  942.     EmfRecordTypeSetPaletteEntries       = EMR_SETPALETTEENTRIES,
  943.     EmfRecordTypeResizePalette           = EMR_RESIZEPALETTE,
  944.     EmfRecordTypeRealizePalette          = EMR_REALIZEPALETTE,
  945.     EmfRecordTypeExtFloodFill            = EMR_EXTFLOODFILL,
  946.     EmfRecordTypeLineTo                  = EMR_LINETO,
  947.     EmfRecordTypeArcTo                   = EMR_ARCTO,
  948.     EmfRecordTypePolyDraw                = EMR_POLYDRAW,
  949.     EmfRecordTypeSetArcDirection         = EMR_SETARCDIRECTION,
  950.     EmfRecordTypeSetMiterLimit           = EMR_SETMITERLIMIT,
  951.     EmfRecordTypeBeginPath               = EMR_BEGINPATH,
  952.     EmfRecordTypeEndPath                 = EMR_ENDPATH,
  953.     EmfRecordTypeCloseFigure             = EMR_CLOSEFIGURE,
  954.     EmfRecordTypeFillPath                = EMR_FILLPATH,
  955.     EmfRecordTypeStrokeAndFillPath       = EMR_STROKEANDFILLPATH,
  956.     EmfRecordTypeStrokePath              = EMR_STROKEPATH,
  957.     EmfRecordTypeFlattenPath             = EMR_FLATTENPATH,
  958.     EmfRecordTypeWidenPath               = EMR_WIDENPATH,
  959.     EmfRecordTypeSelectClipPath          = EMR_SELECTCLIPPATH,
  960.     EmfRecordTypeAbortPath               = EMR_ABORTPATH,
  961.     EmfRecordTypeReserved_069            = 69,  // Not Used
  962.     EmfRecordTypeGdiComment              = EMR_GDICOMMENT,
  963.     EmfRecordTypeFillRgn                 = EMR_FILLRGN,
  964.     EmfRecordTypeFrameRgn                = EMR_FRAMERGN,
  965.     EmfRecordTypeInvertRgn               = EMR_INVERTRGN,
  966.     EmfRecordTypePaintRgn                = EMR_PAINTRGN,
  967.     EmfRecordTypeExtSelectClipRgn        = EMR_EXTSELECTCLIPRGN,
  968.     EmfRecordTypeBitBlt                  = EMR_BITBLT,
  969.     EmfRecordTypeStretchBlt              = EMR_STRETCHBLT,
  970.     EmfRecordTypeMaskBlt                 = EMR_MASKBLT,
  971.     EmfRecordTypePlgBlt                  = EMR_PLGBLT,
  972.     EmfRecordTypeSetDIBitsToDevice       = EMR_SETDIBITSTODEVICE,
  973.     EmfRecordTypeStretchDIBits           = EMR_STRETCHDIBITS,
  974.     EmfRecordTypeExtCreateFontIndirect   = EMR_EXTCREATEFONTINDIRECTW,
  975.     EmfRecordTypeExtTextOutA             = EMR_EXTTEXTOUTA,
  976.     EmfRecordTypeExtTextOutW             = EMR_EXTTEXTOUTW,
  977.     EmfRecordTypePolyBezier16            = EMR_POLYBEZIER16,
  978.     EmfRecordTypePolygon16               = EMR_POLYGON16,
  979.     EmfRecordTypePolyline16              = EMR_POLYLINE16,
  980.     EmfRecordTypePolyBezierTo16          = EMR_POLYBEZIERTO16,
  981.     EmfRecordTypePolylineTo16            = EMR_POLYLINETO16,
  982.     EmfRecordTypePolyPolyline16          = EMR_POLYPOLYLINE16,
  983.     EmfRecordTypePolyPolygon16           = EMR_POLYPOLYGON16,
  984.     EmfRecordTypePolyDraw16              = EMR_POLYDRAW16,
  985.     EmfRecordTypeCreateMonoBrush         = EMR_CREATEMONOBRUSH,
  986.     EmfRecordTypeCreateDIBPatternBrushPt = EMR_CREATEDIBPATTERNBRUSHPT,
  987.     EmfRecordTypeExtCreatePen            = EMR_EXTCREATEPEN,
  988.     EmfRecordTypePolyTextOutA            = EMR_POLYTEXTOUTA,
  989.     EmfRecordTypePolyTextOutW            = EMR_POLYTEXTOUTW,
  990.     EmfRecordTypeSetICMMode              = 98,  // EMR_SETICMMODE,
  991.     EmfRecordTypeCreateColorSpace        = 99,  // EMR_CREATECOLORSPACE,
  992.     EmfRecordTypeSetColorSpace           = 100, // EMR_SETCOLORSPACE,
  993.     EmfRecordTypeDeleteColorSpace        = 101, // EMR_DELETECOLORSPACE,
  994.     EmfRecordTypeGLSRecord               = 102, // EMR_GLSRECORD,
  995.     EmfRecordTypeGLSBoundedRecord        = 103, // EMR_GLSBOUNDEDRECORD,
  996.     EmfRecordTypePixelFormat             = 104, // EMR_PIXELFORMAT,
  997.     EmfRecordTypeDrawEscape              = 105, // EMR_RESERVED_105,
  998.     EmfRecordTypeExtEscape               = 106, // EMR_RESERVED_106,
  999.     EmfRecordTypeStartDoc                = 107, // EMR_RESERVED_107,
  1000.     EmfRecordTypeSmallTextOut            = 108, // EMR_RESERVED_108,
  1001.     EmfRecordTypeForceUFIMapping         = 109, // EMR_RESERVED_109,
  1002.     EmfRecordTypeNamedEscape             = 110, // EMR_RESERVED_110,
  1003.     EmfRecordTypeColorCorrectPalette     = 111, // EMR_COLORCORRECTPALETTE,
  1004.     EmfRecordTypeSetICMProfileA          = 112, // EMR_SETICMPROFILEA,
  1005.     EmfRecordTypeSetICMProfileW          = 113, // EMR_SETICMPROFILEW,
  1006.     EmfRecordTypeAlphaBlend              = 114, // EMR_ALPHABLEND,
  1007.     EmfRecordTypeSetLayout               = 115, // EMR_SETLAYOUT,
  1008.     EmfRecordTypeTransparentBlt          = 116, // EMR_TRANSPARENTBLT,
  1009.     EmfRecordTypeReserved_117            = 117, // Not Used
  1010.     EmfRecordTypeGradientFill            = 118, // EMR_GRADIENTFILL,
  1011.     EmfRecordTypeSetLinkedUFIs           = 119, // EMR_RESERVED_119,
  1012.     EmfRecordTypeSetTextJustification    = 120, // EMR_RESERVED_120,
  1013.     EmfRecordTypeColorMatchToTargetW     = 121, // EMR_COLORMATCHTOTARGETW,
  1014.     EmfRecordTypeCreateColorSpaceW       = 122, // EMR_CREATECOLORSPACEW,
  1015.     EmfRecordTypeMax                     = 122,
  1016.     EmfRecordTypeMin                     = 1,
  1017.  
  1018.     // That is the END of the GDI EMF records.
  1019.  
  1020.     // Now we start the list of EMF+ records.  We leave quite
  1021.     // a bit of room here for the addition of any new GDI
  1022.     // records that may be added later.
  1023.  
  1024.     EmfPlusRecordTypeInvalid = GDIP_EMFPLUS_RECORD_BASE,
  1025.     EmfPlusRecordTypeHeader,
  1026.     EmfPlusRecordTypeEndOfFile,
  1027.  
  1028.     EmfPlusRecordTypeComment,
  1029.  
  1030.     EmfPlusRecordTypeGetDC,
  1031.  
  1032.     EmfPlusRecordTypeMultiFormatStart,
  1033.     EmfPlusRecordTypeMultiFormatSection,
  1034.     EmfPlusRecordTypeMultiFormatEnd,
  1035.  
  1036.     // For all persistent objects
  1037.  
  1038.     EmfPlusRecordTypeObject,
  1039.  
  1040.     // Drawing Records
  1041.  
  1042.     EmfPlusRecordTypeClear,
  1043.     EmfPlusRecordTypeFillRects,
  1044.     EmfPlusRecordTypeDrawRects,
  1045.     EmfPlusRecordTypeFillPolygon,
  1046.     EmfPlusRecordTypeDrawLines,
  1047.     EmfPlusRecordTypeFillEllipse,
  1048.     EmfPlusRecordTypeDrawEllipse,
  1049.     EmfPlusRecordTypeFillPie,
  1050.     EmfPlusRecordTypeDrawPie,
  1051.     EmfPlusRecordTypeDrawArc,
  1052.     EmfPlusRecordTypeFillRegion,
  1053.     EmfPlusRecordTypeFillPath,
  1054.     EmfPlusRecordTypeDrawPath,
  1055.     EmfPlusRecordTypeFillClosedCurve,
  1056.     EmfPlusRecordTypeDrawClosedCurve,
  1057.     EmfPlusRecordTypeDrawCurve,
  1058.     EmfPlusRecordTypeDrawBeziers,
  1059.     EmfPlusRecordTypeDrawImage,
  1060.     EmfPlusRecordTypeDrawImagePoints,
  1061.     EmfPlusRecordTypeDrawString,
  1062.  
  1063.     // Graphics State Records
  1064.  
  1065.     EmfPlusRecordTypeSetRenderingOrigin,
  1066.     EmfPlusRecordTypeSetAntiAliasMode,
  1067.     EmfPlusRecordTypeSetTextRenderingHint,
  1068.     EmfPlusRecordTypeSetTextContrast,
  1069.     EmfPlusRecordTypeSetInterpolationMode,
  1070.     EmfPlusRecordTypeSetPixelOffsetMode,
  1071.     EmfPlusRecordTypeSetCompositingMode,
  1072.     EmfPlusRecordTypeSetCompositingQuality,
  1073.     EmfPlusRecordTypeSave,
  1074.     EmfPlusRecordTypeRestore,
  1075.     EmfPlusRecordTypeBeginContainer,
  1076.     EmfPlusRecordTypeBeginContainerNoParams,
  1077.     EmfPlusRecordTypeEndContainer,
  1078.     EmfPlusRecordTypeSetWorldTransform,
  1079.     EmfPlusRecordTypeResetWorldTransform,
  1080.     EmfPlusRecordTypeMultiplyWorldTransform,
  1081.     EmfPlusRecordTypeTranslateWorldTransform,
  1082.     EmfPlusRecordTypeScaleWorldTransform,
  1083.     EmfPlusRecordTypeRotateWorldTransform,
  1084.     EmfPlusRecordTypeSetPageTransform,
  1085.     EmfPlusRecordTypeResetClip,
  1086.     EmfPlusRecordTypeSetClipRect,
  1087.     EmfPlusRecordTypeSetClipPath,
  1088.     EmfPlusRecordTypeSetClipRegion,
  1089.     EmfPlusRecordTypeOffsetClip,
  1090.  
  1091.     EmfPlusRecordTypeDrawDriverString,
  1092.  
  1093.     EmfPlusRecordTotal,
  1094.  
  1095.     EmfPlusRecordTypeMax = EmfPlusRecordTotal-1,
  1096.     EmfPlusRecordTypeMin = EmfPlusRecordTypeHeader
  1097.   );
  1098.   TEmfPlusRecordType = EmfPlusRecordType;
  1099. {$ELSE}
  1100. type
  1101.   {$EXTERNALSYM EmfPlusRecordType}
  1102.   EmfPlusRecordType = Integer;
  1103.   // Since we have to enumerate GDI records right along with GDI+ records,
  1104.   // We list all the GDI records here so that they can be part of the
  1105.   // same enumeration type which is used in the enumeration callback.
  1106.   const
  1107.     WmfRecordTypeSetBkColor              = (META_SETBKCOLOR or GDIP_WMF_RECORD_BASE);
  1108.     WmfRecordTypeSetBkMode               = (META_SETBKMODE or GDIP_WMF_RECORD_BASE);
  1109.     WmfRecordTypeSetMapMode              = (META_SETMAPMODE or GDIP_WMF_RECORD_BASE);
  1110.     WmfRecordTypeSetROP2                 = (META_SETROP2 or GDIP_WMF_RECORD_BASE);
  1111.     WmfRecordTypeSetRelAbs               = (META_SETRELABS or GDIP_WMF_RECORD_BASE);
  1112.     WmfRecordTypeSetPolyFillMode         = (META_SETPOLYFILLMODE or GDIP_WMF_RECORD_BASE);
  1113.     WmfRecordTypeSetStretchBltMode       = (META_SETSTRETCHBLTMODE or GDIP_WMF_RECORD_BASE);
  1114.     WmfRecordTypeSetTextCharExtra        = (META_SETTEXTCHAREXTRA or GDIP_WMF_RECORD_BASE);
  1115.     WmfRecordTypeSetTextColor            = (META_SETTEXTCOLOR or GDIP_WMF_RECORD_BASE);
  1116.     WmfRecordTypeSetTextJustification    = (META_SETTEXTJUSTIFICATION or GDIP_WMF_RECORD_BASE);
  1117.     WmfRecordTypeSetWindowOrg            = (META_SETWINDOWORG or GDIP_WMF_RECORD_BASE);
  1118.     WmfRecordTypeSetWindowExt            = (META_SETWINDOWEXT or GDIP_WMF_RECORD_BASE);
  1119.     WmfRecordTypeSetViewportOrg          = (META_SETVIEWPORTORG or GDIP_WMF_RECORD_BASE);
  1120.     WmfRecordTypeSetViewportExt          = (META_SETVIEWPORTEXT or GDIP_WMF_RECORD_BASE);
  1121.     WmfRecordTypeOffsetWindowOrg         = (META_OFFSETWINDOWORG or GDIP_WMF_RECORD_BASE);
  1122.     WmfRecordTypeScaleWindowExt          = (META_SCALEWINDOWEXT or GDIP_WMF_RECORD_BASE);
  1123.     WmfRecordTypeOffsetViewportOrg       = (META_OFFSETVIEWPORTORG or GDIP_WMF_RECORD_BASE);
  1124.     WmfRecordTypeScaleViewportExt        = (META_SCALEVIEWPORTEXT or GDIP_WMF_RECORD_BASE);
  1125.     WmfRecordTypeLineTo                  = (META_LINETO or GDIP_WMF_RECORD_BASE);
  1126.     WmfRecordTypeMoveTo                  = (META_MOVETO or GDIP_WMF_RECORD_BASE);
  1127.     WmfRecordTypeExcludeClipRect         = (META_EXCLUDECLIPRECT or GDIP_WMF_RECORD_BASE);
  1128.     WmfRecordTypeIntersectClipRect       = (META_INTERSECTCLIPRECT or GDIP_WMF_RECORD_BASE);
  1129.     WmfRecordTypeArc                     = (META_ARC or GDIP_WMF_RECORD_BASE);
  1130.     WmfRecordTypeEllipse                 = (META_ELLIPSE or GDIP_WMF_RECORD_BASE);
  1131.     WmfRecordTypeFloodFill               = (META_FLOODFILL or GDIP_WMF_RECORD_BASE);
  1132.     WmfRecordTypePie                     = (META_PIE or GDIP_WMF_RECORD_BASE);
  1133.     WmfRecordTypeRectangle               = (META_RECTANGLE or GDIP_WMF_RECORD_BASE);
  1134.     WmfRecordTypeRoundRect               = (META_ROUNDRECT or GDIP_WMF_RECORD_BASE);
  1135.     WmfRecordTypePatBlt                  = (META_PATBLT or GDIP_WMF_RECORD_BASE);
  1136.     WmfRecordTypeSaveDC                  = (META_SAVEDC or GDIP_WMF_RECORD_BASE);
  1137.     WmfRecordTypeSetPixel                = (META_SETPIXEL or GDIP_WMF_RECORD_BASE);
  1138.     WmfRecordTypeOffsetClipRgn           = (META_OFFSETCLIPRGN or GDIP_WMF_RECORD_BASE);
  1139.     WmfRecordTypeTextOut                 = (META_TEXTOUT or GDIP_WMF_RECORD_BASE);
  1140.     WmfRecordTypeBitBlt                  = (META_BITBLT or GDIP_WMF_RECORD_BASE);
  1141.     WmfRecordTypeStretchBlt              = (META_STRETCHBLT or GDIP_WMF_RECORD_BASE);
  1142.     WmfRecordTypePolygon                 = (META_POLYGON or GDIP_WMF_RECORD_BASE);
  1143.     WmfRecordTypePolyline                = (META_POLYLINE or GDIP_WMF_RECORD_BASE);
  1144.     WmfRecordTypeEscape                  = (META_ESCAPE or GDIP_WMF_RECORD_BASE);
  1145.     WmfRecordTypeRestoreDC               = (META_RESTOREDC or GDIP_WMF_RECORD_BASE);
  1146.     WmfRecordTypeFillRegion              = (META_FILLREGION or GDIP_WMF_RECORD_BASE);
  1147.     WmfRecordTypeFrameRegion             = (META_FRAMEREGION or GDIP_WMF_RECORD_BASE);
  1148.     WmfRecordTypeInvertRegion            = (META_INVERTREGION or GDIP_WMF_RECORD_BASE);
  1149.     WmfRecordTypePaintRegion             = (META_PAINTREGION or GDIP_WMF_RECORD_BASE);
  1150.     WmfRecordTypeSelectClipRegion        = (META_SELECTCLIPREGION or GDIP_WMF_RECORD_BASE);
  1151.     WmfRecordTypeSelectObject            = (META_SELECTOBJECT or GDIP_WMF_RECORD_BASE);
  1152.     WmfRecordTypeSetTextAlign            = (META_SETTEXTALIGN or GDIP_WMF_RECORD_BASE);
  1153.     WmfRecordTypeDrawText                = ($062F or GDIP_WMF_RECORD_BASE);  // META_DRAWTEXT
  1154.     WmfRecordTypeChord                   = (META_CHORD or GDIP_WMF_RECORD_BASE);
  1155.     WmfRecordTypeSetMapperFlags          = (META_SETMAPPERFLAGS or GDIP_WMF_RECORD_BASE);
  1156.     WmfRecordTypeExtTextOut              = (META_EXTTEXTOUT or GDIP_WMF_RECORD_BASE);
  1157.     WmfRecordTypeSetDIBToDev             = (META_SETDIBTODEV or GDIP_WMF_RECORD_BASE);
  1158.     WmfRecordTypeSelectPalette           = (META_SELECTPALETTE or GDIP_WMF_RECORD_BASE);
  1159.     WmfRecordTypeRealizePalette          = (META_REALIZEPALETTE or GDIP_WMF_RECORD_BASE);
  1160.     WmfRecordTypeAnimatePalette          = (META_ANIMATEPALETTE or GDIP_WMF_RECORD_BASE);
  1161.     WmfRecordTypeSetPalEntries           = (META_SETPALENTRIES or GDIP_WMF_RECORD_BASE);
  1162.     WmfRecordTypePolyPolygon             = (META_POLYPOLYGON or GDIP_WMF_RECORD_BASE);
  1163.     WmfRecordTypeResizePalette           = (META_RESIZEPALETTE or GDIP_WMF_RECORD_BASE);
  1164.     WmfRecordTypeDIBBitBlt               = (META_DIBBITBLT or GDIP_WMF_RECORD_BASE);
  1165.     WmfRecordTypeDIBStretchBlt           = (META_DIBSTRETCHBLT or GDIP_WMF_RECORD_BASE);
  1166.     WmfRecordTypeDIBCreatePatternBrush   = (META_DIBCREATEPATTERNBRUSH or GDIP_WMF_RECORD_BASE);
  1167.     WmfRecordTypeStretchDIB              = (META_STRETCHDIB or GDIP_WMF_RECORD_BASE);
  1168.     WmfRecordTypeExtFloodFill            = (META_EXTFLOODFILL or GDIP_WMF_RECORD_BASE);
  1169.     WmfRecordTypeSetLayout               = ($0149 or GDIP_WMF_RECORD_BASE);  // META_SETLAYOUT
  1170.     WmfRecordTypeResetDC                 = ($014C or GDIP_WMF_RECORD_BASE);  // META_RESETDC
  1171.     WmfRecordTypeStartDoc                = ($014D or GDIP_WMF_RECORD_BASE);  // META_STARTDOC
  1172.     WmfRecordTypeStartPage               = ($004F or GDIP_WMF_RECORD_BASE);  // META_STARTPAGE
  1173.     WmfRecordTypeEndPage                 = ($0050 or GDIP_WMF_RECORD_BASE);  // META_ENDPAGE
  1174.     WmfRecordTypeAbortDoc                = ($0052 or GDIP_WMF_RECORD_BASE);  // META_ABORTDOC
  1175.     WmfRecordTypeEndDoc                  = ($005E or GDIP_WMF_RECORD_BASE);  // META_ENDDOC
  1176.     WmfRecordTypeDeleteObject            = (META_DELETEOBJECT or GDIP_WMF_RECORD_BASE);
  1177.     WmfRecordTypeCreatePalette           = (META_CREATEPALETTE or GDIP_WMF_RECORD_BASE);
  1178.     WmfRecordTypeCreateBrush             = ($00F8 or GDIP_WMF_RECORD_BASE);  // META_CREATEBRUSH
  1179.     WmfRecordTypeCreatePatternBrush      = (META_CREATEPATTERNBRUSH or GDIP_WMF_RECORD_BASE);
  1180.     WmfRecordTypeCreatePenIndirect       = (META_CREATEPENINDIRECT or GDIP_WMF_RECORD_BASE);
  1181.     WmfRecordTypeCreateFontIndirect      = (META_CREATEFONTINDIRECT or GDIP_WMF_RECORD_BASE);
  1182.     WmfRecordTypeCreateBrushIndirect     = (META_CREATEBRUSHINDIRECT or GDIP_WMF_RECORD_BASE);
  1183.     WmfRecordTypeCreateBitmapIndirect    = ($02FD or GDIP_WMF_RECORD_BASE);  // META_CREATEBITMAPINDIRECT
  1184.     WmfRecordTypeCreateBitmap            = ($06FE or GDIP_WMF_RECORD_BASE);  // META_CREATEBITMAP
  1185.     WmfRecordTypeCreateRegion            = (META_CREATEREGION or GDIP_WMF_RECORD_BASE);
  1186.  
  1187.     EmfRecordTypeHeader                  = EMR_HEADER;
  1188.     EmfRecordTypePolyBezier              = EMR_POLYBEZIER;
  1189.     EmfRecordTypePolygon                 = EMR_POLYGON;
  1190.     EmfRecordTypePolyline                = EMR_POLYLINE;
  1191.     EmfRecordTypePolyBezierTo            = EMR_POLYBEZIERTO;
  1192.     EmfRecordTypePolyLineTo              = EMR_POLYLINETO;
  1193.     EmfRecordTypePolyPolyline            = EMR_POLYPOLYLINE;
  1194.     EmfRecordTypePolyPolygon             = EMR_POLYPOLYGON;
  1195.     EmfRecordTypeSetWindowExtEx          = EMR_SETWINDOWEXTEX;
  1196.     EmfRecordTypeSetWindowOrgEx          = EMR_SETWINDOWORGEX;
  1197.     EmfRecordTypeSetViewportExtEx        = EMR_SETVIEWPORTEXTEX;
  1198.     EmfRecordTypeSetViewportOrgEx        = EMR_SETVIEWPORTORGEX;
  1199.     EmfRecordTypeSetBrushOrgEx           = EMR_SETBRUSHORGEX;
  1200.     EmfRecordTypeEOF                     = EMR_EOF;
  1201.     EmfRecordTypeSetPixelV               = EMR_SETPIXELV;
  1202.     EmfRecordTypeSetMapperFlags          = EMR_SETMAPPERFLAGS;
  1203.     EmfRecordTypeSetMapMode              = EMR_SETMAPMODE;
  1204.     EmfRecordTypeSetBkMode               = EMR_SETBKMODE;
  1205.     EmfRecordTypeSetPolyFillMode         = EMR_SETPOLYFILLMODE;
  1206.     EmfRecordTypeSetROP2                 = EMR_SETROP2;
  1207.     EmfRecordTypeSetStretchBltMode       = EMR_SETSTRETCHBLTMODE;
  1208.     EmfRecordTypeSetTextAlign            = EMR_SETTEXTALIGN;
  1209.     EmfRecordTypeSetColorAdjustment      = EMR_SETCOLORADJUSTMENT;
  1210.     EmfRecordTypeSetTextColor            = EMR_SETTEXTCOLOR;
  1211.     EmfRecordTypeSetBkColor              = EMR_SETBKCOLOR;
  1212.     EmfRecordTypeOffsetClipRgn           = EMR_OFFSETCLIPRGN;
  1213.     EmfRecordTypeMoveToEx                = EMR_MOVETOEX;
  1214.     EmfRecordTypeSetMetaRgn              = EMR_SETMETARGN;
  1215.     EmfRecordTypeExcludeClipRect         = EMR_EXCLUDECLIPRECT;
  1216.     EmfRecordTypeIntersectClipRect       = EMR_INTERSECTCLIPRECT;
  1217.     EmfRecordTypeScaleViewportExtEx      = EMR_SCALEVIEWPORTEXTEX;
  1218.     EmfRecordTypeScaleWindowExtEx        = EMR_SCALEWINDOWEXTEX;
  1219.     EmfRecordTypeSaveDC                  = EMR_SAVEDC;
  1220.     EmfRecordTypeRestoreDC               = EMR_RESTOREDC;
  1221.     EmfRecordTypeSetWorldTransform       = EMR_SETWORLDTRANSFORM;
  1222.     EmfRecordTypeModifyWorldTransform    = EMR_MODIFYWORLDTRANSFORM;
  1223.     EmfRecordTypeSelectObject            = EMR_SELECTOBJECT;
  1224.     EmfRecordTypeCreatePen               = EMR_CREATEPEN;
  1225.     EmfRecordTypeCreateBrushIndirect     = EMR_CREATEBRUSHINDIRECT;
  1226.     EmfRecordTypeDeleteObject            = EMR_DELETEOBJECT;
  1227.     EmfRecordTypeAngleArc                = EMR_ANGLEARC;
  1228.     EmfRecordTypeEllipse                 = EMR_ELLIPSE;
  1229.     EmfRecordTypeRectangle               = EMR_RECTANGLE;
  1230.     EmfRecordTypeRoundRect               = EMR_ROUNDRECT;
  1231.     EmfRecordTypeArc                     = EMR_ARC;
  1232.     EmfRecordTypeChord                   = EMR_CHORD;
  1233.     EmfRecordTypePie                     = EMR_PIE;
  1234.     EmfRecordTypeSelectPalette           = EMR_SELECTPALETTE;
  1235.     EmfRecordTypeCreatePalette           = EMR_CREATEPALETTE;
  1236.     EmfRecordTypeSetPaletteEntries       = EMR_SETPALETTEENTRIES;
  1237.     EmfRecordTypeResizePalette           = EMR_RESIZEPALETTE;
  1238.     EmfRecordTypeRealizePalette          = EMR_REALIZEPALETTE;
  1239.     EmfRecordTypeExtFloodFill            = EMR_EXTFLOODFILL;
  1240.     EmfRecordTypeLineTo                  = EMR_LINETO;
  1241.     EmfRecordTypeArcTo                   = EMR_ARCTO;
  1242.     EmfRecordTypePolyDraw                = EMR_POLYDRAW;
  1243.     EmfRecordTypeSetArcDirection         = EMR_SETARCDIRECTION;
  1244.     EmfRecordTypeSetMiterLimit           = EMR_SETMITERLIMIT;
  1245.     EmfRecordTypeBeginPath               = EMR_BEGINPATH;
  1246.     EmfRecordTypeEndPath                 = EMR_ENDPATH;
  1247.     EmfRecordTypeCloseFigure             = EMR_CLOSEFIGURE;
  1248.     EmfRecordTypeFillPath                = EMR_FILLPATH;
  1249.     EmfRecordTypeStrokeAndFillPath       = EMR_STROKEANDFILLPATH;
  1250.     EmfRecordTypeStrokePath              = EMR_STROKEPATH;
  1251.     EmfRecordTypeFlattenPath             = EMR_FLATTENPATH;
  1252.     EmfRecordTypeWidenPath               = EMR_WIDENPATH;
  1253.     EmfRecordTypeSelectClipPath          = EMR_SELECTCLIPPATH;
  1254.     EmfRecordTypeAbortPath               = EMR_ABORTPATH;
  1255.     EmfRecordTypeReserved_069            = 69;  // Not Used
  1256.     EmfRecordTypeGdiComment              = EMR_GDICOMMENT;
  1257.     EmfRecordTypeFillRgn                 = EMR_FILLRGN;
  1258.     EmfRecordTypeFrameRgn                = EMR_FRAMERGN;
  1259.     EmfRecordTypeInvertRgn               = EMR_INVERTRGN;
  1260.     EmfRecordTypePaintRgn                = EMR_PAINTRGN;
  1261.     EmfRecordTypeExtSelectClipRgn        = EMR_EXTSELECTCLIPRGN;
  1262.     EmfRecordTypeBitBlt                  = EMR_BITBLT;
  1263.     EmfRecordTypeStretchBlt              = EMR_STRETCHBLT;
  1264.     EmfRecordTypeMaskBlt                 = EMR_MASKBLT;
  1265.     EmfRecordTypePlgBlt                  = EMR_PLGBLT;
  1266.     EmfRecordTypeSetDIBitsToDevice       = EMR_SETDIBITSTODEVICE;
  1267.     EmfRecordTypeStretchDIBits           = EMR_STRETCHDIBITS;
  1268.     EmfRecordTypeExtCreateFontIndirect   = EMR_EXTCREATEFONTINDIRECTW;
  1269.     EmfRecordTypeExtTextOutA             = EMR_EXTTEXTOUTA;
  1270.     EmfRecordTypeExtTextOutW             = EMR_EXTTEXTOUTW;
  1271.     EmfRecordTypePolyBezier16            = EMR_POLYBEZIER16;
  1272.     EmfRecordTypePolygon16               = EMR_POLYGON16;
  1273.     EmfRecordTypePolyline16              = EMR_POLYLINE16;
  1274.     EmfRecordTypePolyBezierTo16          = EMR_POLYBEZIERTO16;
  1275.     EmfRecordTypePolylineTo16            = EMR_POLYLINETO16;
  1276.     EmfRecordTypePolyPolyline16          = EMR_POLYPOLYLINE16;
  1277.     EmfRecordTypePolyPolygon16           = EMR_POLYPOLYGON16;
  1278.     EmfRecordTypePolyDraw16              = EMR_POLYDRAW16;
  1279.     EmfRecordTypeCreateMonoBrush         = EMR_CREATEMONOBRUSH;
  1280.     EmfRecordTypeCreateDIBPatternBrushPt = EMR_CREATEDIBPATTERNBRUSHPT;
  1281.     EmfRecordTypeExtCreatePen            = EMR_EXTCREATEPEN;
  1282.     EmfRecordTypePolyTextOutA            = EMR_POLYTEXTOUTA;
  1283.     EmfRecordTypePolyTextOutW            = EMR_POLYTEXTOUTW;
  1284.     EmfRecordTypeSetICMMode              = 98;  // EMR_SETICMMODE,
  1285.     EmfRecordTypeCreateColorSpace        = 99;  // EMR_CREATECOLORSPACE,
  1286.     EmfRecordTypeSetColorSpace           = 100; // EMR_SETCOLORSPACE,
  1287.     EmfRecordTypeDeleteColorSpace        = 101; // EMR_DELETECOLORSPACE,
  1288.     EmfRecordTypeGLSRecord               = 102; // EMR_GLSRECORD,
  1289.     EmfRecordTypeGLSBoundedRecord        = 103; // EMR_GLSBOUNDEDRECORD,
  1290.     EmfRecordTypePixelFormat             = 104; // EMR_PIXELFORMAT,
  1291.     EmfRecordTypeDrawEscape              = 105; // EMR_RESERVED_105,
  1292.     EmfRecordTypeExtEscape               = 106; // EMR_RESERVED_106,
  1293.     EmfRecordTypeStartDoc                = 107; // EMR_RESERVED_107,
  1294.     EmfRecordTypeSmallTextOut            = 108; // EMR_RESERVED_108,
  1295.     EmfRecordTypeForceUFIMapping         = 109; // EMR_RESERVED_109,
  1296.     EmfRecordTypeNamedEscape             = 110; // EMR_RESERVED_110,
  1297.     EmfRecordTypeColorCorrectPalette     = 111; // EMR_COLORCORRECTPALETTE,
  1298.     EmfRecordTypeSetICMProfileA          = 112; // EMR_SETICMPROFILEA,
  1299.     EmfRecordTypeSetICMProfileW          = 113; // EMR_SETICMPROFILEW,
  1300.     EmfRecordTypeAlphaBlend              = 114; // EMR_ALPHABLEND,
  1301.     EmfRecordTypeSetLayout               = 115; // EMR_SETLAYOUT,
  1302.     EmfRecordTypeTransparentBlt          = 116; // EMR_TRANSPARENTBLT,
  1303.     EmfRecordTypeReserved_117            = 117; // Not Used
  1304.     EmfRecordTypeGradientFill            = 118; // EMR_GRADIENTFILL,
  1305.     EmfRecordTypeSetLinkedUFIs           = 119; // EMR_RESERVED_119,
  1306.     EmfRecordTypeSetTextJustification    = 120; // EMR_RESERVED_120,
  1307.     EmfRecordTypeColorMatchToTargetW     = 121; // EMR_COLORMATCHTOTARGETW,
  1308.     EmfRecordTypeCreateColorSpaceW       = 122; // EMR_CREATECOLORSPACEW,
  1309.     EmfRecordTypeMax                     = 122;
  1310.     EmfRecordTypeMin                     = 1;
  1311.  
  1312.     // That is the END of the GDI EMF records.
  1313.  
  1314.     // Now we start the list of EMF+ records.  We leave quite
  1315.     // a bit of room here for the addition of any new GDI
  1316.     // records that may be added later.
  1317.  
  1318.     EmfPlusRecordTypeInvalid   = GDIP_EMFPLUS_RECORD_BASE;
  1319.     EmfPlusRecordTypeHeader    = GDIP_EMFPLUS_RECORD_BASE + 1;
  1320.     EmfPlusRecordTypeEndOfFile = GDIP_EMFPLUS_RECORD_BASE + 2;
  1321.  
  1322.     EmfPlusRecordTypeComment   = GDIP_EMFPLUS_RECORD_BASE + 3;
  1323.  
  1324.     EmfPlusRecordTypeGetDC     = GDIP_EMFPLUS_RECORD_BASE + 4;
  1325.  
  1326.     EmfPlusRecordTypeMultiFormatStart   = GDIP_EMFPLUS_RECORD_BASE + 5;
  1327.     EmfPlusRecordTypeMultiFormatSection = GDIP_EMFPLUS_RECORD_BASE + 6;
  1328.     EmfPlusRecordTypeMultiFormatEnd     = GDIP_EMFPLUS_RECORD_BASE + 7;
  1329.  
  1330.     // For all persistent objects
  1331.  
  1332.     EmfPlusRecordTypeObject = GDIP_EMFPLUS_RECORD_BASE + 8;
  1333.  
  1334.     // Drawing Records
  1335.  
  1336.     EmfPlusRecordTypeClear           = GDIP_EMFPLUS_RECORD_BASE + 9;
  1337.     EmfPlusRecordTypeFillRects       = GDIP_EMFPLUS_RECORD_BASE + 10;
  1338.     EmfPlusRecordTypeDrawRects       = GDIP_EMFPLUS_RECORD_BASE + 11;
  1339.     EmfPlusRecordTypeFillPolygon     = GDIP_EMFPLUS_RECORD_BASE + 12;
  1340.     EmfPlusRecordTypeDrawLines       = GDIP_EMFPLUS_RECORD_BASE + 13;
  1341.     EmfPlusRecordTypeFillEllipse     = GDIP_EMFPLUS_RECORD_BASE + 14;
  1342.     EmfPlusRecordTypeDrawEllipse     = GDIP_EMFPLUS_RECORD_BASE + 15;
  1343.     EmfPlusRecordTypeFillPie         = GDIP_EMFPLUS_RECORD_BASE + 16;
  1344.     EmfPlusRecordTypeDrawPie         = GDIP_EMFPLUS_RECORD_BASE + 17;
  1345.     EmfPlusRecordTypeDrawArc         = GDIP_EMFPLUS_RECORD_BASE + 18;
  1346.     EmfPlusRecordTypeFillRegion      = GDIP_EMFPLUS_RECORD_BASE + 19;
  1347.     EmfPlusRecordTypeFillPath        = GDIP_EMFPLUS_RECORD_BASE + 20;
  1348.     EmfPlusRecordTypeDrawPath        = GDIP_EMFPLUS_RECORD_BASE + 21;
  1349.     EmfPlusRecordTypeFillClosedCurve = GDIP_EMFPLUS_RECORD_BASE + 22;
  1350.     EmfPlusRecordTypeDrawClosedCurve = GDIP_EMFPLUS_RECORD_BASE + 23;
  1351.     EmfPlusRecordTypeDrawCurve       = GDIP_EMFPLUS_RECORD_BASE + 24;
  1352.     EmfPlusRecordTypeDrawBeziers     = GDIP_EMFPLUS_RECORD_BASE + 25;
  1353.     EmfPlusRecordTypeDrawImage       = GDIP_EMFPLUS_RECORD_BASE + 26;
  1354.     EmfPlusRecordTypeDrawImagePoints = GDIP_EMFPLUS_RECORD_BASE + 27;
  1355.     EmfPlusRecordTypeDrawString      = GDIP_EMFPLUS_RECORD_BASE + 28;
  1356.  
  1357.     // Graphics State Records
  1358.  
  1359.     EmfPlusRecordTypeSetRenderingOrigin      = GDIP_EMFPLUS_RECORD_BASE + 29;
  1360.     EmfPlusRecordTypeSetAntiAliasMode        = GDIP_EMFPLUS_RECORD_BASE + 30;
  1361.     EmfPlusRecordTypeSetTextRenderingHint    = GDIP_EMFPLUS_RECORD_BASE + 31;
  1362.     EmfPlusRecordTypeSetTextContrast         = GDIP_EMFPLUS_RECORD_BASE + 32;
  1363.     EmfPlusRecordTypeSetInterpolationMode    = GDIP_EMFPLUS_RECORD_BASE + 33;
  1364.     EmfPlusRecordTypeSetPixelOffsetMode      = GDIP_EMFPLUS_RECORD_BASE + 34;
  1365.     EmfPlusRecordTypeSetCompositingMode      = GDIP_EMFPLUS_RECORD_BASE + 35;
  1366.     EmfPlusRecordTypeSetCompositingQuality   = GDIP_EMFPLUS_RECORD_BASE + 36;
  1367.     EmfPlusRecordTypeSave                    = GDIP_EMFPLUS_RECORD_BASE + 37;
  1368.     EmfPlusRecordTypeRestore                 = GDIP_EMFPLUS_RECORD_BASE + 38;
  1369.     EmfPlusRecordTypeBeginContainer          = GDIP_EMFPLUS_RECORD_BASE + 39;
  1370.     EmfPlusRecordTypeBeginContainerNoParams  = GDIP_EMFPLUS_RECORD_BASE + 40;
  1371.     EmfPlusRecordTypeEndContainer            = GDIP_EMFPLUS_RECORD_BASE + 41;
  1372.     EmfPlusRecordTypeSetWorldTransform       = GDIP_EMFPLUS_RECORD_BASE + 42;
  1373.     EmfPlusRecordTypeResetWorldTransform     = GDIP_EMFPLUS_RECORD_BASE + 43;
  1374.     EmfPlusRecordTypeMultiplyWorldTransform  = GDIP_EMFPLUS_RECORD_BASE + 44;
  1375.     EmfPlusRecordTypeTranslateWorldTransform = GDIP_EMFPLUS_RECORD_BASE + 45;
  1376.     EmfPlusRecordTypeScaleWorldTransform     = GDIP_EMFPLUS_RECORD_BASE + 46;
  1377.     EmfPlusRecordTypeRotateWorldTransform    = GDIP_EMFPLUS_RECORD_BASE + 47;
  1378.     EmfPlusRecordTypeSetPageTransform        = GDIP_EMFPLUS_RECORD_BASE + 48;
  1379.     EmfPlusRecordTypeResetClip               = GDIP_EMFPLUS_RECORD_BASE + 49;
  1380.     EmfPlusRecordTypeSetClipRect             = GDIP_EMFPLUS_RECORD_BASE + 50;
  1381.     EmfPlusRecordTypeSetClipPath             = GDIP_EMFPLUS_RECORD_BASE + 51;
  1382.     EmfPlusRecordTypeSetClipRegion           = GDIP_EMFPLUS_RECORD_BASE + 52;
  1383.     EmfPlusRecordTypeOffsetClip              = GDIP_EMFPLUS_RECORD_BASE + 53;
  1384.  
  1385.     EmfPlusRecordTypeDrawDriverString        = GDIP_EMFPLUS_RECORD_BASE + 54;
  1386.  
  1387.     EmfPlusRecordTotal                       = GDIP_EMFPLUS_RECORD_BASE + 55;
  1388.  
  1389.     EmfPlusRecordTypeMax = EmfPlusRecordTotal-1;
  1390.     EmfPlusRecordTypeMin = EmfPlusRecordTypeHeader;
  1391.  
  1392. type
  1393.   TEmfPlusRecordType = EmfPlusRecordType;
  1394. {$ENDIF}
  1395. //---------------------------------------------------------------------------
  1396. // StringFormatFlags
  1397. //---------------------------------------------------------------------------
  1398.  
  1399. //---------------------------------------------------------------------------
  1400. // String format flags
  1401. //
  1402. //  DirectionRightToLeft          - For horizontal text, the reading order is
  1403. //                                  right to left. This value is called
  1404. //                                  the base embedding level by the Unicode
  1405. //                                  bidirectional engine.
  1406. //                                  For vertical text, columns are read from
  1407. //                                  right to left.
  1408. //                                  By default, horizontal or vertical text is
  1409. //                                  read from left to right.
  1410. //
  1411. //  DirectionVertical             - Individual lines of text are vertical. In
  1412. //                                  each line, characters progress from top to
  1413. //                                  bottom.
  1414. //                                  By default, lines of text are horizontal,
  1415. //                                  each new line below the previous line.
  1416. //
  1417. //  NoFitBlackBox                 - Allows parts of glyphs to overhang the
  1418. //                                  bounding rectangle.
  1419. //                                  By default glyphs are first aligned
  1420. //                                  inside the margines, then any glyphs which
  1421. //                                  still overhang the bounding box are
  1422. //                                  repositioned to avoid any overhang.
  1423. //                                  For example when an italic
  1424. //                                  lower case letter f in a font such as
  1425. //                                  Garamond is aligned at the far left of a
  1426. //                                  rectangle, the lower part of the f will
  1427. //                                  reach slightly further left than the left
  1428. //                                  edge of the rectangle. Setting this flag
  1429. //                                  will ensure the character aligns visually
  1430. //                                  with the lines above and below, but may
  1431. //                                  cause some pixels outside the formatting
  1432. //                                  rectangle to be clipped or painted.
  1433. //
  1434. //  DisplayFormatControl          - Causes control characters such as the
  1435. //                                  left-to-right mark to be shown in the
  1436. //                                  output with a representative glyph.
  1437. //
  1438. //  NoFontFallback                - Disables fallback to alternate fonts for
  1439. //                                  characters not supported in the requested
  1440. //                                  font. Any missing characters will be
  1441. //                                  be displayed with the fonts missing glyph,
  1442. //                                  usually an open square.
  1443. //
  1444. //  NoWrap                        - Disables wrapping of text between lines
  1445. //                                  when formatting within a rectangle.
  1446. //                                  NoWrap is implied when a point is passed
  1447. //                                  instead of a rectangle, or when the
  1448. //                                  specified rectangle has a zero line length.
  1449. //
  1450. //  NoClip                        - By default text is clipped to the
  1451. //                                  formatting rectangle. Setting NoClip
  1452. //                                  allows overhanging pixels to affect the
  1453. //                                  device outside the formatting rectangle.
  1454. //                                  Pixels at the end of the line may be
  1455. //                                  affected if the glyphs overhang their
  1456. //                                  cells, and either the NoFitBlackBox flag
  1457. //                                  has been set, or the glyph extends to far
  1458. //                                  to be fitted.
  1459. //                                  Pixels above/before the first line or
  1460. //                                  below/after the last line may be affected
  1461. //                                  if the glyphs extend beyond their cell
  1462. //                                  ascent / descent. This can occur rarely
  1463. //                                  with unusual diacritic mark combinations.
  1464.  
  1465. //---------------------------------------------------------------------------
  1466.  
  1467.   {$EXTERNALSYM StringFormatFlags}
  1468.   StringFormatFlags = Integer;
  1469.   const
  1470.     StringFormatFlagsDirectionRightToLeft        = $00000001;
  1471.     StringFormatFlagsDirectionVertical           = $00000002;
  1472.     StringFormatFlagsNoFitBlackBox               = $00000004;
  1473.     StringFormatFlagsDisplayFormatControl        = $00000020;
  1474.     StringFormatFlagsNoFontFallback              = $00000400;
  1475.     StringFormatFlagsMeasureTrailingSpaces       = $00000800;
  1476.     StringFormatFlagsNoWrap                      = $00001000;
  1477.     StringFormatFlagsLineLimit                   = $00002000;
  1478.  
  1479.     StringFormatFlagsNoClip                      = $00004000;
  1480.  
  1481. Type
  1482.   TStringFormatFlags = StringFormatFlags;
  1483.  
  1484. //---------------------------------------------------------------------------
  1485. // StringTrimming
  1486. //---------------------------------------------------------------------------
  1487.  
  1488.   {$EXTERNALSYM StringTrimming}
  1489.   StringTrimming = (
  1490.     StringTrimmingNone,
  1491.     StringTrimmingCharacter,
  1492.     StringTrimmingWord,
  1493.     StringTrimmingEllipsisCharacter,
  1494.     StringTrimmingEllipsisWord,
  1495.     StringTrimmingEllipsisPath
  1496.   );
  1497.   TStringTrimming = StringTrimming;
  1498.  
  1499. //---------------------------------------------------------------------------
  1500. // National language digit substitution
  1501. //---------------------------------------------------------------------------
  1502.  
  1503.   {$EXTERNALSYM StringDigitSubstitute}
  1504.   StringDigitSubstitute = (
  1505.     StringDigitSubstituteUser,          // As NLS setting
  1506.     StringDigitSubstituteNone,
  1507.     StringDigitSubstituteNational,
  1508.     StringDigitSubstituteTraditional
  1509.   );
  1510.   TStringDigitSubstitute = StringDigitSubstitute;
  1511.   PStringDigitSubstitute = ^TStringDigitSubstitute;
  1512.  
  1513. //---------------------------------------------------------------------------
  1514. // Hotkey prefix interpretation
  1515. //---------------------------------------------------------------------------
  1516.  
  1517.   {$EXTERNALSYM HotkeyPrefix}
  1518.   HotkeyPrefix = (
  1519.     HotkeyPrefixNone,
  1520.     HotkeyPrefixShow,
  1521.     HotkeyPrefixHide
  1522.   );
  1523.   THotkeyPrefix = HotkeyPrefix;
  1524.  
  1525. //---------------------------------------------------------------------------
  1526. // String alignment flags
  1527. //---------------------------------------------------------------------------
  1528.  
  1529.   {$EXTERNALSYM StringAlignment}
  1530.   StringAlignment = (
  1531.     // Left edge for left-to-right text,
  1532.     // right for right-to-left text,
  1533.     // and top for vertical
  1534.     StringAlignmentNear,
  1535.     StringAlignmentCenter,
  1536.     StringAlignmentFar
  1537.   );
  1538.   TStringAlignment = StringAlignment;
  1539.  
  1540. //---------------------------------------------------------------------------
  1541. // DriverStringOptions
  1542. //---------------------------------------------------------------------------
  1543.  
  1544.   {$EXTERNALSYM DriverStringOptions}
  1545.   DriverStringOptions = Integer;
  1546.   const
  1547.     DriverStringOptionsCmapLookup             = 1;
  1548.     DriverStringOptionsVertical               = 2;
  1549.     DriverStringOptionsRealizedAdvance        = 4;
  1550.     DriverStringOptionsLimitSubpixel          = 8;
  1551.  
  1552. type
  1553.   TDriverStringOptions = DriverStringOptions;
  1554.  
  1555. //---------------------------------------------------------------------------
  1556. // Flush Intention flags
  1557. //---------------------------------------------------------------------------
  1558.  
  1559.   {$EXTERNALSYM FlushIntention}
  1560.   FlushIntention = (
  1561.     FlushIntentionFlush,  // Flush all batched rendering operations
  1562.     FlushIntentionSync    // Flush all batched rendering operations
  1563.                           // and wait for them to complete
  1564.   );
  1565.   TFlushIntention = FlushIntention;
  1566.  
  1567. //---------------------------------------------------------------------------
  1568. // Image encoder parameter related types
  1569. //---------------------------------------------------------------------------
  1570.  
  1571.   {$EXTERNALSYM EncoderParameterValueType}
  1572.   EncoderParameterValueType = Integer;
  1573.   const
  1574.     EncoderParameterValueTypeByte          : Integer = 1;    // 8-bit unsigned int
  1575.     EncoderParameterValueTypeASCII         : Integer = 2;    // 8-bit byte containing one 7-bit ASCII
  1576.                                                              // code. NULL terminated.
  1577.     EncoderParameterValueTypeShort         : Integer = 3;    // 16-bit unsigned int
  1578.     EncoderParameterValueTypeLong          : Integer = 4;    // 32-bit unsigned int
  1579.     EncoderParameterValueTypeRational      : Integer = 5;    // Two Longs. The first Long is the
  1580.                                                              // numerator, the second Long expresses the
  1581.                                                              // denomintor.
  1582.     EncoderParameterValueTypeLongRange     : Integer = 6;    // Two longs which specify a range of
  1583.                                                              // integer values. The first Long specifies
  1584.                                                              // the lower end and the second one
  1585.                                                              // specifies the higher end. All values
  1586.                                                              // are inclusive at both ends
  1587.     EncoderParameterValueTypeUndefined     : Integer = 7;    // 8-bit byte that can take any value
  1588.                                                              // depending on field definition
  1589.     EncoderParameterValueTypeRationalRange : Integer = 8;    // Two Rationals. The first Rational
  1590.                                                              // specifies the lower end and the second
  1591.                                                              // specifies the higher end. All values
  1592.                                                              // are inclusive at both ends
  1593. type
  1594.   TEncoderParameterValueType = EncoderParameterValueType;
  1595.  
  1596. //---------------------------------------------------------------------------
  1597. // Image encoder value types
  1598. //---------------------------------------------------------------------------
  1599.  
  1600.   {$EXTERNALSYM EncoderValue}
  1601.   EncoderValue = (
  1602.     EncoderValueColorTypeCMYK,
  1603.     EncoderValueColorTypeYCCK,
  1604.     EncoderValueCompressionLZW,
  1605.     EncoderValueCompressionCCITT3,
  1606.     EncoderValueCompressionCCITT4,
  1607.     EncoderValueCompressionRle,
  1608.     EncoderValueCompressionNone,
  1609.     EncoderValueScanMethodInterlaced,
  1610.     EncoderValueScanMethodNonInterlaced,
  1611.     EncoderValueVersionGif87,
  1612.     EncoderValueVersionGif89,
  1613.     EncoderValueRenderProgressive,
  1614.     EncoderValueRenderNonProgressive,
  1615.     EncoderValueTransformRotate90,
  1616.     EncoderValueTransformRotate180,
  1617.     EncoderValueTransformRotate270,
  1618.     EncoderValueTransformFlipHorizontal,
  1619.     EncoderValueTransformFlipVertical,
  1620.     EncoderValueMultiFrame,
  1621.     EncoderValueLastFrame,
  1622.     EncoderValueFlush,
  1623.     EncoderValueFrameDimensionTime,
  1624.     EncoderValueFrameDimensionResolution,
  1625.     EncoderValueFrameDimensionPage
  1626.   );
  1627.   TEncoderValue = EncoderValue;
  1628.  
  1629. //---------------------------------------------------------------------------
  1630. // Conversion of Emf To WMF Bits flags
  1631. //---------------------------------------------------------------------------
  1632. {$IFDEF DELPHI6_UP}
  1633.   {$EXTERNALSYM EmfToWmfBitsFlags}
  1634.   EmfToWmfBitsFlags = (
  1635.     EmfToWmfBitsFlagsDefault          = $00000000,
  1636.     EmfToWmfBitsFlagsEmbedEmf         = $00000001,
  1637.     EmfToWmfBitsFlagsIncludePlaceable = $00000002,
  1638.     EmfToWmfBitsFlagsNoXORClip        = $00000004
  1639.   );
  1640.   TEmfToWmfBitsFlags = EmfToWmfBitsFlags;
  1641. {$ELSE}
  1642.   {$EXTERNALSYM EmfToWmfBitsFlags}
  1643.   EmfToWmfBitsFlags = Integer;
  1644.   const
  1645.     EmfToWmfBitsFlagsDefault          = $00000000;
  1646.     EmfToWmfBitsFlagsEmbedEmf         = $00000001;
  1647.     EmfToWmfBitsFlagsIncludePlaceable = $00000002;
  1648.     EmfToWmfBitsFlagsNoXORClip        = $00000004;
  1649.     
  1650. type
  1651.   TEmfToWmfBitsFlags = EmfToWmfBitsFlags;
  1652. {$ENDIF}
  1653. (**************************************************************************\
  1654. *
  1655. *   GDI+ Types
  1656. *
  1657. \**************************************************************************)
  1658.  
  1659. //--------------------------------------------------------------------------
  1660. // Callback functions
  1661. //--------------------------------------------------------------------------
  1662.  
  1663.   {$EXTERNALSYM ImageAbort}
  1664.   ImageAbort = function: BOOL; stdcall;
  1665.   {$EXTERNALSYM DrawImageAbort}
  1666.   DrawImageAbort         = ImageAbort;
  1667.   {$EXTERNALSYM GetThumbnailImageAbort}
  1668.   GetThumbnailImageAbort = ImageAbort;
  1669.  
  1670.  
  1671.   // Callback for EnumerateMetafile methods.  The parameters are:
  1672.  
  1673.   //      recordType      WMF, EMF, or EMF+ record type
  1674.   //      flags           (always 0 for WMF/EMF records)
  1675.   //      dataSize        size of the record data (in bytes), or 0 if no data
  1676.   //      data            pointer to the record data, or NULL if no data
  1677.   //      callbackData    pointer to callbackData, if any
  1678.  
  1679.   // This method can then call Metafile::PlayRecord to play the
  1680.   // record that was just enumerated.  If this method  returns
  1681.   // FALSE, the enumeration process is aborted.  Otherwise, it continues.
  1682.  
  1683.   {$EXTERNALSYM EnumerateMetafileProc}
  1684.   EnumerateMetafileProc = function(recordType: EmfPlusRecordType; flags: UINT;
  1685.     dataSize: UINT; data: PBYTE; callbackData: pointer): BOOL; stdcall;
  1686.  
  1687. //--------------------------------------------------------------------------
  1688. // Primitive data types
  1689. //
  1690. // NOTE:
  1691. //  Types already defined in standard header files:
  1692. //      INT8
  1693. //      UINT8
  1694. //      INT16
  1695. //      UINT16
  1696. //      INT32
  1697. //      UINT32
  1698. //      INT64
  1699. //      UINT64
  1700. //
  1701. //  Avoid using the following types:
  1702. //      LONG - use INT
  1703. //      ULONG - use UINT
  1704. //      DWORD - use UINT32
  1705. //--------------------------------------------------------------------------
  1706.  
  1707. const
  1708.   { from float.h }
  1709.   FLT_MAX =  3.402823466e+38; // max value
  1710.   FLT_MIN =  1.175494351e-38; // min positive value
  1711.  
  1712.   REAL_MAX           = FLT_MAX;
  1713.   {$EXTERNALSYM REAL_MAX}
  1714.   REAL_MIN           = FLT_MIN;
  1715.   {$EXTERNALSYM REAL_MIN}
  1716.   REAL_TOLERANCE     = (FLT_MIN * 100);
  1717.   {$EXTERNALSYM REAL_TOLERANCE}
  1718.   REAL_EPSILON       = 1.192092896e-07;        // FLT_EPSILON
  1719.   {$EXTERNALSYM REAL_EPSILON}
  1720.  
  1721. //--------------------------------------------------------------------------
  1722. // Status return values from GDI+ methods
  1723. //--------------------------------------------------------------------------
  1724. type
  1725.   {$EXTERNALSYM Status}
  1726.   Status = (
  1727.     Ok,
  1728.     GenericError,
  1729.     InvalidParameter,
  1730.     OutOfMemory,
  1731.     ObjectBusy,
  1732.     InsufficientBuffer,
  1733.     NotImplemented,
  1734.     Win32Error,
  1735.     WrongState,
  1736.     Aborted,
  1737.     FileNotFound,
  1738.     ValueOverflow,
  1739.     AccessDenied,
  1740.     UnknownImageFormat,
  1741.     FontFamilyNotFound,
  1742.     FontStyleNotFound,
  1743.     NotTrueTypeFont,
  1744.     UnsupportedGdiplusVersion,
  1745.     GdiplusNotInitialized,
  1746.     PropertyNotFound,
  1747.     PropertyNotSupported
  1748.   );
  1749.   TStatus = Status;
  1750.  
  1751. //--------------------------------------------------------------------------
  1752. // Represents a dimension in a 2D coordinate system (floating-point coordinates)
  1753. //--------------------------------------------------------------------------
  1754.  
  1755. type
  1756.   PGPSizeF = ^TGPSizeF;
  1757.   TGPSizeF = packed record
  1758.     Width  : Single;
  1759.     Height : Single;
  1760.   end;
  1761.  
  1762.   function MakeSize(Width, Height: Single): TGPSizeF; overload;
  1763.  
  1764. //--------------------------------------------------------------------------
  1765. // Represents a dimension in a 2D coordinate system (integer coordinates)
  1766. //--------------------------------------------------------------------------
  1767.  
  1768. type
  1769.   PGPSize = ^TGPSize;
  1770.   TGPSize = packed record
  1771.     Width  : Integer;
  1772.     Height : Integer;
  1773.   end;
  1774.  
  1775.   function MakeSize(Width, Height: Integer): TGPSize; overload;
  1776.  
  1777. //--------------------------------------------------------------------------
  1778. // Represents a location in a 2D coordinate system (floating-point coordinates)
  1779. //--------------------------------------------------------------------------
  1780.  
  1781. type
  1782.   PGPPointF = ^TGPPointF;
  1783.   TGPPointF = packed record
  1784.     X : Single;
  1785.     Y : Single;
  1786.   end;
  1787.   TPointFDynArray = array of TGPPointF;
  1788.  
  1789.   function MakePoint(X, Y: Single): TGPPointF; overload;
  1790.  
  1791. //--------------------------------------------------------------------------
  1792. // Represents a location in a 2D coordinate system (integer coordinates)
  1793. //--------------------------------------------------------------------------
  1794.  
  1795. type
  1796.   PGPPoint = ^TGPPoint;
  1797.   TGPPoint = packed record
  1798.     X : Integer;
  1799.     Y : Integer;
  1800.   end;
  1801.   TPointDynArray = array of TGPPoint;
  1802.  
  1803.   function MakePoint(X, Y: Integer): TGPPoint; overload;
  1804.  
  1805. //--------------------------------------------------------------------------
  1806. // Represents a rectangle in a 2D coordinate system (floating-point coordinates)
  1807. //--------------------------------------------------------------------------
  1808.  
  1809. type
  1810.   PGPRectF = ^TGPRectF;
  1811.   TGPRectF = packed record
  1812.     X     : Single;
  1813.     Y     : Single;
  1814.     Width : Single;
  1815.     Height: Single;
  1816.   end;
  1817.   TRectFDynArray = array of TGPRectF;
  1818.  
  1819.   function MakeRect(x, y, width, height: Single): TGPRectF; overload;
  1820.   function MakeRect(location: TGPPointF; size: TGPSizeF): TGPRectF; overload;
  1821.  
  1822. type
  1823.   PGPRect = ^TGPRect;
  1824.   TGPRect = packed record
  1825.     X     : Integer;
  1826.     Y     : Integer;
  1827.     Width : Integer;
  1828.     Height: Integer;
  1829.   end;
  1830.   TRectDynArray = array of TGPRect;
  1831.  
  1832.   function MakeRect(x, y, width, height: Integer): TGPRect; overload;
  1833.   function MakeRect(location: TGPPoint; size: TGPSize): TGPRect; overload;
  1834.   function MakeRect(const Rect: TRect): TGPRect; overload;
  1835.  
  1836. type
  1837.   TPathData = packed class
  1838.   public
  1839.     Count  : Integer;
  1840.     Points : PGPPointF;
  1841.     Types  : PBYTE;
  1842.     constructor Create;
  1843.     destructor destroy; override;
  1844.   end;
  1845.  
  1846.   PCharacterRange = ^TCharacterRange;
  1847.   TCharacterRange = packed record
  1848.     First  : Integer;
  1849.     Length : Integer;
  1850.   end;
  1851.  
  1852.   function MakeCharacterRange(First, Length: Integer): TCharacterRange;
  1853.  
  1854. (**************************************************************************
  1855. *
  1856. *   GDI+ Startup and Shutdown APIs
  1857. *
  1858. **************************************************************************)
  1859. type
  1860.   {$EXTERNALSYM DebugEventLevel}
  1861.   DebugEventLevel = (
  1862.     DebugEventLevelFatal,
  1863.     DebugEventLevelWarning
  1864.   );
  1865.   TDebugEventLevel = DebugEventLevel;
  1866.  
  1867.   // Callback function that GDI+ can call, on debug builds, for assertions
  1868.   // and warnings.
  1869.  
  1870.   {$EXTERNALSYM DebugEventProc}
  1871.   DebugEventProc = procedure(level: DebugEventLevel; message: PChar); stdcall;
  1872.  
  1873.   // Notification functions which the user must call appropriately if
  1874.   // "SuppressBackgroundThread" (below) is set.
  1875.  
  1876.   {$EXTERNALSYM NotificationHookProc}
  1877.   NotificationHookProc = function(out token: ULONG): Status; stdcall;
  1878.   {$EXTERNALSYM NotificationUnhookProc}
  1879.   NotificationUnhookProc = procedure(token: ULONG); stdcall;
  1880.  
  1881.   // Input structure for GdiplusStartup
  1882.  
  1883.   {$EXTERNALSYM GdiplusStartupInput}
  1884.   GdiplusStartupInput = packed record
  1885.     GdiplusVersion          : Cardinal;       // Must be 1
  1886.     DebugEventCallback      : DebugEventProc; // Ignored on free builds
  1887.     SuppressBackgroundThread: BOOL;           // FALSE unless you're prepared to call
  1888.                                               // the hook/unhook functions properly
  1889.     SuppressExternalCodecs  : BOOL;           // FALSE unless you want GDI+ only to use
  1890.   end;                                        // its internal image codecs.
  1891.   TGdiplusStartupInput = GdiplusStartupInput;
  1892.   PGdiplusStartupInput = ^TGdiplusStartupInput;
  1893.  
  1894.   // Output structure for GdiplusStartup()
  1895.  
  1896.   {$EXTERNALSYM GdiplusStartupOutput}
  1897.   GdiplusStartupOutput = packed record
  1898.     // The following 2 fields are NULL if SuppressBackgroundThread is FALSE.
  1899.     // Otherwise, they are functions which must be called appropriately to
  1900.     // replace the background thread.
  1901.     //
  1902.     // These should be called on the application's main message loop - i.e.
  1903.     // a message loop which is active for the lifetime of GDI+.
  1904.     // "NotificationHook" should be called before starting the loop,
  1905.     // and "NotificationUnhook" should be called after the loop ends.
  1906.  
  1907.     NotificationHook  : NotificationHookProc;
  1908.     NotificationUnhook: NotificationUnhookProc;
  1909.   end;
  1910.   TGdiplusStartupOutput = GdiplusStartupOutput;
  1911.   PGdiplusStartupOutput = ^TGdiplusStartupOutput;
  1912.  
  1913.   // GDI+ initialization. Must not be called from DllMain - can cause deadlock.
  1914.   //
  1915.   // Must be called before GDI+ API's or constructors are used.
  1916.   //
  1917.   // token  - may not be NULL - accepts a token to be passed in the corresponding
  1918.   //          GdiplusShutdown call.
  1919.   // input  - may not be NULL
  1920.   // output - may be NULL only if input->SuppressBackgroundThread is FALSE.
  1921.  
  1922.   {$EXTERNALSYM GdiplusStartup}
  1923.  function GdiplusStartup(out token: ULONG; input: PGdiplusStartupInput;
  1924.    output: PGdiplusStartupOutput): Status; stdcall;
  1925.  
  1926.   // GDI+ termination. Must be called before GDI+ is unloaded.
  1927.   // Must not be called from DllMain - can cause deadlock.
  1928.   //
  1929.   // GDI+ API's may not be called after GdiplusShutdown. Pay careful attention
  1930.   // to GDI+ object destructors.
  1931.  
  1932.   {$EXTERNALSYM GdiplusShutdown}
  1933.   procedure GdiplusShutdown(token: ULONG); stdcall;
  1934.  
  1935.  
  1936. (**************************************************************************\
  1937. *
  1938. * Copyright (c) 1998-2001, Microsoft Corp.  All Rights Reserved.
  1939. * Module Name:
  1940. *   Gdiplus Pixel Formats
  1941. * Abstract:
  1942. *   GDI+ Pixel Formats
  1943. *
  1944. \**************************************************************************)
  1945.  
  1946. type
  1947.   PARGB  = ^ARGB;
  1948.   ARGB   = DWORD;
  1949.   {$EXTERNALSYM ARGB}
  1950.   ARGB64 = Int64;
  1951.   {$EXTERNALSYM ARGB64}
  1952.  
  1953. const
  1954.   ALPHA_SHIFT = 24;
  1955.   {$EXTERNALSYM ALPHA_SHIFT}
  1956.   RED_SHIFT   = 16;
  1957.   {$EXTERNALSYM RED_SHIFT}
  1958.   GREEN_SHIFT = 8;
  1959.   {$EXTERNALSYM GREEN_SHIFT}
  1960.   BLUE_SHIFT  = 0;
  1961.   {$EXTERNALSYM BLUE_SHIFT}
  1962.   ALPHA_MASK  = (ARGB($ff) shl ALPHA_SHIFT);
  1963.   {$EXTERNALSYM ALPHA_MASK}
  1964.  
  1965.   // In-memory pixel data formats:
  1966.   // bits 0-7 = format index
  1967.   // bits 8-15 = pixel size (in bits)
  1968.   // bits 16-23 = flags
  1969.   // bits 24-31 = reserved
  1970.  
  1971. type
  1972.   PixelFormat = Integer;
  1973.   {$EXTERNALSYM PixelFormat}
  1974.   TPixelFormat = PixelFormat;
  1975.  
  1976. const
  1977.   PixelFormatIndexed     = $00010000; // Indexes into a palette
  1978.   {$EXTERNALSYM PixelFormatIndexed}
  1979.   PixelFormatGDI         = $00020000; // Is a GDI-supported format
  1980.   {$EXTERNALSYM PixelFormatGDI}
  1981.   PixelFormatAlpha       = $00040000; // Has an alpha component
  1982.   {$EXTERNALSYM PixelFormatAlpha}
  1983.   PixelFormatPAlpha      = $00080000; // Pre-multiplied alpha
  1984.   {$EXTERNALSYM PixelFormatPAlpha}
  1985.   PixelFormatExtended    = $00100000; // Extended color 16 bits/channel
  1986.   {$EXTERNALSYM PixelFormatExtended}
  1987.   PixelFormatCanonical   = $00200000;
  1988.   {$EXTERNALSYM PixelFormatCanonical}
  1989.  
  1990.   PixelFormatUndefined      = 0;
  1991.   {$EXTERNALSYM PixelFormatUndefined}
  1992.   PixelFormatDontCare       = 0;
  1993.   {$EXTERNALSYM PixelFormatDontCare}
  1994.  
  1995.   PixelFormat1bppIndexed    = (1  or ( 1 shl 8) or PixelFormatIndexed or PixelFormatGDI);
  1996.   {$EXTERNALSYM PixelFormat1bppIndexed}
  1997.   PixelFormat4bppIndexed    = (2  or ( 4 shl 8) or PixelFormatIndexed or PixelFormatGDI);
  1998.   {$EXTERNALSYM PixelFormat4bppIndexed}
  1999.   PixelFormat8bppIndexed    = (3  or ( 8 shl 8) or PixelFormatIndexed or PixelFormatGDI);
  2000.   {$EXTERNALSYM PixelFormat8bppIndexed}
  2001.   PixelFormat16bppGrayScale = (4  or (16 shl 8) or PixelFormatExtended);
  2002.   {$EXTERNALSYM PixelFormat16bppGrayScale}
  2003.   PixelFormat16bppRGB555    = (5  or (16 shl 8) or PixelFormatGDI);
  2004.   {$EXTERNALSYM PixelFormat16bppRGB555}
  2005.   PixelFormat16bppRGB565    = (6  or (16 shl 8) or PixelFormatGDI);
  2006.   {$EXTERNALSYM PixelFormat16bppRGB565}
  2007.   PixelFormat16bppARGB1555  = (7  or (16 shl 8) or PixelFormatAlpha or PixelFormatGDI);
  2008.   {$EXTERNALSYM PixelFormat16bppARGB1555}
  2009.   PixelFormat24bppRGB       = (8  or (24 shl 8) or PixelFormatGDI);
  2010.   {$EXTERNALSYM PixelFormat24bppRGB}
  2011.   PixelFormat32bppRGB       = (9  or (32 shl 8) or PixelFormatGDI);
  2012.   {$EXTERNALSYM PixelFormat32bppRGB}
  2013.   PixelFormat32bppARGB      = (10 or (32 shl 8) or PixelFormatAlpha or PixelFormatGDI or PixelFormatCanonical);
  2014.   {$EXTERNALSYM PixelFormat32bppARGB}
  2015.   PixelFormat32bppPARGB     = (11 or (32 shl 8) or PixelFormatAlpha or PixelFormatPAlpha or PixelFormatGDI);
  2016.   {$EXTERNALSYM PixelFormat32bppPARGB}
  2017.   PixelFormat48bppRGB       = (12 or (48 shl 8) or PixelFormatExtended);
  2018.   {$EXTERNALSYM PixelFormat48bppRGB}
  2019.   PixelFormat64bppARGB      = (13 or (64 shl 8) or PixelFormatAlpha  or PixelFormatCanonical or PixelFormatExtended);
  2020.   {$EXTERNALSYM PixelFormat64bppARGB}
  2021.   PixelFormat64bppPARGB     = (14 or (64 shl 8) or PixelFormatAlpha  or PixelFormatPAlpha or PixelFormatExtended);
  2022.   {$EXTERNALSYM PixelFormat64bppPARGB}
  2023.   PixelFormatMax            = 15;
  2024.   {$EXTERNALSYM PixelFormatMax}
  2025.  
  2026. {$EXTERNALSYM GetPixelFormatSize}
  2027. function GetPixelFormatSize(pixfmt: PixelFormat): UINT;
  2028. {$EXTERNALSYM IsIndexedPixelFormat}
  2029. function IsIndexedPixelFormat(pixfmt: PixelFormat): BOOL;
  2030. {$EXTERNALSYM IsAlphaPixelFormat}
  2031. function IsAlphaPixelFormat(pixfmt: PixelFormat): BOOL;
  2032. {$EXTERNALSYM IsExtendedPixelFormat}
  2033. function IsExtendedPixelFormat(pixfmt: PixelFormat): BOOL;
  2034.  
  2035. //--------------------------------------------------------------------------
  2036. // Determine if the Pixel Format is Canonical format:
  2037. //   PixelFormat32bppARGB
  2038. //   PixelFormat32bppPARGB
  2039. //   PixelFormat64bppARGB
  2040. //   PixelFormat64bppPARGB
  2041. //--------------------------------------------------------------------------
  2042.  
  2043. {$EXTERNALSYM IsCanonicalPixelFormat}
  2044. function IsCanonicalPixelFormat(pixfmt: PixelFormat): BOOL;
  2045.  
  2046. {$IFDEF DELPHI6_UP}
  2047. type
  2048.   {$EXTERNALSYM PaletteFlags}
  2049.   PaletteFlags = (
  2050.     PaletteFlagsHasAlpha    = $0001,
  2051.     PaletteFlagsGrayScale   = $0002,
  2052.     PaletteFlagsHalftone    = $0004
  2053.   );
  2054.   TPaletteFlags = PaletteFlags;
  2055. {$ELSE}
  2056. type
  2057.   {$EXTERNALSYM PaletteFlags}
  2058.   PaletteFlags = Integer;
  2059.   const
  2060.     PaletteFlagsHasAlpha    = $0001;
  2061.     PaletteFlagsGrayScale   = $0002;
  2062.     PaletteFlagsHalftone    = $0004;
  2063.  
  2064. type
  2065.   TPaletteFlags = PaletteFlags;
  2066. {$ENDIF}
  2067.  
  2068.   {$EXTERNALSYM ColorPalette}
  2069.   ColorPalette = packed record
  2070.     Flags  : UINT ;                 // Palette flags
  2071.     Count  : UINT ;                 // Number of color entries
  2072.     Entries: array [0..0] of ARGB ; // Palette color entries
  2073.   end;
  2074.  
  2075.   TColorPalette = ColorPalette;
  2076.   PColorPalette = ^TColorPalette;
  2077.  
  2078. (**************************************************************************\
  2079. *
  2080. *   GDI+ Color Object
  2081. *
  2082. \**************************************************************************)
  2083.  
  2084. //----------------------------------------------------------------------------
  2085. // Color mode
  2086. //----------------------------------------------------------------------------
  2087.  
  2088.   {$EXTERNALSYM ColorMode}
  2089.   ColorMode = (
  2090.     ColorModeARGB32,
  2091.     ColorModeARGB64
  2092.   );
  2093.   TColorMode = ColorMode;
  2094.  
  2095. //----------------------------------------------------------------------------
  2096. // Color Channel flags 
  2097. //----------------------------------------------------------------------------
  2098.  
  2099.   {$EXTERNALSYM ColorChannelFlags}
  2100.   ColorChannelFlags = (
  2101.     ColorChannelFlagsC,
  2102.     ColorChannelFlagsM,
  2103.     ColorChannelFlagsY,
  2104.     ColorChannelFlagsK,
  2105.     ColorChannelFlagsLast
  2106.   );
  2107.   TColorChannelFlags = ColorChannelFlags;
  2108.  
  2109. //----------------------------------------------------------------------------
  2110. // Color
  2111. //----------------------------------------------------------------------------
  2112.  
  2113.   // Common color constants
  2114. const
  2115.   aclAliceBlue            = $FFF0F8FF;
  2116.   aclAntiqueWhite         = $FFFAEBD7;
  2117.   aclAqua                 = $FF00FFFF;
  2118.   aclAquamarine           = $FF7FFFD4;
  2119.   aclAzure                = $FFF0FFFF;
  2120.   aclBeige                = $FFF5F5DC;
  2121.   aclBisque               = $FFFFE4C4;
  2122.   aclBlack                = $FF000000;
  2123.   aclBlanchedAlmond       = $FFFFEBCD;
  2124.   aclBlue                 = $FF0000FF;
  2125.   aclBlueViolet           = $FF8A2BE2;
  2126.   aclBrown                = $FFA52A2A;
  2127.   aclBurlyWood            = $FFDEB887;
  2128.   aclCadetBlue            = $FF5F9EA0;
  2129.   aclChartreuse           = $FF7FFF00;
  2130.   aclChocolate            = $FFD2691E;
  2131.   aclCoral                = $FFFF7F50;
  2132.   aclCornflowerBlue       = $FF6495ED;
  2133.   aclCornsilk             = $FFFFF8DC;
  2134.   aclCrimson              = $FFDC143C;
  2135.   aclCyan                 = $FF00FFFF;
  2136.   aclDarkBlue             = $FF00008B;
  2137.   aclDarkCyan             = $FF008B8B;
  2138.   aclDarkGoldenrod        = $FFB8860B;
  2139.   aclDarkGray             = $FFA9A9A9;
  2140.   aclDarkGreen            = $FF006400;
  2141.   aclDarkKhaki            = $FFBDB76B;
  2142.   aclDarkMagenta          = $FF8B008B;
  2143.   aclDarkOliveGreen       = $FF556B2F;
  2144.   aclDarkOrange           = $FFFF8C00;
  2145.   aclDarkOrchid           = $FF9932CC;
  2146.   aclDarkRed              = $FF8B0000;
  2147.   aclDarkSalmon           = $FFE9967A;
  2148.   aclDarkSeaGreen         = $FF8FBC8B;
  2149.   aclDarkSlateBlue        = $FF483D8B;
  2150.   aclDarkSlateGray        = $FF2F4F4F;
  2151.   aclDarkTurquoise        = $FF00CED1;
  2152.   aclDarkViolet           = $FF9400D3;
  2153.   aclDeepPink             = $FFFF1493;
  2154.   aclDeepSkyBlue          = $FF00BFFF;
  2155.   aclDimGray              = $FF696969;
  2156.   aclDodgerBlue           = $FF1E90FF;
  2157.   aclFirebrick            = $FFB22222;
  2158.   aclFloralWhite          = $FFFFFAF0;
  2159.   aclForestGreen          = $FF228B22;
  2160.   aclFuchsia              = $FFFF00FF;
  2161.   aclGainsboro            = $FFDCDCDC;
  2162.   aclGhostWhite           = $FFF8F8FF;
  2163.   aclGold                 = $FFFFD700;
  2164.   aclGoldenrod            = $FFDAA520;
  2165.   aclGray                 = $FF808080;
  2166.   aclGreen                = $FF008000;
  2167.   aclGreenYellow          = $FFADFF2F;
  2168.   aclHoneydew             = $FFF0FFF0;
  2169.   aclHotPink              = $FFFF69B4;
  2170.   aclIndianRed            = $FFCD5C5C;
  2171.   aclIndigo               = $FF4B0082;
  2172.   aclIvory                = $FFFFFFF0;
  2173.   aclKhaki                = $FFF0E68C;
  2174.   aclLavender             = $FFE6E6FA;
  2175.   aclLavenderBlush        = $FFFFF0F5;
  2176.   aclLawnGreen            = $FF7CFC00;
  2177.   aclLemonChiffon         = $FFFFFACD;
  2178.   aclLightBlue            = $FFADD8E6;
  2179.   aclLightCoral           = $FFF08080;
  2180.   aclLightCyan            = $FFE0FFFF;
  2181.   aclLightGoldenrodYellow = $FFFAFAD2;
  2182.   aclLightGray            = $FFD3D3D3;
  2183.   aclLightGreen           = $FF90EE90;
  2184.   aclLightPink            = $FFFFB6C1;
  2185.   aclLightSalmon          = $FFFFA07A;
  2186.   aclLightSeaGreen        = $FF20B2AA;
  2187.   aclLightSkyBlue         = $FF87CEFA;
  2188.   aclLightSlateGray       = $FF778899;
  2189.   aclLightSteelBlue       = $FFB0C4DE;
  2190.   aclLightYellow          = $FFFFFFE0;
  2191.   aclLime                 = $FF00FF00;
  2192.   aclLimeGreen            = $FF32CD32;
  2193.   aclLinen                = $FFFAF0E6;
  2194.   aclMagenta              = $FFFF00FF;
  2195.   aclMaroon               = $FF800000;
  2196.   aclMediumAquamarine     = $FF66CDAA;
  2197.   aclMediumBlue           = $FF0000CD;
  2198.   aclMediumOrchid         = $FFBA55D3;
  2199.   aclMediumPurple         = $FF9370DB;
  2200.   aclMediumSeaGreen       = $FF3CB371;
  2201.   aclMediumSlateBlue      = $FF7B68EE;
  2202.   aclMediumSpringGreen    = $FF00FA9A;
  2203.   aclMediumTurquoise      = $FF48D1CC;
  2204.   aclMediumVioletRed      = $FFC71585;
  2205.   aclMidnightBlue         = $FF191970;
  2206.   aclMintCream            = $FFF5FFFA;
  2207.   aclMistyRose            = $FFFFE4E1;
  2208.   aclMoccasin             = $FFFFE4B5;
  2209.   aclNavajoWhite          = $FFFFDEAD;
  2210.   aclNavy                 = $FF000080;
  2211.   aclOldLace              = $FFFDF5E6;
  2212.   aclOlive                = $FF808000;
  2213.   aclOliveDrab            = $FF6B8E23;
  2214.   aclOrange               = $FFFFA500;
  2215.   aclOrangeRed            = $FFFF4500;
  2216.   aclOrchid               = $FFDA70D6;
  2217.   aclPaleGoldenrod        = $FFEEE8AA;
  2218.   aclPaleGreen            = $FF98FB98;
  2219.   aclPaleTurquoise        = $FFAFEEEE;
  2220.   aclPaleVioletRed        = $FFDB7093;
  2221.   aclPapayaWhip           = $FFFFEFD5;
  2222.   aclPeachPuff            = $FFFFDAB9;
  2223.   aclPeru                 = $FFCD853F;
  2224.   aclPink                 = $FFFFC0CB;
  2225.   aclPlum                 = $FFDDA0DD;
  2226.   aclPowderBlue           = $FFB0E0E6;
  2227.   aclPurple               = $FF800080;
  2228.   aclRed                  = $FFFF0000;
  2229.   aclRosyBrown            = $FFBC8F8F;
  2230.   aclRoyalBlue            = $FF4169E1;
  2231.   aclSaddleBrown          = $FF8B4513;
  2232.   aclSalmon               = $FFFA8072;
  2233.   aclSandyBrown           = $FFF4A460;
  2234.   aclSeaGreen             = $FF2E8B57;
  2235.   aclSeaShell             = $FFFFF5EE;
  2236.   aclSienna               = $FFA0522D;
  2237.   aclSilver               = $FFC0C0C0;
  2238.   aclSkyBlue              = $FF87CEEB;
  2239.   aclSlateBlue            = $FF6A5ACD;
  2240.   aclSlateGray            = $FF708090;
  2241.   aclSnow                 = $FFFFFAFA;
  2242.   aclSpringGreen          = $FF00FF7F;
  2243.   aclSteelBlue            = $FF4682B4;
  2244.   aclTan                  = $FFD2B48C;
  2245.   aclTeal                 = $FF008080;
  2246.   aclThistle              = $FFD8BFD8;
  2247.   aclTomato               = $FFFF6347;
  2248.   aclTransparent          = $00FFFFFF;
  2249.   aclTurquoise            = $FF40E0D0;
  2250.   aclViolet               = $FFEE82EE;
  2251.   aclWheat                = $FFF5DEB3;
  2252.   aclWhite                = $FFFFFFFF;
  2253.   aclWhiteSmoke           = $FFF5F5F5;
  2254.   aclYellow               = $FFFFFF00;
  2255.   aclYellowGreen          = $FF9ACD32;
  2256.  
  2257.   // Shift count and bit mask for A, R, G, B components
  2258.   AlphaShift  = 24;
  2259.   {$EXTERNALSYM AlphaShift}
  2260.   RedShift    = 16;
  2261.   {$EXTERNALSYM RedShift}
  2262.   GreenShift  = 8;
  2263.   {$EXTERNALSYM GreenShift}
  2264.   BlueShift   = 0;
  2265.   {$EXTERNALSYM BlueShift}
  2266.  
  2267.   AlphaMask   = $ff000000;
  2268.   {$EXTERNALSYM AlphaMask}
  2269.   RedMask     = $00ff0000;
  2270.   {$EXTERNALSYM RedMask}
  2271.   GreenMask   = $0000ff00;
  2272.   {$EXTERNALSYM GreenMask}
  2273.   BlueMask    = $000000ff;
  2274.   {$EXTERNALSYM BlueMask}
  2275.  
  2276.  
  2277. type
  2278. {  TGPColor = class
  2279.   protected
  2280.      Argb: ARGB;
  2281.   public
  2282.     constructor Create; overload;
  2283.     constructor Create(r, g, b: Byte); overload;
  2284.     constructor Create(a, r, g, b: Byte); overload;
  2285.     constructor Create(Value: ARGB); overload;
  2286.     function GetAlpha: BYTE;
  2287.     function GetA: BYTE;
  2288.     function GetRed: BYTE;
  2289.     function GetR: BYTE;
  2290.     function GetGreen: Byte;
  2291.     function GetG: Byte;
  2292.     function GetBlue: Byte;
  2293.     function GetB: Byte;
  2294.     function GetValue: ARGB;
  2295.     procedure SetValue(Value: ARGB);
  2296.     procedure SetFromCOLORREF(rgb: COLORREF);
  2297.     function ToCOLORREF: COLORREF;
  2298.     function MakeARGB(a, r, g, b: Byte): ARGB;
  2299.   end;  }
  2300.  
  2301.   PGPColor = ^TGPColor;
  2302.   TGPColor = ARGB;
  2303.   TColorDynArray = array of TGPColor;
  2304.  
  2305.   function MakeColor(r, g, b: Byte): ARGB; overload;
  2306.   function MakeColor(a, r, g, b: Byte): ARGB; overload;
  2307.   function GetAlpha(color: ARGB): BYTE;
  2308.   function GetRed(color: ARGB): BYTE;
  2309.   function GetGreen(color: ARGB): BYTE;
  2310.   function GetBlue(color: ARGB): BYTE;
  2311.   function ColorRefToARGB(rgb: COLORREF): ARGB;
  2312.   function ARGBToColorRef(Color: ARGB): COLORREF;
  2313.  
  2314.  
  2315. (**************************************************************************\
  2316. *
  2317. *   GDI+ Metafile Related Structures
  2318. *
  2319. \**************************************************************************)
  2320.  
  2321. type
  2322.   { from Windef.h }
  2323.   RECTL = Windows.TRect;
  2324.   SIZEL = Windows.TSize;
  2325.  
  2326.   {$EXTERNALSYM ENHMETAHEADER3}
  2327.   ENHMETAHEADER3 = packed record
  2328.     iType          : DWORD;  // Record type EMR_HEADER
  2329.     nSize          : DWORD;  // Record size in bytes.  This may be greater
  2330.                              // than the sizeof(ENHMETAHEADER).
  2331.     rclBounds      : RECTL;  // Inclusive-inclusive bounds in device units
  2332.     rclFrame       : RECTL;  // Inclusive-inclusive Picture Frame .01mm unit
  2333.     dSignature     : DWORD;  // Signature.  Must be ENHMETA_SIGNATURE.
  2334.     nVersion       : DWORD;  // Version number
  2335.     nBytes         : DWORD;  // Size of the metafile in bytes
  2336.     nRecords       : DWORD;  // Number of records in the metafile
  2337.     nHandles       : WORD;   // Number of handles in the handle table
  2338.                              // Handle index zero is reserved.
  2339.     sReserved      : WORD;   // Reserved.  Must be zero.
  2340.     nDescription   : DWORD;  // Number of chars in the unicode desc string
  2341.                              // This is 0 if there is no description string
  2342.     offDescription : DWORD;  // Offset to the metafile description record.
  2343.                              // This is 0 if there is no description string
  2344.     nPalEntries    : DWORD;  // Number of entries in the metafile palette.
  2345.     szlDevice      : SIZEL;  // Size of the reference device in pels
  2346.     szlMillimeters : SIZEL;  // Size of the reference device in millimeters
  2347.   end;
  2348.   TENHMETAHEADER3 = ENHMETAHEADER3;
  2349.   PENHMETAHEADER3 = ^TENHMETAHEADER3;
  2350.  
  2351.   // Placeable WMFs
  2352.  
  2353.   // Placeable Metafiles were created as a non-standard way of specifying how
  2354.   // a metafile is mapped and scaled on an output device.
  2355.   // Placeable metafiles are quite wide-spread, but not directly supported by
  2356.   // the Windows API. To playback a placeable metafile using the Windows API,
  2357.   // you will first need to strip the placeable metafile header from the file.
  2358.   // This is typically performed by copying the metafile to a temporary file
  2359.   // starting at file offset 22 (0x16). The contents of the temporary file may
  2360.   // then be used as input to the Windows GetMetaFile(), PlayMetaFile(),
  2361.   // CopyMetaFile(), etc. GDI functions.
  2362.  
  2363.   // Each placeable metafile begins with a 22-byte header,
  2364.   //  followed by a standard metafile:
  2365.  
  2366.   {$EXTERNALSYM PWMFRect16}
  2367.   PWMFRect16 = packed record
  2368.     Left   : INT16;
  2369.     Top    : INT16;
  2370.     Right  : INT16;
  2371.     Bottom : INT16;
  2372.   end;
  2373.   TPWMFRect16 = PWMFRect16;
  2374.   PPWMFRect16 = ^TPWMFRect16;
  2375.  
  2376.   {$EXTERNALSYM WmfPlaceableFileHeader}
  2377.   WmfPlaceableFileHeader = packed record
  2378.     Key         : UINT32;      // GDIP_WMF_PLACEABLEKEY
  2379.     Hmf         : INT16;       // Metafile HANDLE number (always 0)
  2380.     BoundingBox : PWMFRect16;  // Coordinates in metafile units
  2381.     Inch        : INT16;       // Number of metafile units per inch
  2382.     Reserved    : UINT32;      // Reserved (always 0)
  2383.     Checksum    : INT16;       // Checksum value for previous 10 WORDs
  2384.   end;
  2385.   TWmfPlaceableFileHeader = WmfPlaceableFileHeader;
  2386.   PWmfPlaceableFileHeader = ^TWmfPlaceableFileHeader;
  2387.  
  2388.   // Key contains a special identification value that indicates the presence
  2389.   // of a placeable metafile header and is always 0x9AC6CDD7.
  2390.  
  2391.   // Handle is used to stored the handle of the metafile in memory. When written
  2392.   // to disk, this field is not used and will always contains the value 0.
  2393.  
  2394.   // Left, Top, Right, and Bottom contain the coordinates of the upper-left
  2395.   // and lower-right corners of the image on the output device. These are
  2396.   // measured in twips.
  2397.  
  2398.   // A twip (meaning "twentieth of a point") is the logical unit of measurement
  2399.   // used in Windows Metafiles. A twip is equal to 1/1440 of an inch. Thus 720
  2400.   // twips equal 1/2 inch, while 32,768 twips is 22.75 inches.
  2401.  
  2402.   // Inch contains the number of twips per inch used to represent the image.
  2403.   // Normally, there are 1440 twips per inch; however, this number may be
  2404.   // changed to scale the image. A value of 720 indicates that the image is
  2405.   // double its normal size, or scaled to a factor of 2:1. A value of 360
  2406.   // indicates a scale of 4:1, while a value of 2880 indicates that the image
  2407.   // is scaled down in size by a factor of two. A value of 1440 indicates
  2408.   // a 1:1 scale ratio.
  2409.  
  2410.   // Reserved is not used and is always set to 0.
  2411.  
  2412.   // Checksum contains a checksum value for the previous 10 WORDs in the header.
  2413.   // This value can be used in an attempt to detect if the metafile has become
  2414.   // corrupted. The checksum is calculated by XORing each WORD value to an
  2415.   // initial value of 0.
  2416.  
  2417.   // If the metafile was recorded with a reference Hdc that was a display.
  2418.  
  2419. const
  2420.   GDIP_EMFPLUSFLAGS_DISPLAY      = $00000001;
  2421.   {$EXTERNALSYM GDIP_EMFPLUSFLAGS_DISPLAY}
  2422.  
  2423. type
  2424.   TMetafileHeader = packed class
  2425.   public
  2426.     Type_        : TMetafileType;
  2427.     Size         : UINT;           // Size of the metafile (in bytes)
  2428.     Version      : UINT;           // EMF+, EMF, or WMF version
  2429.     EmfPlusFlags : UINT;
  2430.     DpiX         : Single;
  2431.     DpiY         : Single;
  2432.     X            : Integer;        // Bounds in device units
  2433.     Y            : Integer;
  2434.     Width        : Integer;
  2435.     Height       : Integer;
  2436.     Header       : record
  2437.     case integer of
  2438.       0: (WmfHeader: TMETAHEADER;);
  2439.       1: (EmfHeader: TENHMETAHEADER3);
  2440.     end;
  2441.     EmfPlusHeaderSize : Integer; // size of the EMF+ header in file
  2442.     LogicalDpiX       : Integer; // Logical Dpi of reference Hdc
  2443.     LogicalDpiY       : Integer; // usually valid only for EMF+
  2444.   public
  2445.     property GetType: TMetafileType read Type_;
  2446.     property GetMetafileSize: UINT read Size;
  2447.     // If IsEmfPlus, this is the EMF+ version; else it is the WMF or EMF ver
  2448.     property GetVersion: UINT read Version;
  2449.      // Get the EMF+ flags associated with the metafile
  2450.     property GetEmfPlusFlags: UINT read EmfPlusFlags;
  2451.     property GetDpiX: Single read DpiX;
  2452.     property GetDpiY: Single read DpiY;
  2453.     procedure GetBounds(out Rect: TGPRect);
  2454.     // Is it any type of WMF (standard or Placeable Metafile)?
  2455.     function IsWmf: BOOL;
  2456.     // Is this an Placeable Metafile?
  2457.     function IsWmfPlaceable: BOOL;
  2458.     // Is this an EMF (not an EMF+)?
  2459.     function IsEmf: BOOL;
  2460.     // Is this an EMF or EMF+ file?
  2461.     function IsEmfOrEmfPlus: BOOL;
  2462.     // Is this an EMF+ file?
  2463.     function IsEmfPlus: BOOL;
  2464.     // Is this an EMF+ dual (has dual, down-level records) file?
  2465.     function IsEmfPlusDual: BOOL;
  2466.     // Is this an EMF+ only (no dual records) file?
  2467.     function IsEmfPlusOnly: BOOL;
  2468.     // If it's an EMF+ file, was it recorded against a display Hdc?
  2469.     function IsDisplay: BOOL;
  2470.     // Get the WMF header of the metafile (if it is a WMF)
  2471.     function GetWmfHeader: PMetaHeader;
  2472.     // Get the EMF header of the metafile (if it is an EMF)
  2473.     function GetEmfHeader: PENHMETAHEADER3;
  2474.   end;
  2475.  
  2476. (**************************************************************************\
  2477. *
  2478. *   GDI+ Imaging GUIDs
  2479. *
  2480. \**************************************************************************)
  2481.  
  2482. //---------------------------------------------------------------------------
  2483. // Image file format identifiers
  2484. //---------------------------------------------------------------------------
  2485.  
  2486. const
  2487.   ImageFormatUndefined : TGUID = '{b96b3ca9-0728-11d3-9d7b-0000f81ef32e}';
  2488.   {$EXTERNALSYM ImageFormatUndefined}
  2489.   ImageFormatMemoryBMP : TGUID = '{b96b3caa-0728-11d3-9d7b-0000f81ef32e}';
  2490.   {$EXTERNALSYM ImageFormatMemoryBMP}
  2491.   ImageFormatBMP       : TGUID = '{b96b3cab-0728-11d3-9d7b-0000f81ef32e}';
  2492.   {$EXTERNALSYM ImageFormatBMP}
  2493.   ImageFormatEMF       : TGUID = '{b96b3cac-0728-11d3-9d7b-0000f81ef32e}';
  2494.   {$EXTERNALSYM ImageFormatEMF}
  2495.   ImageFormatWMF       : TGUID = '{b96b3cad-0728-11d3-9d7b-0000f81ef32e}';
  2496.   {$EXTERNALSYM ImageFormatWMF}
  2497.   ImageFormatJPEG      : TGUID = '{b96b3cae-0728-11d3-9d7b-0000f81ef32e}';
  2498.   {$EXTERNALSYM ImageFormatJPEG}
  2499.   ImageFormatPNG       : TGUID = '{b96b3caf-0728-11d3-9d7b-0000f81ef32e}';
  2500.   {$EXTERNALSYM ImageFormatPNG}
  2501.   ImageFormatGIF       : TGUID = '{b96b3cb0-0728-11d3-9d7b-0000f81ef32e}';
  2502.   {$EXTERNALSYM ImageFormatGIF}
  2503.   ImageFormatTIFF      : TGUID = '{b96b3cb1-0728-11d3-9d7b-0000f81ef32e}';
  2504.   {$EXTERNALSYM ImageFormatTIFF}
  2505.   ImageFormatEXIF      : TGUID = '{b96b3cb2-0728-11d3-9d7b-0000f81ef32e}';
  2506.   {$EXTERNALSYM ImageFormatEXIF}
  2507.   ImageFormatIcon      : TGUID = '{b96b3cb5-0728-11d3-9d7b-0000f81ef32e}';
  2508.   {$EXTERNALSYM ImageFormatIcon}
  2509.  
  2510. //---------------------------------------------------------------------------
  2511. // Predefined multi-frame dimension IDs
  2512. //---------------------------------------------------------------------------
  2513.  
  2514.   FrameDimensionTime       : TGUID = '{6aedbd6d-3fb5-418a-83a6-7f45229dc872}';
  2515.   {$EXTERNALSYM FrameDimensionTime}
  2516.   FrameDimensionResolution : TGUID = '{84236f7b-3bd3-428f-8dab-4ea1439ca315}';
  2517.   {$EXTERNALSYM FrameDimensionResolution}
  2518.   FrameDimensionPage       : TGUID = '{7462dc86-6180-4c7e-8e3f-ee7333a7a483}';
  2519.   {$EXTERNALSYM FrameDimensionPage}
  2520.  
  2521. //---------------------------------------------------------------------------
  2522. // Property sets
  2523. //---------------------------------------------------------------------------
  2524.  
  2525.   FormatIDImageInformation : TGUID = '{e5836cbe-5eef-4f1d-acde-ae4c43b608ce}';
  2526.   {$EXTERNALSYM FormatIDImageInformation}
  2527.   FormatIDJpegAppHeaders   : TGUID = '{1c4afdcd-6177-43cf-abc7-5f51af39ee85}';
  2528.   {$EXTERNALSYM FormatIDJpegAppHeaders}
  2529.  
  2530. //---------------------------------------------------------------------------
  2531. // Encoder parameter sets
  2532. //---------------------------------------------------------------------------
  2533.  
  2534.   EncoderCompression      : TGUID = '{e09d739d-ccd4-44ee-8eba-3fbf8be4fc58}';
  2535.   {$EXTERNALSYM EncoderCompression}
  2536.   EncoderColorDepth       : TGUID = '{66087055-ad66-4c7c-9a18-38a2310b8337}';
  2537.   {$EXTERNALSYM EncoderColorDepth}
  2538.   EncoderScanMethod       : TGUID = '{3a4e2661-3109-4e56-8536-42c156e7dcfa}';
  2539.   {$EXTERNALSYM EncoderScanMethod}
  2540.   EncoderVersion          : TGUID = '{24d18c76-814a-41a4-bf53-1c219cccf797}';
  2541.   {$EXTERNALSYM EncoderVersion}
  2542.   EncoderRenderMethod     : TGUID = '{6d42c53a-229a-4825-8bb7-5c99e2b9a8b8}';
  2543.   {$EXTERNALSYM EncoderRenderMethod}
  2544.   EncoderQuality          : TGUID = '{1d5be4b5-fa4a-452d-9cdd-5db35105e7eb}';
  2545.   {$EXTERNALSYM EncoderQuality}
  2546.   EncoderTransformation   : TGUID = '{8d0eb2d1-a58e-4ea8-aa14-108074b7b6f9}';
  2547.   {$EXTERNALSYM EncoderTransformation}
  2548.   EncoderLuminanceTable   : TGUID = '{edb33bce-0266-4a77-b904-27216099e717}';
  2549.   {$EXTERNALSYM EncoderLuminanceTable}
  2550.   EncoderChrominanceTable : TGUID = '{f2e455dc-09b3-4316-8260-676ada32481c}';
  2551.   {$EXTERNALSYM EncoderChrominanceTable}
  2552.   EncoderSaveFlag         : TGUID = '{292266fc-ac40-47bf-8cfc-a85b89a655de}';
  2553.   {$EXTERNALSYM EncoderSaveFlag}
  2554.  
  2555.   CodecIImageBytes : TGUID = '{025d1823-6c7d-447b-bbdb-a3cbc3dfa2fc}';
  2556.   {$EXTERNALSYM CodecIImageBytes}
  2557.  
  2558. type
  2559.   {$EXTERNALSYM IImageBytes}
  2560.   IImageBytes = Interface(IUnknown)
  2561.     ['{025D1823-6C7D-447B-BBDB-A3CBC3DFA2FC}']
  2562.     // Return total number of bytes in the IStream
  2563.     function CountBytes(out pcb: UINT): HRESULT; stdcall;
  2564.     // Locks "cb" bytes, starting from "ulOffset" in the stream, and returns the
  2565.     // pointer to the beginning of the locked memory chunk in "ppvBytes"
  2566.     function LockBytes(cb: UINT; ulOffset: ULONG; out ppvBytes: pointer): HRESULT; stdcall;
  2567.     // Unlocks "cb" bytes, pointed by "pvBytes", starting from "ulOffset" in the
  2568.     // stream
  2569.     function UnlockBytes(pvBytes: pointer; cb: UINT; ulOffset: ULONG): HRESULT; stdcall;
  2570.   end;
  2571.  
  2572. //--------------------------------------------------------------------------
  2573. // ImageCodecInfo structure
  2574. //--------------------------------------------------------------------------
  2575.  
  2576.   {$EXTERNALSYM ImageCodecInfo}
  2577.   ImageCodecInfo = packed record
  2578.     Clsid             : TGUID;
  2579.     FormatID          : TGUID;
  2580.     CodecName         : PWCHAR;
  2581.     DllName           : PWCHAR;
  2582.     FormatDescription : PWCHAR;
  2583.     FilenameExtension : PWCHAR;
  2584.     MimeType          : PWCHAR;
  2585.     Flags             : DWORD;
  2586.     Version           : DWORD;
  2587.     SigCount          : DWORD;
  2588.     SigSize           : DWORD;
  2589.     SigPattern        : PBYTE;
  2590.     SigMask           : PBYTE;
  2591.   end;
  2592.   TImageCodecInfo = ImageCodecInfo;
  2593.   PImageCodecInfo = ^TImageCodecInfo;
  2594.  
  2595. //--------------------------------------------------------------------------
  2596. // Information flags about image codecs
  2597. //--------------------------------------------------------------------------
  2598. {$IFDEF DELPHI6_UP}
  2599.   {$EXTERNALSYM ImageCodecFlags}
  2600.   ImageCodecFlags = (
  2601.     ImageCodecFlagsEncoder            = $00000001,
  2602.     ImageCodecFlagsDecoder            = $00000002,
  2603.     ImageCodecFlagsSupportBitmap      = $00000004,
  2604.     ImageCodecFlagsSupportVector      = $00000008,
  2605.     ImageCodecFlagsSeekableEncode     = $00000010,
  2606.     ImageCodecFlagsBlockingDecode     = $00000020,
  2607.  
  2608.     ImageCodecFlagsBuiltin            = $00010000,
  2609.     ImageCodecFlagsSystem             = $00020000,
  2610.     ImageCodecFlagsUser               = $00040000
  2611.   );
  2612.   TImageCodecFlags = ImageCodecFlags;
  2613. {$ELSE}
  2614.   {$EXTERNALSYM ImageCodecFlags}
  2615.   ImageCodecFlags = Integer;
  2616.   const
  2617.     ImageCodecFlagsEncoder            = $00000001;
  2618.     ImageCodecFlagsDecoder            = $00000002;
  2619.     ImageCodecFlagsSupportBitmap      = $00000004;
  2620.     ImageCodecFlagsSupportVector      = $00000008;
  2621.     ImageCodecFlagsSeekableEncode     = $00000010;
  2622.     ImageCodecFlagsBlockingDecode     = $00000020;
  2623.  
  2624.     ImageCodecFlagsBuiltin            = $00010000;
  2625.     ImageCodecFlagsSystem             = $00020000;
  2626.     ImageCodecFlagsUser               = $00040000;
  2627.  
  2628. type
  2629.   TImageCodecFlags = ImageCodecFlags;
  2630. {$ENDIF}
  2631. //---------------------------------------------------------------------------
  2632. // Access modes used when calling Image::LockBits
  2633. //---------------------------------------------------------------------------
  2634.  
  2635.   {$EXTERNALSYM ImageLockMode}
  2636.   ImageLockMode = Integer;
  2637.   const
  2638.     ImageLockModeRead         = $0001;
  2639.     ImageLockModeWrite        = $0002;
  2640.     ImageLockModeUserInputBuf = $0004;
  2641. type
  2642.   TImageLockMode = ImageLockMode;
  2643.  
  2644. //---------------------------------------------------------------------------
  2645. // Information about image pixel data
  2646. //---------------------------------------------------------------------------
  2647.  
  2648.   {$EXTERNALSYM BitmapData}
  2649.   BitmapData = packed record
  2650.     Width       : UINT;
  2651.     Height      : UINT;
  2652.     Stride      : Integer;
  2653.     PixelFormat : PixelFormat;
  2654.     Scan0       : Pointer;
  2655.     Reserved    : UINT;
  2656.   end;
  2657.   TBitmapData = BitmapData;
  2658.   PBitmapData = ^TBitmapData;
  2659.  
  2660. //---------------------------------------------------------------------------
  2661. // Image flags
  2662. //---------------------------------------------------------------------------
  2663. {$IFDEF DELPHI6_UP}
  2664.   {$EXTERNALSYM ImageFlags}
  2665.   ImageFlags = (
  2666.     ImageFlagsNone                = 0,
  2667.  
  2668.     // Low-word: shared with SINKFLAG_x
  2669.  
  2670.     ImageFlagsScalable            = $0001,
  2671.     ImageFlagsHasAlpha            = $0002,
  2672.     ImageFlagsHasTranslucent      = $0004,
  2673.     ImageFlagsPartiallyScalable   = $0008,
  2674.  
  2675.     // Low-word: color space definition
  2676.  
  2677.     ImageFlagsColorSpaceRGB       = $0010,
  2678.     ImageFlagsColorSpaceCMYK      = $0020,
  2679.     ImageFlagsColorSpaceGRAY      = $0040,
  2680.     ImageFlagsColorSpaceYCBCR     = $0080,
  2681.     ImageFlagsColorSpaceYCCK      = $0100,
  2682.  
  2683.     // Low-word: image size info
  2684.  
  2685.     ImageFlagsHasRealDPI          = $1000,
  2686.     ImageFlagsHasRealPixelSize    = $2000,
  2687.  
  2688.     // High-word
  2689.  
  2690.     ImageFlagsReadOnly            = $00010000,
  2691.     ImageFlagsCaching             = $00020000
  2692.   );
  2693.   TImageFlags = ImageFlags;
  2694. {$ELSE}
  2695.   {$EXTERNALSYM ImageFlags}
  2696.   ImageFlags = Integer;
  2697.   const
  2698.     ImageFlagsNone                = 0;
  2699.  
  2700.     // Low-word: shared with SINKFLAG_x
  2701.  
  2702.     ImageFlagsScalable            = $0001;
  2703.     ImageFlagsHasAlpha            = $0002;
  2704.     ImageFlagsHasTranslucent      = $0004;
  2705.     ImageFlagsPartiallyScalable   = $0008;
  2706.  
  2707.     // Low-word: color space definition
  2708.  
  2709.     ImageFlagsColorSpaceRGB       = $0010;
  2710.     ImageFlagsColorSpaceCMYK      = $0020;
  2711.     ImageFlagsColorSpaceGRAY      = $0040;
  2712.     ImageFlagsColorSpaceYCBCR     = $0080;
  2713.     ImageFlagsColorSpaceYCCK      = $0100;
  2714.  
  2715.     // Low-word: image size info
  2716.  
  2717.     ImageFlagsHasRealDPI          = $1000;
  2718.     ImageFlagsHasRealPixelSize    = $2000;
  2719.  
  2720.     // High-word
  2721.  
  2722.     ImageFlagsReadOnly            = $00010000;
  2723.     ImageFlagsCaching             = $00020000;
  2724.  
  2725. type
  2726.   TImageFlags = ImageFlags;
  2727. {$ENDIF}
  2728.  
  2729.  
  2730. {$IFDEF DELPHI6_UP}
  2731.   {$EXTERNALSYM RotateFlipType}
  2732.   RotateFlipType = (
  2733.     RotateNoneFlipNone = 0,
  2734.     Rotate90FlipNone   = 1,
  2735.     Rotate180FlipNone  = 2,
  2736.     Rotate270FlipNone  = 3,
  2737.  
  2738.     RotateNoneFlipX    = 4,
  2739.     Rotate90FlipX      = 5,
  2740.     Rotate180FlipX     = 6,
  2741.     Rotate270FlipX     = 7,
  2742.  
  2743.     RotateNoneFlipY    = Rotate180FlipX,
  2744.     Rotate90FlipY      = Rotate270FlipX,
  2745.     Rotate180FlipY     = RotateNoneFlipX,
  2746.     Rotate270FlipY     = Rotate90FlipX,
  2747.  
  2748.     RotateNoneFlipXY   = Rotate180FlipNone,
  2749.     Rotate90FlipXY     = Rotate270FlipNone,
  2750.     Rotate180FlipXY    = RotateNoneFlipNone,
  2751.     Rotate270FlipXY    = Rotate90FlipNone
  2752.   );
  2753.   TRotateFlipType = RotateFlipType;
  2754. {$ELSE}
  2755.   {$EXTERNALSYM RotateFlipType}
  2756.   RotateFlipType = (
  2757.     RotateNoneFlipNone, // = 0,
  2758.     Rotate90FlipNone,   // = 1,
  2759.     Rotate180FlipNone,  // = 2,
  2760.     Rotate270FlipNone,  // = 3,
  2761.  
  2762.     RotateNoneFlipX,    // = 4,
  2763.     Rotate90FlipX,      // = 5,
  2764.     Rotate180FlipX,     // = 6,
  2765.     Rotate270FlipX      // = 7,
  2766.   );
  2767.   const
  2768.     RotateNoneFlipY    = Rotate180FlipX;
  2769.     Rotate90FlipY      = Rotate270FlipX;
  2770.     Rotate180FlipY     = RotateNoneFlipX;
  2771.     Rotate270FlipY     = Rotate90FlipX;
  2772.  
  2773.     RotateNoneFlipXY   = Rotate180FlipNone;
  2774.     Rotate90FlipXY     = Rotate270FlipNone;
  2775.     Rotate180FlipXY    = RotateNoneFlipNone;
  2776.     Rotate270FlipXY    = Rotate90FlipNone;
  2777.  
  2778. type
  2779.   TRotateFlipType = RotateFlipType;
  2780. {$ENDIF}
  2781.  
  2782. //---------------------------------------------------------------------------
  2783. // Encoder Parameter structure
  2784. //---------------------------------------------------------------------------
  2785.  
  2786.   {$EXTERNALSYM EncoderParameter}
  2787.   EncoderParameter = packed record
  2788.     Guid           : TGUID;   // GUID of the parameter
  2789.     NumberOfValues : ULONG;   // Number of the parameter values
  2790.     Type_          : ULONG;   // Value type, like ValueTypeLONG  etc.
  2791.     Value          : Pointer; // A pointer to the parameter values
  2792.   end;
  2793.   TEncoderParameter = EncoderParameter;
  2794.   PEncoderParameter = ^TEncoderParameter;
  2795.  
  2796. //---------------------------------------------------------------------------
  2797. // Encoder Parameters structure
  2798. //---------------------------------------------------------------------------
  2799.  
  2800.   {$EXTERNALSYM EncoderParameters}
  2801.   EncoderParameters = packed record
  2802.     Count     : UINT;               // Number of parameters in this structure
  2803.     Parameter : array[0..0] of TEncoderParameter;  // Parameter values
  2804.   end;
  2805.   TEncoderParameters = EncoderParameters;
  2806.   PEncoderParameters = ^TEncoderParameters;
  2807.  
  2808. //---------------------------------------------------------------------------
  2809. // Property Item
  2810. //---------------------------------------------------------------------------
  2811.  
  2812.   {$EXTERNALSYM PropertyItem}
  2813.   PropertyItem = record // NOT PACKED !!
  2814.     id       : PROPID;  // ID of this property
  2815.     length   : ULONG;   // Length of the property value, in bytes
  2816.     type_    : WORD;    // Type of the value, as one of TAG_TYPE_XXX
  2817.     value    : Pointer; // property value
  2818.   end;
  2819.   TPropertyItem = PropertyItem;
  2820.   PPropertyItem = ^TPropertyItem;
  2821.  
  2822. //---------------------------------------------------------------------------
  2823. // Image property types
  2824. //---------------------------------------------------------------------------
  2825.  
  2826. const
  2827.   PropertyTagTypeByte      : Integer =  1;
  2828.   {$EXTERNALSYM PropertyTagTypeByte}
  2829.   PropertyTagTypeASCII     : Integer =  2;
  2830.   {$EXTERNALSYM PropertyTagTypeASCII}
  2831.   PropertyTagTypeShort     : Integer =  3;
  2832.   {$EXTERNALSYM PropertyTagTypeShort}
  2833.   PropertyTagTypeLong      : Integer =  4;
  2834.   {$EXTERNALSYM PropertyTagTypeLong}
  2835.   PropertyTagTypeRational  : Integer =  5;
  2836.   {$EXTERNALSYM PropertyTagTypeRational}
  2837.   PropertyTagTypeUndefined : Integer =  7;
  2838.   {$EXTERNALSYM PropertyTagTypeUndefined}
  2839.   PropertyTagTypeSLONG     : Integer =  9;
  2840.   {$EXTERNALSYM PropertyTagTypeSLONG}
  2841.   PropertyTagTypeSRational : Integer = 10;
  2842.   {$EXTERNALSYM PropertyTagTypeSRational}
  2843.  
  2844. //---------------------------------------------------------------------------
  2845. // Image property ID tags
  2846. //---------------------------------------------------------------------------
  2847.  
  2848.   PropertyTagExifIFD            = $8769;
  2849.   {$EXTERNALSYM PropertyTagExifIFD}
  2850.   PropertyTagGpsIFD             = $8825;
  2851.   {$EXTERNALSYM PropertyTagGpsIFD}
  2852.  
  2853.   PropertyTagNewSubfileType     = $00FE;
  2854.   {$EXTERNALSYM PropertyTagNewSubfileType}
  2855.   PropertyTagSubfileType        = $00FF;
  2856.   {$EXTERNALSYM PropertyTagSubfileType}
  2857.   PropertyTagImageWidth         = $0100;
  2858.   {$EXTERNALSYM PropertyTagImageWidth}
  2859.   PropertyTagImageHeight        = $0101;
  2860.   {$EXTERNALSYM PropertyTagImageHeight}
  2861.   PropertyTagBitsPerSample      = $0102;
  2862.   {$EXTERNALSYM PropertyTagBitsPerSample}
  2863.   PropertyTagCompression        = $0103;
  2864.   {$EXTERNALSYM PropertyTagCompression}
  2865.   PropertyTagPhotometricInterp  = $0106;
  2866.   {$EXTERNALSYM PropertyTagPhotometricInterp}
  2867.   PropertyTagThreshHolding      = $0107;
  2868.   {$EXTERNALSYM PropertyTagThreshHolding}
  2869.   PropertyTagCellWidth          = $0108;
  2870.   {$EXTERNALSYM PropertyTagCellWidth}
  2871.   PropertyTagCellHeight         = $0109;
  2872.   {$EXTERNALSYM PropertyTagCellHeight}
  2873.   PropertyTagFillOrder          = $010A;
  2874.   {$EXTERNALSYM PropertyTagFillOrder}
  2875.   PropertyTagDocumentName       = $010D;
  2876.   {$EXTERNALSYM PropertyTagDocumentName}
  2877.   PropertyTagImageDescription   = $010E;
  2878.   {$EXTERNALSYM PropertyTagImageDescription}
  2879.   PropertyTagEquipMake          = $010F;
  2880.   {$EXTERNALSYM PropertyTagEquipMake}
  2881.   PropertyTagEquipModel         = $0110;
  2882.   {$EXTERNALSYM PropertyTagEquipModel}
  2883.   PropertyTagStripOffsets       = $0111;
  2884.   {$EXTERNALSYM PropertyTagStripOffsets}
  2885.   PropertyTagOrientation        = $0112;
  2886.   {$EXTERNALSYM PropertyTagOrientation}
  2887.   PropertyTagSamplesPerPixel    = $0115;
  2888.   {$EXTERNALSYM PropertyTagSamplesPerPixel}
  2889.   PropertyTagRowsPerStrip       = $0116;
  2890.   {$EXTERNALSYM PropertyTagRowsPerStrip}
  2891.   PropertyTagStripBytesCount    = $0117;
  2892.   {$EXTERNALSYM PropertyTagStripBytesCount}
  2893.   PropertyTagMinSampleValue     = $0118;
  2894.   {$EXTERNALSYM PropertyTagMinSampleValue}
  2895.   PropertyTagMaxSampleValue     = $0119;
  2896.   {$EXTERNALSYM PropertyTagMaxSampleValue}
  2897.   PropertyTagXResolution        = $011A;   // Image resolution in width direction
  2898.   {$EXTERNALSYM PropertyTagXResolution}
  2899.   PropertyTagYResolution        = $011B;   // Image resolution in height direction
  2900.   {$EXTERNALSYM PropertyTagYResolution}
  2901.   PropertyTagPlanarConfig       = $011C;   // Image data arrangement
  2902.   {$EXTERNALSYM PropertyTagPlanarConfig}
  2903.   PropertyTagPageName           = $011D;
  2904.   {$EXTERNALSYM PropertyTagPageName}
  2905.   PropertyTagXPosition          = $011E;
  2906.   {$EXTERNALSYM PropertyTagXPosition}
  2907.   PropertyTagYPosition          = $011F;
  2908.   {$EXTERNALSYM PropertyTagYPosition}
  2909.   PropertyTagFreeOffset         = $0120;
  2910.   {$EXTERNALSYM PropertyTagFreeOffset}
  2911.   PropertyTagFreeByteCounts     = $0121;
  2912.   {$EXTERNALSYM PropertyTagFreeByteCounts}
  2913.   PropertyTagGrayResponseUnit   = $0122;
  2914.   {$EXTERNALSYM PropertyTagGrayResponseUnit}
  2915.   PropertyTagGrayResponseCurve  = $0123;
  2916.   {$EXTERNALSYM PropertyTagGrayResponseCurve}
  2917.   PropertyTagT4Option           = $0124;
  2918.   {$EXTERNALSYM PropertyTagT4Option}
  2919.   PropertyTagT6Option           = $0125;
  2920.   {$EXTERNALSYM PropertyTagT6Option}
  2921.   PropertyTagResolutionUnit     = $0128;   // Unit of X and Y resolution
  2922.   {$EXTERNALSYM PropertyTagResolutionUnit}
  2923.   PropertyTagPageNumber         = $0129;
  2924.   {$EXTERNALSYM PropertyTagPageNumber}
  2925.   PropertyTagTransferFuncition  = $012D;
  2926.   {$EXTERNALSYM PropertyTagTransferFuncition}
  2927.   PropertyTagSoftwareUsed       = $0131;
  2928.   {$EXTERNALSYM PropertyTagSoftwareUsed}
  2929.   PropertyTagDateTime           = $0132;
  2930.   {$EXTERNALSYM PropertyTagDateTime}
  2931.   PropertyTagArtist             = $013B;
  2932.   {$EXTERNALSYM PropertyTagArtist}
  2933.   PropertyTagHostComputer       = $013C;
  2934.   {$EXTERNALSYM PropertyTagHostComputer}
  2935.   PropertyTagPredictor          = $013D;
  2936.   {$EXTERNALSYM PropertyTagPredictor}
  2937.   PropertyTagWhitePoint         = $013E;
  2938.   {$EXTERNALSYM PropertyTagWhitePoint}
  2939.   PropertyTagPrimaryChromaticities = $013F;
  2940.   {$EXTERNALSYM PropertyTagPrimaryChromaticities}
  2941.   PropertyTagColorMap           = $0140;
  2942.   {$EXTERNALSYM PropertyTagColorMap}
  2943.   PropertyTagHalftoneHints      = $0141;
  2944.   {$EXTERNALSYM PropertyTagHalftoneHints}
  2945.   PropertyTagTileWidth          = $0142;
  2946.   {$EXTERNALSYM PropertyTagTileWidth}
  2947.   PropertyTagTileLength         = $0143;
  2948.   {$EXTERNALSYM PropertyTagTileLength}
  2949.   PropertyTagTileOffset         = $0144;
  2950.   {$EXTERNALSYM PropertyTagTileOffset}
  2951.   PropertyTagTileByteCounts     = $0145;
  2952.   {$EXTERNALSYM PropertyTagTileByteCounts}
  2953.   PropertyTagInkSet             = $014C;
  2954.   {$EXTERNALSYM PropertyTagInkSet}
  2955.   PropertyTagInkNames           = $014D;
  2956.   {$EXTERNALSYM PropertyTagInkNames}
  2957.   PropertyTagNumberOfInks       = $014E;
  2958.   {$EXTERNALSYM PropertyTagNumberOfInks}
  2959.   PropertyTagDotRange           = $0150;
  2960.   {$EXTERNALSYM PropertyTagDotRange}
  2961.   PropertyTagTargetPrinter      = $0151;
  2962.   {$EXTERNALSYM PropertyTagTargetPrinter}
  2963.   PropertyTagExtraSamples       = $0152;
  2964.   {$EXTERNALSYM PropertyTagExtraSamples}
  2965.   PropertyTagSampleFormat       = $0153;
  2966.   {$EXTERNALSYM PropertyTagSampleFormat}
  2967.   PropertyTagSMinSampleValue    = $0154;
  2968.   {$EXTERNALSYM PropertyTagSMinSampleValue}
  2969.   PropertyTagSMaxSampleValue    = $0155;
  2970.   {$EXTERNALSYM PropertyTagSMaxSampleValue}
  2971.   PropertyTagTransferRange      = $0156;
  2972.   {$EXTERNALSYM PropertyTagTransferRange}
  2973.  
  2974.   PropertyTagJPEGProc               = $0200;
  2975.   {$EXTERNALSYM PropertyTagJPEGProc}
  2976.   PropertyTagJPEGInterFormat        = $0201;
  2977.   {$EXTERNALSYM PropertyTagJPEGInterFormat}
  2978.   PropertyTagJPEGInterLength        = $0202;
  2979.   {$EXTERNALSYM PropertyTagJPEGInterLength}
  2980.   PropertyTagJPEGRestartInterval    = $0203;
  2981.   {$EXTERNALSYM PropertyTagJPEGRestartInterval}
  2982.   PropertyTagJPEGLosslessPredictors = $0205;
  2983.   {$EXTERNALSYM PropertyTagJPEGLosslessPredictors}
  2984.   PropertyTagJPEGPointTransforms    = $0206;
  2985.   {$EXTERNALSYM PropertyTagJPEGPointTransforms}
  2986.   PropertyTagJPEGQTables            = $0207;
  2987.   {$EXTERNALSYM PropertyTagJPEGQTables}
  2988.   PropertyTagJPEGDCTables           = $0208;
  2989.   {$EXTERNALSYM PropertyTagJPEGDCTables}
  2990.   PropertyTagJPEGACTables           = $0209;
  2991.   {$EXTERNALSYM PropertyTagJPEGACTables}
  2992.  
  2993.   PropertyTagYCbCrCoefficients  = $0211;
  2994.   {$EXTERNALSYM PropertyTagYCbCrCoefficients}
  2995.   PropertyTagYCbCrSubsampling   = $0212;
  2996.   {$EXTERNALSYM PropertyTagYCbCrSubsampling}
  2997.   PropertyTagYCbCrPositioning   = $0213;
  2998.   {$EXTERNALSYM PropertyTagYCbCrPositioning}
  2999.   PropertyTagREFBlackWhite      = $0214;
  3000.   {$EXTERNALSYM PropertyTagREFBlackWhite}
  3001.  
  3002.   PropertyTagICCProfile         = $8773;   // This TAG is defined by ICC
  3003.   {$EXTERNALSYM PropertyTagICCProfile}
  3004.                                            // for embedded ICC in TIFF
  3005.   PropertyTagGamma                = $0301;
  3006.   {$EXTERNALSYM PropertyTagGamma}
  3007.   PropertyTagICCProfileDescriptor = $0302;
  3008.   {$EXTERNALSYM PropertyTagICCProfileDescriptor}
  3009.   PropertyTagSRGBRenderingIntent  = $0303;
  3010.   {$EXTERNALSYM PropertyTagSRGBRenderingIntent}
  3011.  
  3012.   PropertyTagImageTitle         = $0320;
  3013.   {$EXTERNALSYM PropertyTagImageTitle}
  3014.   PropertyTagCopyright          = $8298;
  3015.   {$EXTERNALSYM PropertyTagCopyright}
  3016.  
  3017. // Extra TAGs (Like Adobe Image Information tags etc.)
  3018.  
  3019.   PropertyTagResolutionXUnit           = $5001;
  3020.   {$EXTERNALSYM PropertyTagResolutionXUnit}
  3021.   PropertyTagResolutionYUnit           = $5002;
  3022.   {$EXTERNALSYM PropertyTagResolutionYUnit}
  3023.   PropertyTagResolutionXLengthUnit     = $5003;
  3024.   {$EXTERNALSYM PropertyTagResolutionXLengthUnit}
  3025.   PropertyTagResolutionYLengthUnit     = $5004;
  3026.   {$EXTERNALSYM PropertyTagResolutionYLengthUnit}
  3027.   PropertyTagPrintFlags                = $5005;
  3028.   {$EXTERNALSYM PropertyTagPrintFlags}
  3029.   PropertyTagPrintFlagsVersion         = $5006;
  3030.   {$EXTERNALSYM PropertyTagPrintFlagsVersion}
  3031.   PropertyTagPrintFlagsCrop            = $5007;
  3032.   {$EXTERNALSYM PropertyTagPrintFlagsCrop}
  3033.   PropertyTagPrintFlagsBleedWidth      = $5008;
  3034.   {$EXTERNALSYM PropertyTagPrintFlagsBleedWidth}
  3035.   PropertyTagPrintFlagsBleedWidthScale = $5009;
  3036.   {$EXTERNALSYM PropertyTagPrintFlagsBleedWidthScale}
  3037.   PropertyTagHalftoneLPI               = $500A;
  3038.   {$EXTERNALSYM PropertyTagHalftoneLPI}
  3039.   PropertyTagHalftoneLPIUnit           = $500B;
  3040.   {$EXTERNALSYM PropertyTagHalftoneLPIUnit}
  3041.   PropertyTagHalftoneDegree            = $500C;
  3042.   {$EXTERNALSYM PropertyTagHalftoneDegree}
  3043.   PropertyTagHalftoneShape             = $500D;
  3044.   {$EXTERNALSYM PropertyTagHalftoneShape}
  3045.   PropertyTagHalftoneMisc              = $500E;
  3046.   {$EXTERNALSYM PropertyTagHalftoneMisc}
  3047.   PropertyTagHalftoneScreen            = $500F;
  3048.   {$EXTERNALSYM PropertyTagHalftoneScreen}
  3049.   PropertyTagJPEGQuality               = $5010;
  3050.   {$EXTERNALSYM PropertyTagJPEGQuality}
  3051.   PropertyTagGridSize                  = $5011;
  3052.   {$EXTERNALSYM PropertyTagGridSize}
  3053.   PropertyTagThumbnailFormat           = $5012;  // 1 = JPEG, 0 = RAW RGB
  3054.   {$EXTERNALSYM PropertyTagThumbnailFormat}
  3055.   PropertyTagThumbnailWidth            = $5013;
  3056.   {$EXTERNALSYM PropertyTagThumbnailWidth}
  3057.   PropertyTagThumbnailHeight           = $5014;
  3058.   {$EXTERNALSYM PropertyTagThumbnailHeight}
  3059.   PropertyTagThumbnailColorDepth       = $5015;
  3060.   {$EXTERNALSYM PropertyTagThumbnailColorDepth}
  3061.   PropertyTagThumbnailPlanes           = $5016;
  3062.   {$EXTERNALSYM PropertyTagThumbnailPlanes}
  3063.   PropertyTagThumbnailRawBytes         = $5017;
  3064.   {$EXTERNALSYM PropertyTagThumbnailRawBytes}
  3065.   PropertyTagThumbnailSize             = $5018;
  3066.   {$EXTERNALSYM PropertyTagThumbnailSize}
  3067.   PropertyTagThumbnailCompressedSize   = $5019;
  3068.   {$EXTERNALSYM PropertyTagThumbnailCompressedSize}
  3069.   PropertyTagColorTransferFunction     = $501A;
  3070.   {$EXTERNALSYM PropertyTagColorTransferFunction}
  3071.   PropertyTagThumbnailData             = $501B;    // RAW thumbnail bits in
  3072.   {$EXTERNALSYM PropertyTagThumbnailData}
  3073.                                                    // JPEG format or RGB format
  3074.                                                    // depends on
  3075.                                                    // PropertyTagThumbnailFormat
  3076.  
  3077.   // Thumbnail related TAGs
  3078.  
  3079.   PropertyTagThumbnailImageWidth        = $5020;   // Thumbnail width
  3080.   {$EXTERNALSYM PropertyTagThumbnailImageWidth}
  3081.   PropertyTagThumbnailImageHeight       = $5021;   // Thumbnail height
  3082.   {$EXTERNALSYM PropertyTagThumbnailImageHeight}
  3083.   PropertyTagThumbnailBitsPerSample     = $5022;   // Number of bits per
  3084.   {$EXTERNALSYM PropertyTagThumbnailBitsPerSample}
  3085.                                                    // component
  3086.   PropertyTagThumbnailCompression       = $5023;   // Compression Scheme
  3087.   {$EXTERNALSYM PropertyTagThumbnailCompression}
  3088.   PropertyTagThumbnailPhotometricInterp = $5024;   // Pixel composition
  3089.   {$EXTERNALSYM PropertyTagThumbnailPhotometricInterp}
  3090.   PropertyTagThumbnailImageDescription  = $5025;   // Image Tile
  3091.   {$EXTERNALSYM PropertyTagThumbnailImageDescription}
  3092.   PropertyTagThumbnailEquipMake         = $5026;   // Manufacturer of Image
  3093.   {$EXTERNALSYM PropertyTagThumbnailEquipMake}
  3094.                                                    // Input equipment
  3095.   PropertyTagThumbnailEquipModel        = $5027;   // Model of Image input
  3096.   {$EXTERNALSYM PropertyTagThumbnailEquipModel}
  3097.                                                    // equipment
  3098.   PropertyTagThumbnailStripOffsets    = $5028;  // Image data location
  3099.   {$EXTERNALSYM PropertyTagThumbnailStripOffsets}
  3100.   PropertyTagThumbnailOrientation     = $5029;  // Orientation of image
  3101.   {$EXTERNALSYM PropertyTagThumbnailOrientation}
  3102.   PropertyTagThumbnailSamplesPerPixel = $502A;  // Number of components
  3103.   {$EXTERNALSYM PropertyTagThumbnailSamplesPerPixel}
  3104.   PropertyTagThumbnailRowsPerStrip    = $502B;  // Number of rows per strip
  3105.   {$EXTERNALSYM PropertyTagThumbnailRowsPerStrip}
  3106.   PropertyTagThumbnailStripBytesCount = $502C;  // Bytes per compressed
  3107.   {$EXTERNALSYM PropertyTagThumbnailStripBytesCount}
  3108.                                                 // strip
  3109.   PropertyTagThumbnailResolutionX     = $502D;  // Resolution in width
  3110.   {$EXTERNALSYM PropertyTagThumbnailResolutionX}
  3111.                                                 // direction
  3112.   PropertyTagThumbnailResolutionY     = $502E;  // Resolution in height
  3113.   {$EXTERNALSYM PropertyTagThumbnailResolutionY}
  3114.                                                 // direction
  3115.   PropertyTagThumbnailPlanarConfig    = $502F;  // Image data arrangement
  3116.   {$EXTERNALSYM PropertyTagThumbnailPlanarConfig}
  3117.   PropertyTagThumbnailResolutionUnit  = $5030;  // Unit of X and Y
  3118.   {$EXTERNALSYM PropertyTagThumbnailResolutionUnit}
  3119.                                                 // Resolution
  3120.   PropertyTagThumbnailTransferFunction = $5031;  // Transfer function
  3121.   {$EXTERNALSYM PropertyTagThumbnailTransferFunction}
  3122.   PropertyTagThumbnailSoftwareUsed     = $5032;  // Software used
  3123.   {$EXTERNALSYM PropertyTagThumbnailSoftwareUsed}
  3124.   PropertyTagThumbnailDateTime         = $5033;  // File change date and
  3125.   {$EXTERNALSYM PropertyTagThumbnailDateTime}
  3126.                                                  // time
  3127.   PropertyTagThumbnailArtist          = $5034;  // Person who created the
  3128.   {$EXTERNALSYM PropertyTagThumbnailArtist}
  3129.                                                 // image
  3130.   PropertyTagThumbnailWhitePoint      = $5035;  // White point chromaticity
  3131.   {$EXTERNALSYM PropertyTagThumbnailWhitePoint}
  3132.   PropertyTagThumbnailPrimaryChromaticities = $5036;
  3133.   {$EXTERNALSYM PropertyTagThumbnailPrimaryChromaticities}
  3134.                                                     // Chromaticities of
  3135.                                                     // primaries
  3136.   PropertyTagThumbnailYCbCrCoefficients = $5037; // Color space transforma-
  3137.   {$EXTERNALSYM PropertyTagThumbnailYCbCrCoefficients}
  3138.                                                  // tion coefficients
  3139.   PropertyTagThumbnailYCbCrSubsampling = $5038;  // Subsampling ratio of Y
  3140.   {$EXTERNALSYM PropertyTagThumbnailYCbCrSubsampling}
  3141.                                                  // to C
  3142.   PropertyTagThumbnailYCbCrPositioning = $5039;  // Y and C position
  3143.   {$EXTERNALSYM PropertyTagThumbnailYCbCrPositioning}
  3144.   PropertyTagThumbnailRefBlackWhite    = $503A;  // Pair of black and white
  3145.   {$EXTERNALSYM PropertyTagThumbnailRefBlackWhite}
  3146.                                                  // reference values
  3147.   PropertyTagThumbnailCopyRight       = $503B;   // CopyRight holder
  3148.   {$EXTERNALSYM PropertyTagThumbnailCopyRight}
  3149.  
  3150.   PropertyTagLuminanceTable           = $5090;
  3151.   {$EXTERNALSYM PropertyTagLuminanceTable}
  3152.   PropertyTagChrominanceTable         = $5091;
  3153.   {$EXTERNALSYM PropertyTagChrominanceTable}
  3154.  
  3155.   PropertyTagFrameDelay               = $5100;
  3156.   {$EXTERNALSYM PropertyTagFrameDelay}
  3157.   PropertyTagLoopCount                = $5101;
  3158.   {$EXTERNALSYM PropertyTagLoopCount}
  3159.  
  3160.   PropertyTagPixelUnit         = $5110;  // Unit specifier for pixel/unit
  3161.   {$EXTERNALSYM PropertyTagPixelUnit}
  3162.   PropertyTagPixelPerUnitX     = $5111;  // Pixels per unit in X
  3163.   {$EXTERNALSYM PropertyTagPixelPerUnitX}
  3164.   PropertyTagPixelPerUnitY     = $5112;  // Pixels per unit in Y
  3165.   {$EXTERNALSYM PropertyTagPixelPerUnitY}
  3166.   PropertyTagPaletteHistogram  = $5113;  // Palette histogram
  3167.   {$EXTERNALSYM PropertyTagPaletteHistogram}
  3168.  
  3169.   // EXIF specific tag
  3170.  
  3171.   PropertyTagExifExposureTime  = $829A;
  3172.   {$EXTERNALSYM PropertyTagExifExposureTime}
  3173.   PropertyTagExifFNumber       = $829D;
  3174.   {$EXTERNALSYM PropertyTagExifFNumber}
  3175.  
  3176.   PropertyTagExifExposureProg  = $8822;
  3177.   {$EXTERNALSYM PropertyTagExifExposureProg}
  3178.   PropertyTagExifSpectralSense = $8824;
  3179.   {$EXTERNALSYM PropertyTagExifSpectralSense}
  3180.   PropertyTagExifISOSpeed      = $8827;
  3181.   {$EXTERNALSYM PropertyTagExifISOSpeed}
  3182.   PropertyTagExifOECF          = $8828;
  3183.   {$EXTERNALSYM PropertyTagExifOECF}
  3184.  
  3185.   PropertyTagExifVer           = $9000;
  3186.   {$EXTERNALSYM PropertyTagExifVer}
  3187.   PropertyTagExifDTOrig        = $9003; // Date & time of original
  3188.   {$EXTERNALSYM PropertyTagExifDTOrig}
  3189.   PropertyTagExifDTDigitized   = $9004; // Date & time of digital data generation
  3190.   {$EXTERNALSYM PropertyTagExifDTDigitized}
  3191.  
  3192.   PropertyTagExifCompConfig    = $9101;
  3193.   {$EXTERNALSYM PropertyTagExifCompConfig}
  3194.   PropertyTagExifCompBPP       = $9102;
  3195.   {$EXTERNALSYM PropertyTagExifCompBPP}
  3196.  
  3197.   PropertyTagExifShutterSpeed  = $9201;
  3198.   {$EXTERNALSYM PropertyTagExifShutterSpeed}
  3199.   PropertyTagExifAperture      = $9202;
  3200.   {$EXTERNALSYM PropertyTagExifAperture}
  3201.   PropertyTagExifBrightness    = $9203;
  3202.   {$EXTERNALSYM PropertyTagExifBrightness}
  3203.   PropertyTagExifExposureBias  = $9204;
  3204.   {$EXTERNALSYM PropertyTagExifExposureBias}
  3205.   PropertyTagExifMaxAperture   = $9205;
  3206.   {$EXTERNALSYM PropertyTagExifMaxAperture}
  3207.   PropertyTagExifSubjectDist   = $9206;
  3208.   {$EXTERNALSYM PropertyTagExifSubjectDist}
  3209.   PropertyTagExifMeteringMode  = $9207;
  3210.   {$EXTERNALSYM PropertyTagExifMeteringMode}
  3211.   PropertyTagExifLightSource   = $9208;
  3212.   {$EXTERNALSYM PropertyTagExifLightSource}
  3213.   PropertyTagExifFlash         = $9209;
  3214.   {$EXTERNALSYM PropertyTagExifFlash}
  3215.   PropertyTagExifFocalLength   = $920A;
  3216.   {$EXTERNALSYM PropertyTagExifFocalLength}
  3217.   PropertyTagExifMakerNote     = $927C;
  3218.   {$EXTERNALSYM PropertyTagExifMakerNote}
  3219.   PropertyTagExifUserComment   = $9286;
  3220.   {$EXTERNALSYM PropertyTagExifUserComment}
  3221.   PropertyTagExifDTSubsec      = $9290;  // Date & Time subseconds
  3222.   {$EXTERNALSYM PropertyTagExifDTSubsec}
  3223.   PropertyTagExifDTOrigSS      = $9291;  // Date & Time original subseconds
  3224.   {$EXTERNALSYM PropertyTagExifDTOrigSS}
  3225.   PropertyTagExifDTDigSS       = $9292;  // Date & TIme digitized subseconds
  3226.   {$EXTERNALSYM PropertyTagExifDTDigSS}
  3227.  
  3228.   PropertyTagExifFPXVer        = $A000;
  3229.   {$EXTERNALSYM PropertyTagExifFPXVer}
  3230.   PropertyTagExifColorSpace    = $A001;
  3231.   {$EXTERNALSYM PropertyTagExifColorSpace}
  3232.   PropertyTagExifPixXDim       = $A002;
  3233.   {$EXTERNALSYM PropertyTagExifPixXDim}
  3234.   PropertyTagExifPixYDim       = $A003;
  3235.   {$EXTERNALSYM PropertyTagExifPixYDim}
  3236.   PropertyTagExifRelatedWav    = $A004;  // related sound file
  3237.   {$EXTERNALSYM PropertyTagExifRelatedWav}
  3238.   PropertyTagExifInterop       = $A005;
  3239.   {$EXTERNALSYM PropertyTagExifInterop}
  3240.   PropertyTagExifFlashEnergy   = $A20B;
  3241.   {$EXTERNALSYM PropertyTagExifFlashEnergy}
  3242.   PropertyTagExifSpatialFR     = $A20C;  // Spatial Frequency Response
  3243.   {$EXTERNALSYM PropertyTagExifSpatialFR}
  3244.   PropertyTagExifFocalXRes     = $A20E;  // Focal Plane X Resolution
  3245.   {$EXTERNALSYM PropertyTagExifFocalXRes}
  3246.   PropertyTagExifFocalYRes     = $A20F;  // Focal Plane Y Resolution
  3247.   {$EXTERNALSYM PropertyTagExifFocalYRes}
  3248.   PropertyTagExifFocalResUnit  = $A210;  // Focal Plane Resolution Unit
  3249.   {$EXTERNALSYM PropertyTagExifFocalResUnit}
  3250.   PropertyTagExifSubjectLoc    = $A214;
  3251.   {$EXTERNALSYM PropertyTagExifSubjectLoc}
  3252.   PropertyTagExifExposureIndex = $A215;
  3253.   {$EXTERNALSYM PropertyTagExifExposureIndex}
  3254.   PropertyTagExifSensingMethod = $A217;
  3255.   {$EXTERNALSYM PropertyTagExifSensingMethod}
  3256.   PropertyTagExifFileSource    = $A300;
  3257.   {$EXTERNALSYM PropertyTagExifFileSource}
  3258.   PropertyTagExifSceneType     = $A301;
  3259.   {$EXTERNALSYM PropertyTagExifSceneType}
  3260.   PropertyTagExifCfaPattern    = $A302;
  3261.   {$EXTERNALSYM PropertyTagExifCfaPattern}
  3262.  
  3263.   PropertyTagGpsVer            = $0000;
  3264.   {$EXTERNALSYM PropertyTagGpsVer}
  3265.   PropertyTagGpsLatitudeRef    = $0001;
  3266.   {$EXTERNALSYM PropertyTagGpsLatitudeRef}
  3267.   PropertyTagGpsLatitude       = $0002;
  3268.   {$EXTERNALSYM PropertyTagGpsLatitude}
  3269.   PropertyTagGpsLongitudeRef   = $0003;
  3270.   {$EXTERNALSYM PropertyTagGpsLongitudeRef}
  3271.   PropertyTagGpsLongitude      = $0004;
  3272.   {$EXTERNALSYM PropertyTagGpsLongitude}
  3273.   PropertyTagGpsAltitudeRef    = $0005;
  3274.   {$EXTERNALSYM PropertyTagGpsAltitudeRef}
  3275.   PropertyTagGpsAltitude       = $0006;
  3276.   {$EXTERNALSYM PropertyTagGpsAltitude}
  3277.   PropertyTagGpsGpsTime        = $0007;
  3278.   {$EXTERNALSYM PropertyTagGpsGpsTime}
  3279.   PropertyTagGpsGpsSatellites  = $0008;
  3280.   {$EXTERNALSYM PropertyTagGpsGpsSatellites}
  3281.   PropertyTagGpsGpsStatus      = $0009;
  3282.   {$EXTERNALSYM PropertyTagGpsGpsStatus}
  3283.   PropertyTagGpsGpsMeasureMode = $00A;
  3284.   {$EXTERNALSYM PropertyTagGpsGpsMeasureMode}
  3285.   PropertyTagGpsGpsDop         = $000B;  // Measurement precision
  3286.   {$EXTERNALSYM PropertyTagGpsGpsDop}
  3287.   PropertyTagGpsSpeedRef       = $000C;
  3288.   {$EXTERNALSYM PropertyTagGpsSpeedRef}
  3289.   PropertyTagGpsSpeed          = $000D;
  3290.   {$EXTERNALSYM PropertyTagGpsSpeed}
  3291.   PropertyTagGpsTrackRef       = $000E;
  3292.   {$EXTERNALSYM PropertyTagGpsTrackRef}
  3293.   PropertyTagGpsTrack          = $000F;
  3294.   {$EXTERNALSYM PropertyTagGpsTrack}
  3295.   PropertyTagGpsImgDirRef      = $0010;
  3296.   {$EXTERNALSYM PropertyTagGpsImgDirRef}
  3297.   PropertyTagGpsImgDir         = $0011;
  3298.   {$EXTERNALSYM PropertyTagGpsImgDir}
  3299.   PropertyTagGpsMapDatum       = $0012;
  3300.   {$EXTERNALSYM PropertyTagGpsMapDatum}
  3301.   PropertyTagGpsDestLatRef     = $0013;
  3302.   {$EXTERNALSYM PropertyTagGpsDestLatRef}
  3303.   PropertyTagGpsDestLat        = $0014;
  3304.   {$EXTERNALSYM PropertyTagGpsDestLat}
  3305.   PropertyTagGpsDestLongRef    = $0015;
  3306.   {$EXTERNALSYM PropertyTagGpsDestLongRef}
  3307.   PropertyTagGpsDestLong       = $0016;
  3308.   {$EXTERNALSYM PropertyTagGpsDestLong}
  3309.   PropertyTagGpsDestBearRef    = $0017;
  3310.   {$EXTERNALSYM PropertyTagGpsDestBearRef}
  3311.   PropertyTagGpsDestBear       = $0018;
  3312.   {$EXTERNALSYM PropertyTagGpsDestBear}
  3313.   PropertyTagGpsDestDistRef    = $0019;
  3314.   {$EXTERNALSYM PropertyTagGpsDestDistRef}
  3315.   PropertyTagGpsDestDist       = $001A;
  3316.   {$EXTERNALSYM PropertyTagGpsDestDist}
  3317.  
  3318. (**************************************************************************\
  3319. *
  3320. *  GDI+ Color Matrix object, used with Graphics.DrawImage
  3321. *
  3322. \**************************************************************************)
  3323.  
  3324. //----------------------------------------------------------------------------
  3325. // Color matrix
  3326. //----------------------------------------------------------------------------
  3327.  
  3328. type
  3329.   {$EXTERNALSYM ColorMatrix}
  3330.   ColorMatrix = packed array[0..4, 0..4] of Single;
  3331.   TColorMatrix = ColorMatrix;
  3332.   PColorMatrix = ^TColorMatrix;
  3333.  
  3334. //----------------------------------------------------------------------------
  3335. // Color Matrix flags
  3336. //----------------------------------------------------------------------------
  3337.  
  3338.   {$EXTERNALSYM ColorMatrixFlags}
  3339.   ColorMatrixFlags = (
  3340.     ColorMatrixFlagsDefault,
  3341.     ColorMatrixFlagsSkipGrays,
  3342.     ColorMatrixFlagsAltGray
  3343.   );
  3344.   TColorMatrixFlags = ColorMatrixFlags;
  3345.  
  3346. //----------------------------------------------------------------------------
  3347. // Color Adjust Type
  3348. //----------------------------------------------------------------------------
  3349.  
  3350.   {$EXTERNALSYM ColorAdjustType}
  3351.   ColorAdjustType = (
  3352.     ColorAdjustTypeDefault,
  3353.     ColorAdjustTypeBitmap,
  3354.     ColorAdjustTypeBrush,
  3355.     ColorAdjustTypePen,
  3356.     ColorAdjustTypeText,
  3357.     ColorAdjustTypeCount,
  3358.     ColorAdjustTypeAny      // Reserved
  3359.   );
  3360.   TColorAdjustType = ColorAdjustType;
  3361.  
  3362. //----------------------------------------------------------------------------
  3363. // Color Map
  3364. //----------------------------------------------------------------------------
  3365.  
  3366.   {$EXTERNALSYM ColorMap}
  3367.   ColorMap = packed record
  3368.     oldColor: TGPColor;
  3369.     newColor: TGPColor;
  3370.   end;
  3371.   TColorMap = ColorMap;
  3372.   PColorMap = ^TColorMap;
  3373.  
  3374. //---------------------------------------------------------------------------
  3375. // Private GDI+ classes for internal type checking
  3376. //---------------------------------------------------------------------------
  3377.  
  3378.   GpGraphics = Pointer;
  3379.  
  3380.   GpBrush = Pointer;
  3381.   GpTexture = Pointer;
  3382.   GpSolidFill = Pointer;
  3383.   GpLineGradient = Pointer;
  3384.   GpPathGradient = Pointer;
  3385.   GpHatch =  Pointer;
  3386.  
  3387.   GpPen = Pointer;
  3388.   GpCustomLineCap = Pointer;
  3389.   GpAdjustableArrowCap = Pointer;
  3390.  
  3391.   GpImage = Pointer;
  3392.   GpBitmap = Pointer;
  3393.   GpMetafile = Pointer;
  3394.   GpImageAttributes = Pointer;
  3395.  
  3396.   GpPath = Pointer;
  3397.   GpRegion = Pointer;
  3398.   GpPathIterator = Pointer;
  3399.  
  3400.   GpFontFamily = Pointer;
  3401.   GpFont = Pointer;
  3402.   GpStringFormat = Pointer;
  3403.   GpFontCollection = Pointer;
  3404.   GpCachedBitmap = Pointer;
  3405.  
  3406.   GpStatus          = TStatus;
  3407.   GpFillMode        = TFillMode;
  3408.   GpWrapMode        = TWrapMode;
  3409.   GpUnit            = TUnit;
  3410.   GpCoordinateSpace = TCoordinateSpace;
  3411.   GpPointF          = PGPPointF;
  3412.   GpPoint           = PGPPoint;
  3413.   GpRectF           = PGPRectF;
  3414.   GpRect            = PGPRect;
  3415.   GpSizeF           = PGPSizeF;
  3416.   GpHatchStyle      = THatchStyle;
  3417.   GpDashStyle       = TDashStyle;
  3418.   GpLineCap         = TLineCap;
  3419.   GpDashCap         = TDashCap;
  3420.  
  3421.   GpPenAlignment    = TPenAlignment;
  3422.  
  3423.   GpLineJoin        = TLineJoin;
  3424.   GpPenType         = TPenType;
  3425.  
  3426.   GpMatrix          = Pointer; 
  3427.   GpBrushType       = TBrushType;
  3428.   GpMatrixOrder     = TMatrixOrder;
  3429.   GpFlushIntention  = TFlushIntention;
  3430.   GpPathData        = TPathData;
  3431.  
  3432. (**************************************************************************\
  3433. *
  3434. * Copyright (c) 1998-2001, Microsoft Corp.  All Rights Reserved.
  3435. * Module Name:
  3436. *   GdiplusFlat.h
  3437. * Abstract:
  3438. *   Private GDI+ header file.
  3439. *
  3440. \**************************************************************************)
  3441.  
  3442.   function GdipCreatePath(brushMode: GPFILLMODE;
  3443.     out path: GPPATH): GPSTATUS; stdcall;
  3444.   {$EXTERNALSYM GdipCreatePath}
  3445.  
  3446.   function GdipCreatePath2(v1: GPPOINTF; v2: PBYTE; v3: Integer; v4: GPFILLMODE;
  3447.     out path: GPPATH): GPSTATUS; stdcall;
  3448.   {$EXTERNALSYM GdipCreatePath2}
  3449.  
  3450.   function GdipCreatePath2I(v1: GPPOINT; v2: PBYTE; v3: Integer; v4: GPFILLMODE;
  3451.     out path: GPPATH): GPSTATUS; stdcall;
  3452.   {$EXTERNALSYM GdipCreatePath2I}
  3453.  
  3454.   function GdipClonePath(path: GPPATH;
  3455.     out clonePath: GPPATH): GPSTATUS; stdcall;
  3456.   {$EXTERNALSYM GdipClonePath}
  3457.  
  3458.   function GdipDeletePath(path: GPPATH): GPSTATUS; stdcall;
  3459.   {$EXTERNALSYM GdipDeletePath}
  3460.  
  3461.   function GdipResetPath(path: GPPATH): GPSTATUS; stdcall;
  3462.   {$EXTERNALSYM GdipResetPath}
  3463.  
  3464.   function GdipGetPointCount(path: GPPATH;
  3465.     out count: Integer): GPSTATUS; stdcall;
  3466.   {$EXTERNALSYM GdipGetPointCount}
  3467.  
  3468.   function GdipGetPathTypes(path: GPPATH; types: PBYTE;
  3469.     count: Integer): GPSTATUS; stdcall;
  3470.   {$EXTERNALSYM GdipGetPathTypes}
  3471.  
  3472.   function GdipGetPathPoints(v1: GPPATH; points: GPPOINTF;
  3473.     count: Integer): GPSTATUS; stdcall;
  3474.   {$EXTERNALSYM GdipGetPathPoints}
  3475.  
  3476.   function GdipGetPathPointsI(v1: GPPATH; points: GPPOINT;
  3477.              count: Integer): GPSTATUS; stdcall;
  3478.   {$EXTERNALSYM GdipGetPathPointsI}
  3479.  
  3480.   function GdipGetPathFillMode(path: GPPATH;
  3481.     var fillmode: GPFILLMODE): GPSTATUS; stdcall;
  3482.   {$EXTERNALSYM GdipGetPathFillMode}
  3483.  
  3484.   function GdipSetPathFillMode(path: GPPATH;
  3485.     fillmode: GPFILLMODE): GPSTATUS; stdcall;
  3486.   {$EXTERNALSYM GdipSetPathFillMode}
  3487.  
  3488.   function GdipGetPathData(path: GPPATH;
  3489.     pathData: Pointer): GPSTATUS; stdcall;
  3490.   {$EXTERNALSYM GdipGetPathData}
  3491.  
  3492.   function GdipStartPathFigure(path: GPPATH): GPSTATUS; stdcall;
  3493.   {$EXTERNALSYM GdipStartPathFigure}
  3494.  
  3495.   function GdipClosePathFigure(path: GPPATH): GPSTATUS; stdcall;
  3496.   {$EXTERNALSYM GdipClosePathFigure}
  3497.  
  3498.   function GdipClosePathFigures(path: GPPATH): GPSTATUS; stdcall;
  3499.   {$EXTERNALSYM GdipClosePathFigures}
  3500.  
  3501.   function GdipSetPathMarker(path: GPPATH): GPSTATUS; stdcall;
  3502.   {$EXTERNALSYM GdipSetPathMarker}
  3503.  
  3504.   function GdipClearPathMarkers(path: GPPATH): GPSTATUS; stdcall;
  3505.   {$EXTERNALSYM GdipClearPathMarkers}
  3506.  
  3507.   function GdipReversePath(path: GPPATH): GPSTATUS; stdcall;
  3508.   {$EXTERNALSYM GdipReversePath}
  3509.  
  3510.   function GdipGetPathLastPoint(path: GPPATH;
  3511.     lastPoint: GPPOINTF): GPSTATUS; stdcall;
  3512.   {$EXTERNALSYM GdipGetPathLastPoint}
  3513.  
  3514.   function GdipAddPathLine(path: GPPATH;
  3515.     x1, y1, x2, y2: Single): GPSTATUS; stdcall;
  3516.   {$EXTERNALSYM GdipAddPathLine}
  3517.  
  3518.   function GdipAddPathLine2(path: GPPATH; points: GPPOINTF;
  3519.     count: Integer): GPSTATUS; stdcall;
  3520.   {$EXTERNALSYM GdipAddPathLine2}
  3521.  
  3522.   function GdipAddPathArc(path: GPPATH; x, y, width, height, startAngle,
  3523.     sweepAngle: Single): GPSTATUS; stdcall;
  3524.   {$EXTERNALSYM GdipAddPathArc}
  3525.  
  3526.   function GdipAddPathBezier(path: GPPATH;
  3527.     x1, y1, x2, y2, x3, y3, x4, y4: Single): GPSTATUS; stdcall;
  3528.   {$EXTERNALSYM GdipAddPathBezier}
  3529.  
  3530.   function GdipAddPathBeziers(path: GPPATH; points: GPPOINTF;
  3531.     count: Integer): GPSTATUS; stdcall;
  3532.   {$EXTERNALSYM GdipAddPathBeziers}
  3533.  
  3534.   function GdipAddPathCurve(path: GPPATH; points: GPPOINTF;
  3535.     count: Integer): GPSTATUS; stdcall;
  3536.   {$EXTERNALSYM GdipAddPathCurve}
  3537.  
  3538.   function GdipAddPathCurve2(path: GPPATH; points: GPPOINTF; count: Integer;
  3539.     tension: Single): GPSTATUS; stdcall;
  3540.   {$EXTERNALSYM GdipAddPathCurve2}
  3541.  
  3542.   function GdipAddPathCurve3(path: GPPATH; points: GPPOINTF; count: Integer;
  3543.     offset: Integer; numberOfSegments: Integer;
  3544.     tension: Single): GPSTATUS; stdcall;
  3545.   {$EXTERNALSYM GdipAddPathCurve3}
  3546.  
  3547.   function GdipAddPathClosedCurve(path: GPPATH; points: GPPOINTF;
  3548.     count: Integer): GPSTATUS; stdcall;
  3549.   {$EXTERNALSYM GdipAddPathClosedCurve}
  3550.  
  3551.   function GdipAddPathClosedCurve2(path: GPPATH; points: GPPOINTF;
  3552.     count: Integer; tension: Single): GPSTATUS; stdcall;
  3553.   {$EXTERNALSYM GdipAddPathClosedCurve2}
  3554.  
  3555.   function GdipAddPathRectangle(path: GPPATH; x: Single; y: Single;
  3556.     width: Single; height: Single): GPSTATUS; stdcall;
  3557.   {$EXTERNALSYM GdipAddPathRectangle}
  3558.  
  3559.   function GdipAddPathRectangles(path: GPPATH; rects: GPRECTF;
  3560.     count: Integer): GPSTATUS; stdcall;
  3561.   {$EXTERNALSYM GdipAddPathRectangles}
  3562.  
  3563.   function GdipAddPathEllipse(path: GPPATH;  x: Single; y: Single;
  3564.     width: Single; height: Single): GPSTATUS; stdcall;
  3565.   {$EXTERNALSYM GdipAddPathEllipse}
  3566.  
  3567.   function GdipAddPathPie(path: GPPATH; x: Single; y: Single; width: Single;
  3568.     height: Single; startAngle: Single; sweepAngle: Single): GPSTATUS; stdcall;
  3569.   {$EXTERNALSYM GdipAddPathPie}
  3570.  
  3571.   function GdipAddPathPolygon(path: GPPATH; points: GPPOINTF;
  3572.     count: Integer): GPSTATUS; stdcall;
  3573.   {$EXTERNALSYM GdipAddPathPolygon}
  3574.  
  3575.   function GdipAddPathPath(path: GPPATH; addingPath: GPPATH;
  3576.     connect: Bool): GPSTATUS; stdcall;
  3577.   {$EXTERNALSYM GdipAddPathPath}
  3578.  
  3579.   function GdipAddPathString(path: GPPATH; string_: PWCHAR; length: Integer;
  3580.     family: GPFONTFAMILY; style: Integer; emSize: Single; layoutRect: PGPRectF;
  3581.     format: GPSTRINGFORMAT): GPSTATUS; stdcall;
  3582.   {$EXTERNALSYM GdipAddPathString}
  3583.  
  3584.   function GdipAddPathStringI(path: GPPATH; string_: PWCHAR; length: Integer;
  3585.     family: GPFONTFAMILY; style: Integer; emSize: Single; layoutRect: PGPRect;
  3586.     format: GPSTRINGFORMAT): GPSTATUS; stdcall;
  3587.   {$EXTERNALSYM GdipAddPathStringI}
  3588.  
  3589.   function GdipAddPathLineI(path: GPPATH; x1: Integer; y1: Integer; x2: Integer;
  3590.     y2: Integer): GPSTATUS; stdcall;
  3591.   {$EXTERNALSYM GdipAddPathLineI}
  3592.  
  3593.   function GdipAddPathLine2I(path: GPPATH; points: GPPOINT;
  3594.     count: Integer): GPSTATUS; stdcall;
  3595.   {$EXTERNALSYM GdipAddPathLine2I}
  3596.  
  3597.   function GdipAddPathArcI(path: GPPATH; x: Integer; y: Integer; width: Integer;
  3598.     height: Integer; startAngle: Single; sweepAngle: Single): GPSTATUS; stdcall;
  3599.   {$EXTERNALSYM GdipAddPathArcI}
  3600.  
  3601.   function GdipAddPathBezierI(path: GPPATH; x1: Integer; y1: Integer;
  3602.     x2: Integer; y2: Integer; x3: Integer; y3: Integer; x4: Integer;
  3603.     y4: Integer): GPSTATUS; stdcall;
  3604.   {$EXTERNALSYM GdipAddPathBezierI}
  3605.  
  3606.   function GdipAddPathBeziersI(path: GPPATH; points: GPPOINT;
  3607.     count: Integer): GPSTATUS; stdcall;
  3608.   {$EXTERNALSYM GdipAddPathBeziersI}
  3609.  
  3610.   function GdipAddPathCurveI(path: GPPATH; points: GPPOINT;
  3611.     count: Integer): GPSTATUS; stdcall;
  3612.   {$EXTERNALSYM GdipAddPathCurveI}
  3613.  
  3614.   function GdipAddPathCurve2I(path: GPPATH; points: GPPOINT; count: Integer;
  3615.     tension: Single): GPSTATUS; stdcall;
  3616.   {$EXTERNALSYM GdipAddPathCurve2I}
  3617.  
  3618.   function GdipAddPathCurve3I(path: GPPATH; points: GPPOINT; count: Integer;
  3619.     offset: Integer; numberOfSegments: Integer;
  3620.     tension: Single): GPSTATUS; stdcall;
  3621.   {$EXTERNALSYM GdipAddPathCurve3I}
  3622.  
  3623.   function GdipAddPathClosedCurveI(path: GPPATH; points: GPPOINT;
  3624.     count: Integer): GPSTATUS; stdcall;
  3625.   {$EXTERNALSYM GdipAddPathClosedCurveI}
  3626.  
  3627.   function GdipAddPathClosedCurve2I(path: GPPATH; points: GPPOINT;
  3628.     count: Integer; tension: Single): GPSTATUS; stdcall;
  3629.   {$EXTERNALSYM GdipAddPathClosedCurve2I}
  3630.  
  3631.   function GdipAddPathRectangleI(path: GPPATH; x: Integer; y: Integer;
  3632.     width: Integer; height: Integer): GPSTATUS; stdcall;
  3633.   {$EXTERNALSYM GdipAddPathRectangleI}
  3634.  
  3635.   function GdipAddPathRectanglesI(path: GPPATH; rects: GPRECT;
  3636.     count: Integer): GPSTATUS; stdcall;
  3637.   {$EXTERNALSYM GdipAddPathRectanglesI}
  3638.  
  3639.   function GdipAddPathEllipseI(path: GPPATH; x: Integer; y: Integer;
  3640.     width: Integer; height: Integer): GPSTATUS; stdcall;
  3641.   {$EXTERNALSYM GdipAddPathEllipseI}
  3642.  
  3643.   function GdipAddPathPieI(path: GPPATH; x: Integer; y: Integer; width: Integer;
  3644.     height: Integer; startAngle: Single; sweepAngle: Single): GPSTATUS; stdcall;
  3645.   {$EXTERNALSYM GdipAddPathPieI}
  3646.  
  3647.   function GdipAddPathPolygonI(path: GPPATH; points: GPPOINT;
  3648.     count: Integer): GPSTATUS; stdcall;
  3649.   {$EXTERNALSYM GdipAddPathPolygonI}
  3650.  
  3651.   function GdipFlattenPath(path: GPPATH; matrix: GPMATRIX;
  3652.     flatness: Single): GPSTATUS; stdcall;
  3653.   {$EXTERNALSYM GdipFlattenPath}
  3654.  
  3655.   function GdipWindingModeOutline(path: GPPATH; matrix: GPMATRIX;
  3656.     flatness: Single): GPSTATUS; stdcall;
  3657.   {$EXTERNALSYM GdipWindingModeOutline}
  3658.  
  3659.   function GdipWidenPath(nativePath: GPPATH; pen: GPPEN; matrix: GPMATRIX;
  3660.     flatness: Single): GPSTATUS; stdcall;
  3661.   {$EXTERNALSYM GdipWidenPath}
  3662.  
  3663.   function GdipWarpPath(path: GPPATH; matrix: GPMATRIX; points: GPPOINTF;
  3664.     count: Integer; srcx: Single; srcy: Single; srcwidth: Single;
  3665.     srcheight: Single; warpMode: WARPMODE; flatness: Single): GPSTATUS; stdcall;
  3666.   {$EXTERNALSYM GdipWarpPath}
  3667.  
  3668.   function GdipTransformPath(path: GPPATH; matrix: GPMATRIX): GPSTATUS; stdcall;
  3669.   {$EXTERNALSYM GdipTransformPath}
  3670.  
  3671.   function GdipGetPathWorldBounds(path: GPPATH; bounds: GPRECTF;
  3672.     matrix: GPMATRIX; pen: GPPEN): GPSTATUS; stdcall;
  3673.   {$EXTERNALSYM GdipGetPathWorldBounds}
  3674.  
  3675.   function GdipGetPathWorldBoundsI(path: GPPATH; bounds: GPRECT;
  3676.     matrix: GPMATRIX; pen: GPPEN): GPSTATUS; stdcall;
  3677.   {$EXTERNALSYM GdipGetPathWorldBoundsI}
  3678.  
  3679.   function GdipIsVisiblePathPoint(path: GPPATH; x: Single; y: Single;
  3680.     graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall;
  3681.   {$EXTERNALSYM GdipIsVisiblePathPoint}
  3682.  
  3683.   function GdipIsVisiblePathPointI(path: GPPATH; x: Integer; y: Integer;
  3684.     graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall;
  3685.   {$EXTERNALSYM GdipIsVisiblePathPointI}
  3686.  
  3687.   function GdipIsOutlineVisiblePathPoint(path: GPPATH; x: Single; y: Single;
  3688.     pen: GPPEN; graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall;
  3689.   {$EXTERNALSYM GdipIsOutlineVisiblePathPoint}
  3690.  
  3691.   function GdipIsOutlineVisiblePathPointI(path: GPPATH; x: Integer; y: Integer;
  3692.     pen: GPPEN; graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall;
  3693.   {$EXTERNALSYM GdipIsOutlineVisiblePathPointI}
  3694.  
  3695. //----------------------------------------------------------------------------
  3696. // PathIterator APIs 
  3697. //----------------------------------------------------------------------------
  3698.  
  3699.   function GdipCreatePathIter(out iterator: GPPATHITERATOR;
  3700.     path: GPPATH): GPSTATUS; stdcall;
  3701.   {$EXTERNALSYM GdipCreatePathIter}
  3702.  
  3703.   function GdipDeletePathIter(iterator: GPPATHITERATOR): GPSTATUS; stdcall;
  3704.   {$EXTERNALSYM GdipDeletePathIter}
  3705.  
  3706.   function GdipPathIterNextSubpath(iterator: GPPATHITERATOR;
  3707.     var resultCount: Integer; var startIndex: Integer; var endIndex: Integer;
  3708.     out isClosed: Bool): GPSTATUS; stdcall;
  3709.   {$EXTERNALSYM GdipPathIterNextSubpath}
  3710.  
  3711.   function GdipPathIterNextSubpathPath(iterator: GPPATHITERATOR;
  3712.     var resultCount: Integer; path: GPPATH;
  3713.     out isClosed: Bool): GPSTATUS; stdcall;
  3714.   {$EXTERNALSYM GdipPathIterNextSubpathPath}
  3715.  
  3716.   function GdipPathIterNextPathType(iterator: GPPATHITERATOR;
  3717.     var resultCount: Integer; pathType: PBYTE; var startIndex: Integer;
  3718.     var endIndex: Integer): GPSTATUS; stdcall;
  3719.   {$EXTERNALSYM GdipPathIterNextPathType}
  3720.  
  3721.   function GdipPathIterNextMarker(iterator: GPPATHITERATOR;
  3722.     var resultCount: Integer; var startIndex: Integer;
  3723.     var endIndex: Integer): GPSTATUS; stdcall;
  3724.   {$EXTERNALSYM GdipPathIterNextMarker}
  3725.  
  3726.   function GdipPathIterNextMarkerPath(iterator: GPPATHITERATOR;
  3727.     var resultCount: Integer; path: GPPATH): GPSTATUS; stdcall;
  3728.   {$EXTERNALSYM GdipPathIterNextMarkerPath}
  3729.  
  3730.   function GdipPathIterGetCount(iterator: GPPATHITERATOR;
  3731.     out count: Integer): GPSTATUS; stdcall;
  3732.   {$EXTERNALSYM GdipPathIterGetCount}
  3733.  
  3734.   function GdipPathIterGetSubpathCount(iterator: GPPATHITERATOR;
  3735.     out count: Integer): GPSTATUS; stdcall;
  3736.   {$EXTERNALSYM GdipPathIterGetSubpathCount}
  3737.  
  3738.   function GdipPathIterIsValid(iterator: GPPATHITERATOR;
  3739.     out valid: Bool): GPSTATUS; stdcall;
  3740.   {$EXTERNALSYM GdipPathIterIsValid}
  3741.  
  3742.   function GdipPathIterHasCurve(iterator: GPPATHITERATOR;
  3743.     out hasCurve: Bool): GPSTATUS; stdcall;
  3744.   {$EXTERNALSYM GdipPathIterHasCurve}
  3745.  
  3746.   function GdipPathIterRewind(iterator: GPPATHITERATOR): GPSTATUS; stdcall;
  3747.   {$EXTERNALSYM GdipPathIterRewind}
  3748.  
  3749.   function GdipPathIterEnumerate(iterator: GPPATHITERATOR;
  3750.     var resultCount: Integer; points: GPPOINTF; types: PBYTE;
  3751.     count: Integer): GPSTATUS; stdcall;
  3752.   {$EXTERNALSYM GdipPathIterEnumerate}
  3753.  
  3754.   function GdipPathIterCopyData(iterator: GPPATHITERATOR;
  3755.     var resultCount: Integer; points: GPPOINTF; types: PBYTE;
  3756.     startIndex: Integer; endIndex: Integer): GPSTATUS; stdcall;
  3757.   {$EXTERNALSYM GdipPathIterCopyData}
  3758.  
  3759. //----------------------------------------------------------------------------
  3760. // Matrix APIs
  3761. //----------------------------------------------------------------------------
  3762.  
  3763.   function GdipCreateMatrix(out matrix: GPMATRIX): GPSTATUS; stdcall;
  3764.   {$EXTERNALSYM GdipCreateMatrix}
  3765.  
  3766.   function GdipCreateMatrix2(m11: Single; m12: Single; m21: Single; m22: Single;
  3767.     dx: Single; dy: Single; out matrix: GPMATRIX): GPSTATUS; stdcall;
  3768.   {$EXTERNALSYM GdipCreateMatrix2}
  3769.  
  3770.   function GdipCreateMatrix3(rect: GPRECTF; dstplg: GPPOINTF;
  3771.     out matrix: GPMATRIX): GPSTATUS; stdcall;
  3772.   {$EXTERNALSYM GdipCreateMatrix3}
  3773.  
  3774.   function GdipCreateMatrix3I(rect: GPRECT; dstplg: GPPOINT;
  3775.     out matrix: GPMATRIX): GPSTATUS; stdcall;
  3776.   {$EXTERNALSYM GdipCreateMatrix3I}
  3777.  
  3778.   function GdipCloneMatrix(matrix: GPMATRIX;
  3779.     out cloneMatrix: GPMATRIX): GPSTATUS; stdcall;
  3780.   {$EXTERNALSYM GdipCloneMatrix}
  3781.  
  3782.   function GdipDeleteMatrix(matrix: GPMATRIX): GPSTATUS; stdcall;
  3783.   {$EXTERNALSYM GdipDeleteMatrix}
  3784.  
  3785.   function GdipSetMatrixElements(matrix: GPMATRIX; m11: Single; m12: Single;
  3786.     m21: Single; m22: Single; dx: Single; dy: Single): GPSTATUS; stdcall;
  3787.   {$EXTERNALSYM GdipSetMatrixElements}
  3788.  
  3789.   function GdipMultiplyMatrix(matrix: GPMATRIX; matrix2: GPMATRIX;
  3790.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  3791.   {$EXTERNALSYM GdipMultiplyMatrix}
  3792.  
  3793.   function GdipTranslateMatrix(matrix: GPMATRIX; offsetX: Single;
  3794.     offsetY: Single; order: GPMATRIXORDER): GPSTATUS; stdcall;
  3795.   {$EXTERNALSYM GdipTranslateMatrix}
  3796.  
  3797.   function GdipScaleMatrix(matrix: GPMATRIX; scaleX: Single; scaleY: Single;
  3798.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  3799.   {$EXTERNALSYM GdipScaleMatrix}
  3800.  
  3801.   function GdipRotateMatrix(matrix: GPMATRIX; angle: Single;
  3802.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  3803.   {$EXTERNALSYM GdipRotateMatrix}
  3804.  
  3805.   function GdipShearMatrix(matrix: GPMATRIX; shearX: Single; shearY: Single;
  3806.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  3807.   {$EXTERNALSYM GdipShearMatrix}
  3808.  
  3809.   function GdipInvertMatrix(matrix: GPMATRIX): GPSTATUS; stdcall;
  3810.   {$EXTERNALSYM GdipInvertMatrix}
  3811.  
  3812.   function GdipTransformMatrixPoints(matrix: GPMATRIX; pts: GPPOINTF;
  3813.     count: Integer): GPSTATUS; stdcall;
  3814.   {$EXTERNALSYM GdipTransformMatrixPoints}
  3815.  
  3816.   function GdipTransformMatrixPointsI(matrix: GPMATRIX; pts: GPPOINT;
  3817.     count: Integer): GPSTATUS; stdcall;
  3818.   {$EXTERNALSYM GdipTransformMatrixPointsI}
  3819.  
  3820.   function GdipVectorTransformMatrixPoints(matrix: GPMATRIX; pts: GPPOINTF;
  3821.     count: Integer): GPSTATUS; stdcall;
  3822.   {$EXTERNALSYM GdipVectorTransformMatrixPoints}
  3823.  
  3824.   function GdipVectorTransformMatrixPointsI(matrix: GPMATRIX; pts: GPPOINT;
  3825.     count: Integer): GPSTATUS; stdcall;
  3826.   {$EXTERNALSYM GdipVectorTransformMatrixPointsI}
  3827.  
  3828.   function GdipGetMatrixElements(matrix: GPMATRIX;
  3829.     matrixOut: PSingle): GPSTATUS; stdcall;
  3830.   {$EXTERNALSYM GdipGetMatrixElements}
  3831.  
  3832.   function GdipIsMatrixInvertible(matrix: GPMATRIX;
  3833.     out result: Bool): GPSTATUS; stdcall;
  3834.   {$EXTERNALSYM GdipIsMatrixInvertible}
  3835.  
  3836.   function GdipIsMatrixIdentity(matrix: GPMATRIX;
  3837.     out result: Bool): GPSTATUS; stdcall;
  3838.   {$EXTERNALSYM GdipIsMatrixIdentity}
  3839.  
  3840.   function GdipIsMatrixEqual(matrix: GPMATRIX; matrix2: GPMATRIX;
  3841.     out result: Bool): GPSTATUS; stdcall;
  3842.   {$EXTERNALSYM GdipIsMatrixEqual}
  3843.  
  3844. //----------------------------------------------------------------------------
  3845. // Region APIs
  3846. //----------------------------------------------------------------------------
  3847.  
  3848.   function GdipCreateRegion(out region: GPREGION): GPSTATUS; stdcall;
  3849.   {$EXTERNALSYM GdipCreateRegion}
  3850.  
  3851.   function GdipCreateRegionRect(rect: GPRECTF;
  3852.     out region: GPREGION): GPSTATUS; stdcall;
  3853.   {$EXTERNALSYM GdipCreateRegionRect}
  3854.  
  3855.   function GdipCreateRegionRectI(rect: GPRECT;
  3856.     out region: GPREGION): GPSTATUS; stdcall;
  3857.   {$EXTERNALSYM GdipCreateRegionRectI}
  3858.  
  3859.   function GdipCreateRegionPath(path: GPPATH;
  3860.     out region: GPREGION): GPSTATUS; stdcall;
  3861.   {$EXTERNALSYM GdipCreateRegionPath}
  3862.  
  3863.   function GdipCreateRegionRgnData(regionData: PBYTE; size: Integer;
  3864.     out region: GPREGION): GPSTATUS; stdcall;
  3865.   {$EXTERNALSYM GdipCreateRegionRgnData}
  3866.  
  3867.   function GdipCreateRegionHrgn(hRgn: HRGN;
  3868.     out region: GPREGION): GPSTATUS; stdcall;
  3869.   {$EXTERNALSYM GdipCreateRegionHrgn}
  3870.  
  3871.   function GdipCloneRegion(region: GPREGION;
  3872.     out cloneRegion: GPREGION): GPSTATUS; stdcall;
  3873.   {$EXTERNALSYM GdipCloneRegion}
  3874.  
  3875.   function GdipDeleteRegion(region: GPREGION): GPSTATUS; stdcall;
  3876.   {$EXTERNALSYM GdipDeleteRegion}
  3877.  
  3878.   function GdipSetInfinite(region: GPREGION): GPSTATUS; stdcall;
  3879.   {$EXTERNALSYM GdipSetInfinite}
  3880.  
  3881.   function GdipSetEmpty(region: GPREGION): GPSTATUS; stdcall;
  3882.   {$EXTERNALSYM GdipSetEmpty}
  3883.  
  3884.   function GdipCombineRegionRect(region: GPREGION; rect: GPRECTF;
  3885.     combineMode: COMBINEMODE): GPSTATUS; stdcall;
  3886.   {$EXTERNALSYM GdipCombineRegionRect}
  3887.  
  3888.   function GdipCombineRegionRectI(region: GPREGION; rect: GPRECT;
  3889.     combineMode: COMBINEMODE): GPSTATUS; stdcall;
  3890.   {$EXTERNALSYM GdipCombineRegionRectI}
  3891.  
  3892.   function GdipCombineRegionPath(region: GPREGION; path: GPPATH;
  3893.     combineMode: COMBINEMODE): GPSTATUS; stdcall;
  3894.   {$EXTERNALSYM GdipCombineRegionPath}
  3895.  
  3896.   function GdipCombineRegionRegion(region: GPREGION; region2: GPREGION;
  3897.     combineMode: COMBINEMODE): GPSTATUS; stdcall;
  3898.   {$EXTERNALSYM GdipCombineRegionRegion}
  3899.  
  3900.   function GdipTranslateRegion(region: GPREGION; dx: Single;
  3901.     dy: Single): GPSTATUS; stdcall;
  3902.   {$EXTERNALSYM GdipTranslateRegion}
  3903.  
  3904.   function GdipTranslateRegionI(region: GPREGION; dx: Integer;
  3905.     dy: Integer): GPSTATUS; stdcall;
  3906.   {$EXTERNALSYM GdipTranslateRegionI}
  3907.  
  3908.   function GdipTransformRegion(region: GPREGION;
  3909.     matrix: GPMATRIX): GPSTATUS; stdcall;
  3910.   {$EXTERNALSYM GdipTransformRegion}
  3911.  
  3912.   function GdipGetRegionBounds(region: GPREGION; graphics: GPGRAPHICS;
  3913.     rect: GPRECTF): GPSTATUS; stdcall;
  3914.   {$EXTERNALSYM GdipGetRegionBounds}
  3915.  
  3916.   function GdipGetRegionBoundsI(region: GPREGION; graphics: GPGRAPHICS;
  3917.     rect: GPRECT): GPSTATUS; stdcall;
  3918.   {$EXTERNALSYM GdipGetRegionBoundsI}
  3919.  
  3920.   function GdipGetRegionHRgn(region: GPREGION; graphics: GPGRAPHICS;
  3921.     out hRgn: HRGN): GPSTATUS; stdcall;
  3922.   {$EXTERNALSYM GdipGetRegionHRgn}
  3923.  
  3924.   function GdipIsEmptyRegion(region: GPREGION; graphics: GPGRAPHICS;
  3925.     out result: Bool): GPSTATUS; stdcall;
  3926.   {$EXTERNALSYM GdipIsEmptyRegion}
  3927.  
  3928.   function GdipIsInfiniteRegion(region: GPREGION; graphics: GPGRAPHICS;
  3929.     out result: Bool): GPSTATUS; stdcall;
  3930.   {$EXTERNALSYM GdipIsInfiniteRegion}
  3931.  
  3932.   function GdipIsEqualRegion(region: GPREGION; region2: GPREGION;
  3933.     graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall;
  3934.   {$EXTERNALSYM GdipIsEqualRegion}
  3935.  
  3936.   function GdipGetRegionDataSize(region: GPREGION;
  3937.     out bufferSize: UINT): GPSTATUS; stdcall;
  3938.   {$EXTERNALSYM GdipGetRegionDataSize}
  3939.  
  3940.   function GdipGetRegionData(region: GPREGION; buffer: PBYTE;
  3941.     bufferSize: UINT; sizeFilled: PUINT): GPSTATUS; stdcall;
  3942.   {$EXTERNALSYM GdipGetRegionData}
  3943.  
  3944.   function GdipIsVisibleRegionPoint(region: GPREGION; x: Single; y: Single;
  3945.     graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall;
  3946.   {$EXTERNALSYM GdipIsVisibleRegionPoint}
  3947.  
  3948.   function GdipIsVisibleRegionPointI(region: GPREGION; x: Integer; y: Integer;
  3949.     graphics: GPGRAPHICS; out result: Bool): GPSTATUS; stdcall;
  3950.   {$EXTERNALSYM GdipIsVisibleRegionPointI}
  3951.  
  3952.   function GdipIsVisibleRegionRect(region: GPREGION; x: Single; y: Single;
  3953.     width: Single; height: Single; graphics: GPGRAPHICS;
  3954.     out result: Bool): GPSTATUS; stdcall;
  3955.   {$EXTERNALSYM GdipIsVisibleRegionRect}
  3956.  
  3957.   function GdipIsVisibleRegionRectI(region: GPREGION; x: Integer; y: Integer;
  3958.     width: Integer; height: Integer; graphics: GPGRAPHICS;
  3959.     out result: Bool): GPSTATUS; stdcall;
  3960.   {$EXTERNALSYM GdipIsVisibleRegionRectI}
  3961.  
  3962.   function GdipGetRegionScansCount(region: GPREGION; out count: UINT;
  3963.     matrix: GPMATRIX): GPSTATUS; stdcall;
  3964.   {$EXTERNALSYM GdipGetRegionScansCount}
  3965.  
  3966.   function GdipGetRegionScans(region: GPREGION; rects: GPRECTF;
  3967.     out count: Integer; matrix: GPMATRIX): GPSTATUS; stdcall;
  3968.   {$EXTERNALSYM GdipGetRegionScans}
  3969.  
  3970.   function GdipGetRegionScansI(region: GPREGION; rects: GPRECT;
  3971.     out count: Integer; matrix: GPMATRIX): GPSTATUS; stdcall;
  3972.   {$EXTERNALSYM GdipGetRegionScansI}
  3973.  
  3974. //----------------------------------------------------------------------------
  3975. // Brush APIs
  3976. //----------------------------------------------------------------------------
  3977.  
  3978.   function GdipCloneBrush(brush: GPBRUSH;
  3979.     out cloneBrush: GPBRUSH): GPSTATUS; stdcall;
  3980.   {$EXTERNALSYM GdipCloneBrush}
  3981.  
  3982.   function GdipDeleteBrush(brush: GPBRUSH): GPSTATUS; stdcall;
  3983.   {$EXTERNALSYM GdipDeleteBrush}
  3984.  
  3985.   function GdipGetBrushType(brush: GPBRUSH;
  3986.     out type_: GPBRUSHTYPE): GPSTATUS; stdcall;
  3987.   {$EXTERNALSYM GdipGetBrushType}
  3988.  
  3989. //----------------------------------------------------------------------------
  3990. // HatchBrush APIs
  3991. //----------------------------------------------------------------------------
  3992.  
  3993.   function GdipCreateHatchBrush(hatchstyle: Integer; forecol: ARGB;
  3994.     backcol: ARGB; out brush: GPHATCH): GPSTATUS; stdcall;
  3995.   {$EXTERNALSYM GdipCreateHatchBrush}
  3996.  
  3997.   function GdipGetHatchStyle(brush: GPHATCH;
  3998.     out hatchstyle: GPHATCHSTYLE): GPSTATUS; stdcall;
  3999.   {$EXTERNALSYM GdipGetHatchStyle}
  4000.  
  4001.   function GdipGetHatchForegroundColor(brush: GPHATCH;
  4002.     out forecol: ARGB): GPSTATUS; stdcall;
  4003.   {$EXTERNALSYM GdipGetHatchForegroundColor}
  4004.  
  4005.   function GdipGetHatchBackgroundColor(brush: GPHATCH;
  4006.     out backcol: ARGB): GPSTATUS; stdcall;
  4007.   {$EXTERNALSYM GdipGetHatchBackgroundColor}
  4008.  
  4009. //----------------------------------------------------------------------------
  4010. // TextureBrush APIs
  4011. //----------------------------------------------------------------------------
  4012.  
  4013.  
  4014.   function GdipCreateTexture(image: GPIMAGE; wrapmode: GPWRAPMODE;
  4015.     var texture: GPTEXTURE): GPSTATUS; stdcall;
  4016.   {$EXTERNALSYM GdipCreateTexture}
  4017.  
  4018.   function GdipCreateTexture2(image: GPIMAGE; wrapmode: GPWRAPMODE;
  4019.     x: Single; y: Single; width: Single; height: Single;
  4020.     out texture: GPTEXTURE): GPSTATUS; stdcall;
  4021.   {$EXTERNALSYM GdipCreateTexture2}
  4022.  
  4023.   function GdipCreateTextureIA(image: GPIMAGE;
  4024.     imageAttributes: GPIMAGEATTRIBUTES; x: Single; y: Single; width: Single;
  4025.     height: Single; out texture: GPTEXTURE): GPSTATUS; stdcall;
  4026.   {$EXTERNALSYM GdipCreateTextureIA}
  4027.  
  4028.   function GdipCreateTexture2I(image: GPIMAGE; wrapmode: GPWRAPMODE; x: Integer;
  4029.     y: Integer; width: Integer; height: Integer;
  4030.     out texture: GPTEXTURE): GPSTATUS; stdcall;
  4031.   {$EXTERNALSYM GdipCreateTexture2I}
  4032.  
  4033.   function GdipCreateTextureIAI(image: GPIMAGE;
  4034.     imageAttributes: GPIMAGEATTRIBUTES; x: Integer; y: Integer; width: Integer;
  4035.     height: Integer; out texture: GPTEXTURE): GPSTATUS; stdcall;
  4036.   {$EXTERNALSYM GdipCreateTextureIAI}
  4037.  
  4038.   function GdipGetTextureTransform(brush: GPTEXTURE;
  4039.     matrix: GPMATRIX): GPSTATUS; stdcall;
  4040.   {$EXTERNALSYM GdipGetTextureTransform}
  4041.  
  4042.   function GdipSetTextureTransform(brush: GPTEXTURE;
  4043.     matrix: GPMATRIX): GPSTATUS; stdcall;
  4044.   {$EXTERNALSYM GdipSetTextureTransform}
  4045.  
  4046.   function GdipResetTextureTransform(brush: GPTEXTURE): GPSTATUS; stdcall;
  4047.   {$EXTERNALSYM GdipResetTextureTransform}
  4048.  
  4049.   function GdipMultiplyTextureTransform(brush: GPTEXTURE; matrix: GPMATRIX;
  4050.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  4051.   {$EXTERNALSYM GdipMultiplyTextureTransform}
  4052.  
  4053.   function GdipTranslateTextureTransform(brush: GPTEXTURE; dx: Single;
  4054.     dy: Single; order: GPMATRIXORDER): GPSTATUS; stdcall;
  4055.   {$EXTERNALSYM GdipTranslateTextureTransform}
  4056.  
  4057.   function GdipScaleTextureTransform(brush: GPTEXTURE; sx: Single; sy: Single;
  4058.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  4059.   {$EXTERNALSYM GdipScaleTextureTransform}
  4060.  
  4061.   function GdipRotateTextureTransform(brush: GPTEXTURE; angle: Single;
  4062.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  4063.   {$EXTERNALSYM GdipRotateTextureTransform}
  4064.  
  4065.   function GdipSetTextureWrapMode(brush: GPTEXTURE;
  4066.     wrapmode: GPWRAPMODE): GPSTATUS; stdcall;
  4067.   {$EXTERNALSYM GdipSetTextureWrapMode}
  4068.  
  4069.   function GdipGetTextureWrapMode(brush: GPTEXTURE;
  4070.     var wrapmode: GPWRAPMODE): GPSTATUS; stdcall;
  4071.   {$EXTERNALSYM GdipGetTextureWrapMode}
  4072.  
  4073.   function GdipGetTextureImage(brush: GPTEXTURE;
  4074.     out image: GPIMAGE): GPSTATUS; stdcall;
  4075.   {$EXTERNALSYM GdipGetTextureImage}
  4076.  
  4077. //----------------------------------------------------------------------------
  4078. // SolidBrush APIs
  4079. //----------------------------------------------------------------------------
  4080.  
  4081.   function GdipCreateSolidFill(color: ARGB;
  4082.     out brush: GPSOLIDFILL): GPSTATUS; stdcall;
  4083.   {$EXTERNALSYM GdipCreateSolidFill}
  4084.  
  4085.   function GdipSetSolidFillColor(brush: GPSOLIDFILL;
  4086.     color: ARGB): GPSTATUS; stdcall;
  4087.   {$EXTERNALSYM GdipSetSolidFillColor}
  4088.  
  4089.   function GdipGetSolidFillColor(brush: GPSOLIDFILL;
  4090.     out color: ARGB): GPSTATUS; stdcall;
  4091.   {$EXTERNALSYM GdipGetSolidFillColor}
  4092.  
  4093. //----------------------------------------------------------------------------
  4094. // LineBrush APIs
  4095. //----------------------------------------------------------------------------
  4096.  
  4097.   function GdipCreateLineBrush(point1: GPPOINTF; point2: GPPOINTF; color1: ARGB;
  4098.     color2: ARGB; wrapMode: GPWRAPMODE;
  4099.     out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall;
  4100.   {$EXTERNALSYM GdipCreateLineBrush}
  4101.  
  4102.   function GdipCreateLineBrushI(point1: GPPOINT; point2: GPPOINT; color1: ARGB;
  4103.     color2: ARGB; wrapMode: GPWRAPMODE;
  4104.     out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall;
  4105.   {$EXTERNALSYM GdipCreateLineBrushI}
  4106.  
  4107.   function GdipCreateLineBrushFromRect(rect: GPRECTF; color1: ARGB;
  4108.     color2: ARGB; mode: LINEARGRADIENTMODE; wrapMode: GPWRAPMODE;
  4109.     out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall;
  4110.   {$EXTERNALSYM GdipCreateLineBrushFromRect}
  4111.  
  4112.   function GdipCreateLineBrushFromRectI(rect: GPRECT; color1: ARGB;
  4113.     color2: ARGB; mode: LINEARGRADIENTMODE; wrapMode: GPWRAPMODE;
  4114.     out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall;
  4115.   {$EXTERNALSYM GdipCreateLineBrushFromRectI}
  4116.  
  4117.   function GdipCreateLineBrushFromRectWithAngle(rect: GPRECTF; color1: ARGB;
  4118.     color2: ARGB; angle: Single; isAngleScalable: Bool; wrapMode: GPWRAPMODE;
  4119.     out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall;
  4120.   {$EXTERNALSYM GdipCreateLineBrushFromRectWithAngle}
  4121.  
  4122.   function GdipCreateLineBrushFromRectWithAngleI(rect: GPRECT; color1: ARGB;
  4123.     color2: ARGB; angle: Single; isAngleScalable: Bool; wrapMode: GPWRAPMODE;
  4124.     out lineGradient: GPLINEGRADIENT): GPSTATUS; stdcall;
  4125.   {$EXTERNALSYM GdipCreateLineBrushFromRectWithAngleI}
  4126.  
  4127.   function GdipSetLineColors(brush: GPLINEGRADIENT; color1: ARGB;
  4128.     color2: ARGB): GPSTATUS; stdcall;
  4129.   {$EXTERNALSYM GdipSetLineColors}
  4130.  
  4131.   function GdipGetLineColors(brush: GPLINEGRADIENT;
  4132.     colors: PARGB): GPSTATUS; stdcall;
  4133.   {$EXTERNALSYM GdipGetLineColors}
  4134.  
  4135.   function GdipGetLineRect(brush: GPLINEGRADIENT;
  4136.     rect: GPRECTF): GPSTATUS; stdcall;
  4137.   {$EXTERNALSYM GdipGetLineRect}
  4138.  
  4139.   function GdipGetLineRectI(brush: GPLINEGRADIENT;
  4140.     rect: GPRECT): GPSTATUS; stdcall;
  4141.   {$EXTERNALSYM GdipGetLineRectI}
  4142.  
  4143.   function GdipSetLineGammaCorrection(brush: GPLINEGRADIENT;
  4144.     useGammaCorrection: Bool): GPSTATUS; stdcall;
  4145.   {$EXTERNALSYM GdipSetLineGammaCorrection}
  4146.  
  4147.   function GdipGetLineGammaCorrection(brush: GPLINEGRADIENT;
  4148.     out useGammaCorrection: Bool): GPSTATUS; stdcall;
  4149.   {$EXTERNALSYM GdipGetLineGammaCorrection}
  4150.  
  4151.   function GdipGetLineBlendCount(brush: GPLINEGRADIENT;
  4152.     out count: Integer): GPSTATUS; stdcall;
  4153.   {$EXTERNALSYM GdipGetLineBlendCount}
  4154.  
  4155.   function GdipGetLineBlend(brush: GPLINEGRADIENT; blend: PSingle;
  4156.     positions: PSingle; count: Integer): GPSTATUS; stdcall;
  4157.   {$EXTERNALSYM GdipGetLineBlend}
  4158.  
  4159.   function GdipSetLineBlend(brush: GPLINEGRADIENT; blend: PSingle;
  4160.     positions: PSingle; count: Integer): GPSTATUS; stdcall;
  4161.   {$EXTERNALSYM GdipSetLineBlend}
  4162.  
  4163.   function GdipGetLinePresetBlendCount(brush: GPLINEGRADIENT;
  4164.     out count: Integer): GPSTATUS; stdcall;
  4165.   {$EXTERNALSYM GdipGetLinePresetBlendCount}
  4166.  
  4167.   function GdipGetLinePresetBlend(brush: GPLINEGRADIENT; blend: PARGB;
  4168.     positions: PSingle; count: Integer): GPSTATUS; stdcall;
  4169.   {$EXTERNALSYM GdipGetLinePresetBlend}
  4170.  
  4171.   function GdipSetLinePresetBlend(brush: GPLINEGRADIENT; blend: PARGB;
  4172.     positions: PSingle; count: Integer): GPSTATUS; stdcall;
  4173.   {$EXTERNALSYM GdipSetLinePresetBlend}
  4174.  
  4175.   function GdipSetLineSigmaBlend(brush: GPLINEGRADIENT; focus: Single;
  4176.     scale: Single): GPSTATUS; stdcall;
  4177.   {$EXTERNALSYM GdipSetLineSigmaBlend}
  4178.  
  4179.   function GdipSetLineLinearBlend(brush: GPLINEGRADIENT; focus: Single;
  4180.     scale: Single): GPSTATUS; stdcall;
  4181.   {$EXTERNALSYM GdipSetLineLinearBlend}
  4182.  
  4183.   function GdipSetLineWrapMode(brush: GPLINEGRADIENT;
  4184.     wrapmode: GPWRAPMODE): GPSTATUS; stdcall;
  4185.   {$EXTERNALSYM GdipSetLineWrapMode}
  4186.  
  4187.   function GdipGetLineWrapMode(brush: GPLINEGRADIENT;
  4188.     out wrapmode: GPWRAPMODE): GPSTATUS; stdcall;
  4189.   {$EXTERNALSYM GdipGetLineWrapMode}
  4190.  
  4191.   function GdipGetLineTransform(brush: GPLINEGRADIENT;
  4192.     matrix: GPMATRIX): GPSTATUS; stdcall;
  4193.   {$EXTERNALSYM GdipGetLineTransform}
  4194.  
  4195.   function GdipSetLineTransform(brush: GPLINEGRADIENT;
  4196.     matrix: GPMATRIX): GPSTATUS; stdcall;
  4197.   {$EXTERNALSYM GdipSetLineTransform}
  4198.  
  4199.   function GdipResetLineTransform(brush: GPLINEGRADIENT): GPSTATUS; stdcall;
  4200.   {$EXTERNALSYM GdipResetLineTransform}
  4201.  
  4202.   function GdipMultiplyLineTransform(brush: GPLINEGRADIENT; matrix: GPMATRIX;
  4203.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  4204.   {$EXTERNALSYM GdipMultiplyLineTransform}
  4205.  
  4206.   function GdipTranslateLineTransform(brush: GPLINEGRADIENT; dx: Single;
  4207.     dy: Single; order: GPMATRIXORDER): GPSTATUS; stdcall;
  4208.   {$EXTERNALSYM GdipTranslateLineTransform}
  4209.  
  4210.   function GdipScaleLineTransform(brush: GPLINEGRADIENT; sx: Single; sy: Single;
  4211.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  4212.   {$EXTERNALSYM GdipScaleLineTransform}
  4213.  
  4214.   function GdipRotateLineTransform(brush: GPLINEGRADIENT; angle: Single;
  4215.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  4216.   {$EXTERNALSYM GdipRotateLineTransform}
  4217.  
  4218. //----------------------------------------------------------------------------
  4219. // PathGradientBrush APIs
  4220. //----------------------------------------------------------------------------
  4221.  
  4222.   function GdipCreatePathGradient(points: GPPOINTF; count: Integer;
  4223.     wrapMode: GPWRAPMODE; out polyGradient: GPPATHGRADIENT): GPSTATUS; stdcall;
  4224.   {$EXTERNALSYM GdipCreatePathGradient}
  4225.  
  4226.   function GdipCreatePathGradientI(points: GPPOINT; count: Integer;
  4227.     wrapMode: GPWRAPMODE; out polyGradient: GPPATHGRADIENT): GPSTATUS; stdcall;
  4228.   {$EXTERNALSYM GdipCreatePathGradientI}
  4229.  
  4230.   function GdipCreatePathGradientFromPath(path: GPPATH;
  4231.     out polyGradient: GPPATHGRADIENT): GPSTATUS; stdcall;
  4232.   {$EXTERNALSYM GdipCreatePathGradientFromPath}
  4233.  
  4234.   function GdipGetPathGradientCenterColor(brush: GPPATHGRADIENT;
  4235.     out colors: ARGB): GPSTATUS; stdcall;
  4236.   {$EXTERNALSYM GdipGetPathGradientCenterColor}
  4237.  
  4238.   function GdipSetPathGradientCenterColor(brush: GPPATHGRADIENT;
  4239.     colors: ARGB): GPSTATUS; stdcall;
  4240.   {$EXTERNALSYM GdipSetPathGradientCenterColor}
  4241.  
  4242.   function GdipGetPathGradientSurroundColorsWithCount(brush: GPPATHGRADIENT;
  4243.     color: PARGB; var count: Integer): GPSTATUS; stdcall;
  4244.   {$EXTERNALSYM GdipGetPathGradientSurroundColorsWithCount}
  4245.  
  4246.   function GdipSetPathGradientSurroundColorsWithCount(brush: GPPATHGRADIENT;
  4247.     color: PARGB; var count: Integer): GPSTATUS; stdcall;
  4248.   {$EXTERNALSYM GdipSetPathGradientSurroundColorsWithCount}
  4249.  
  4250.   function GdipGetPathGradientPath(brush: GPPATHGRADIENT;
  4251.     path: GPPATH): GPSTATUS; stdcall;
  4252.   {$EXTERNALSYM GdipGetPathGradientPath}
  4253.  
  4254.   function GdipSetPathGradientPath(brush: GPPATHGRADIENT;
  4255.     path: GPPATH): GPSTATUS; stdcall;
  4256.   {$EXTERNALSYM GdipSetPathGradientPath}
  4257.  
  4258.   function GdipGetPathGradientCenterPoint(brush: GPPATHGRADIENT;
  4259.     points: GPPOINTF): GPSTATUS; stdcall;
  4260.   {$EXTERNALSYM GdipGetPathGradientCenterPoint}
  4261.  
  4262.   function GdipGetPathGradientCenterPointI(brush: GPPATHGRADIENT;
  4263.     points: GPPOINT): GPSTATUS; stdcall;
  4264.   {$EXTERNALSYM GdipGetPathGradientCenterPointI}
  4265.  
  4266.   function GdipSetPathGradientCenterPoint(brush: GPPATHGRADIENT;
  4267.     points: GPPOINTF): GPSTATUS; stdcall;
  4268.   {$EXTERNALSYM GdipSetPathGradientCenterPoint}
  4269.  
  4270.   function GdipSetPathGradientCenterPointI(brush: GPPATHGRADIENT;
  4271.     points: GPPOINT): GPSTATUS; stdcall;
  4272.   {$EXTERNALSYM GdipSetPathGradientCenterPointI}
  4273.  
  4274.   function GdipGetPathGradientRect(brush: GPPATHGRADIENT;
  4275.     rect: GPRECTF): GPSTATUS; stdcall;
  4276.   {$EXTERNALSYM GdipGetPathGradientRect}
  4277.  
  4278.   function GdipGetPathGradientRectI(brush: GPPATHGRADIENT;
  4279.     rect: GPRECT): GPSTATUS; stdcall;
  4280.   {$EXTERNALSYM GdipGetPathGradientRectI}
  4281.  
  4282.   function GdipGetPathGradientPointCount(brush: GPPATHGRADIENT;
  4283.     var count: Integer): GPSTATUS; stdcall;
  4284.   {$EXTERNALSYM GdipGetPathGradientPointCount}
  4285.  
  4286.   function GdipGetPathGradientSurroundColorCount(brush: GPPATHGRADIENT;
  4287.     var count: Integer): GPSTATUS; stdcall;
  4288.   {$EXTERNALSYM GdipGetPathGradientSurroundColorCount}
  4289.  
  4290.   function GdipSetPathGradientGammaCorrection(brush: GPPATHGRADIENT;
  4291.     useGammaCorrection: Bool): GPSTATUS; stdcall;
  4292.   {$EXTERNALSYM GdipSetPathGradientGammaCorrection}
  4293.  
  4294.   function GdipGetPathGradientGammaCorrection(brush: GPPATHGRADIENT;
  4295.     var useGammaCorrection: Bool): GPSTATUS; stdcall;
  4296.   {$EXTERNALSYM GdipGetPathGradientGammaCorrection}
  4297.  
  4298.   function GdipGetPathGradientBlendCount(brush: GPPATHGRADIENT;
  4299.     var count: Integer): GPSTATUS; stdcall;
  4300.   {$EXTERNALSYM GdipGetPathGradientBlendCount}
  4301.  
  4302.   function GdipGetPathGradientBlend(brush: GPPATHGRADIENT;
  4303.     blend: PSingle; positions: PSingle; count: Integer): GPSTATUS; stdcall;
  4304.   {$EXTERNALSYM GdipGetPathGradientBlend}
  4305.  
  4306.   function GdipSetPathGradientBlend(brush: GPPATHGRADIENT;
  4307.     blend: PSingle; positions: PSingle; count: Integer): GPSTATUS; stdcall;
  4308.   {$EXTERNALSYM GdipSetPathGradientBlend}
  4309.  
  4310.   function GdipGetPathGradientPresetBlendCount(brush: GPPATHGRADIENT;
  4311.     var count: Integer): GPSTATUS; stdcall;
  4312.   {$EXTERNALSYM GdipGetPathGradientPresetBlendCount}
  4313.  
  4314.   function GdipGetPathGradientPresetBlend(brush: GPPATHGRADIENT;
  4315.     blend: PARGB; positions: PSingle; count: Integer): GPSTATUS; stdcall;
  4316.   {$EXTERNALSYM GdipGetPathGradientPresetBlend}
  4317.  
  4318.   function GdipSetPathGradientPresetBlend(brush: GPPATHGRADIENT;
  4319.     blend: PARGB; positions: PSingle; count: Integer): GPSTATUS; stdcall;
  4320.   {$EXTERNALSYM GdipSetPathGradientPresetBlend}
  4321.  
  4322.   function GdipSetPathGradientSigmaBlend(brush: GPPATHGRADIENT;
  4323.     focus: Single; scale: Single): GPSTATUS; stdcall;
  4324.   {$EXTERNALSYM GdipSetPathGradientSigmaBlend}
  4325.  
  4326.   function GdipSetPathGradientLinearBlend(brush: GPPATHGRADIENT;
  4327.     focus: Single; scale: Single): GPSTATUS; stdcall;
  4328.   {$EXTERNALSYM GdipSetPathGradientLinearBlend}
  4329.  
  4330.   function GdipGetPathGradientWrapMode(brush: GPPATHGRADIENT;
  4331.     var wrapmode: GPWRAPMODE): GPSTATUS; stdcall;
  4332.   {$EXTERNALSYM GdipGetPathGradientWrapMode}
  4333.  
  4334.   function GdipSetPathGradientWrapMode(brush: GPPATHGRADIENT;
  4335.     wrapmode: GPWRAPMODE): GPSTATUS; stdcall;
  4336.   {$EXTERNALSYM GdipSetPathGradientWrapMode}
  4337.  
  4338.   function GdipGetPathGradientTransform(brush: GPPATHGRADIENT;
  4339.     matrix: GPMATRIX): GPSTATUS; stdcall;
  4340.   {$EXTERNALSYM GdipGetPathGradientTransform}
  4341.  
  4342.   function GdipSetPathGradientTransform(brush: GPPATHGRADIENT;
  4343.     matrix: GPMATRIX): GPSTATUS; stdcall;
  4344.   {$EXTERNALSYM GdipSetPathGradientTransform}
  4345.  
  4346.   function GdipResetPathGradientTransform(
  4347.     brush: GPPATHGRADIENT): GPSTATUS; stdcall;
  4348.   {$EXTERNALSYM GdipResetPathGradientTransform}
  4349.  
  4350.   function GdipMultiplyPathGradientTransform(brush: GPPATHGRADIENT;
  4351.     matrix: GPMATRIX; order: GPMATRIXORDER): GPSTATUS; stdcall;
  4352.   {$EXTERNALSYM GdipMultiplyPathGradientTransform}
  4353.  
  4354.   function GdipTranslatePathGradientTransform(brush: GPPATHGRADIENT;
  4355.     dx: Single; dy: Single; order: GPMATRIXORDER): GPSTATUS; stdcall;
  4356.   {$EXTERNALSYM GdipTranslatePathGradientTransform}
  4357.  
  4358.   function GdipScalePathGradientTransform(brush: GPPATHGRADIENT;
  4359.     sx: Single; sy: Single; order: GPMATRIXORDER): GPSTATUS; stdcall;
  4360.   {$EXTERNALSYM GdipScalePathGradientTransform}
  4361.  
  4362.   function GdipRotatePathGradientTransform(brush: GPPATHGRADIENT;
  4363.     angle: Single; order: GPMATRIXORDER): GPSTATUS; stdcall;
  4364.   {$EXTERNALSYM GdipRotatePathGradientTransform}
  4365.  
  4366.   function GdipGetPathGradientFocusScales(brush: GPPATHGRADIENT;
  4367.     var xScale: Single; var yScale: Single): GPSTATUS; stdcall;
  4368.   {$EXTERNALSYM GdipGetPathGradientFocusScales}
  4369.  
  4370.   function GdipSetPathGradientFocusScales(brush: GPPATHGRADIENT;
  4371.     xScale: Single; yScale: Single): GPSTATUS; stdcall;
  4372.   {$EXTERNALSYM GdipSetPathGradientFocusScales}
  4373.  
  4374. //----------------------------------------------------------------------------
  4375. // Pen APIs
  4376. //----------------------------------------------------------------------------
  4377.  
  4378.   function GdipCreatePen1(color: ARGB; width: Single; unit_: GPUNIT;
  4379.     out pen: GPPEN): GPSTATUS; stdcall;
  4380.   {$EXTERNALSYM GdipCreatePen1}
  4381.  
  4382.   function GdipCreatePen2(brush: GPBRUSH; width: Single; unit_: GPUNIT;
  4383.     out pen: GPPEN): GPSTATUS; stdcall;
  4384.   {$EXTERNALSYM GdipCreatePen2}
  4385.  
  4386.   function GdipClonePen(pen: GPPEN; out clonepen: GPPEN): GPSTATUS; stdcall;
  4387.   {$EXTERNALSYM GdipClonePen}
  4388.  
  4389.   function GdipDeletePen(pen: GPPEN): GPSTATUS; stdcall;
  4390.   {$EXTERNALSYM GdipDeletePen}
  4391.  
  4392.   function GdipSetPenWidth(pen: GPPEN; width: Single): GPSTATUS; stdcall;
  4393.   {$EXTERNALSYM GdipSetPenWidth}
  4394.  
  4395.   function GdipGetPenWidth(pen: GPPEN; out width: Single): GPSTATUS; stdcall;
  4396.   {$EXTERNALSYM GdipGetPenWidth}
  4397.  
  4398.   function GdipSetPenUnit(pen: GPPEN; unit_: GPUNIT): GPSTATUS; stdcall;
  4399.   {$EXTERNALSYM GdipSetPenUnit}
  4400.  
  4401.   function GdipGetPenUnit(pen: GPPEN; var unit_: GPUNIT): GPSTATUS; stdcall;
  4402.   {$EXTERNALSYM GdipGetPenUnit}
  4403.  
  4404.   function GdipSetPenLineCap197819(pen: GPPEN; startCap: GPLINECAP;
  4405.     endCap: GPLINECAP; dashCap: GPDASHCAP): GPSTATUS; stdcall;
  4406.   {$EXTERNALSYM GdipSetPenLineCap197819}
  4407.  
  4408.   function GdipSetPenStartCap(pen: GPPEN;
  4409.     startCap: GPLINECAP): GPSTATUS; stdcall;
  4410.   {$EXTERNALSYM GdipSetPenStartCap}
  4411.  
  4412.   function GdipSetPenEndCap(pen: GPPEN; endCap: GPLINECAP): GPSTATUS; stdcall;
  4413.   {$EXTERNALSYM GdipSetPenEndCap}
  4414.  
  4415.   function GdipSetPenDashCap197819(pen: GPPEN;
  4416.     dashCap: GPDASHCAP): GPSTATUS; stdcall;
  4417.   {$EXTERNALSYM GdipSetPenDashCap197819}
  4418.  
  4419.   function GdipGetPenStartCap(pen: GPPEN;
  4420.     out startCap: GPLINECAP): GPSTATUS; stdcall;
  4421.   {$EXTERNALSYM GdipGetPenStartCap}
  4422.  
  4423.   function GdipGetPenEndCap(pen: GPPEN;
  4424.     out endCap: GPLINECAP): GPSTATUS; stdcall;
  4425.   {$EXTERNALSYM GdipGetPenEndCap}
  4426.  
  4427.   function GdipGetPenDashCap197819(pen: GPPEN;
  4428.     out dashCap: GPDASHCAP): GPSTATUS; stdcall;
  4429.   {$EXTERNALSYM GdipGetPenDashCap197819}
  4430.  
  4431.   function GdipSetPenLineJoin(pen: GPPEN;
  4432.     lineJoin: GPLINEJOIN): GPSTATUS; stdcall;
  4433.   {$EXTERNALSYM GdipSetPenLineJoin}
  4434.  
  4435.   function GdipGetPenLineJoin(pen: GPPEN;
  4436.     var lineJoin: GPLINEJOIN): GPSTATUS; stdcall;
  4437.   {$EXTERNALSYM GdipGetPenLineJoin}
  4438.  
  4439.   function GdipSetPenCustomStartCap(pen: GPPEN;
  4440.     customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall;
  4441.   {$EXTERNALSYM GdipSetPenCustomStartCap}
  4442.  
  4443.   function GdipGetPenCustomStartCap(pen: GPPEN;
  4444.     out customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall;
  4445.   {$EXTERNALSYM GdipGetPenCustomStartCap}
  4446.  
  4447.   function GdipSetPenCustomEndCap(pen: GPPEN;
  4448.     customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall;
  4449.   {$EXTERNALSYM GdipSetPenCustomEndCap}
  4450.  
  4451.   function GdipGetPenCustomEndCap(pen: GPPEN;
  4452.     out customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall;
  4453.   {$EXTERNALSYM GdipGetPenCustomEndCap}
  4454.  
  4455.   function GdipSetPenMiterLimit(pen: GPPEN;
  4456.     miterLimit: Single): GPSTATUS; stdcall;
  4457.   {$EXTERNALSYM GdipSetPenMiterLimit}
  4458.  
  4459.   function GdipGetPenMiterLimit(pen: GPPEN;
  4460.     out miterLimit: Single): GPSTATUS; stdcall;
  4461.   {$EXTERNALSYM GdipGetPenMiterLimit}
  4462.  
  4463.   function GdipSetPenMode(pen: GPPEN;
  4464.     penMode: GPPENALIGNMENT): GPSTATUS; stdcall;
  4465.   {$EXTERNALSYM GdipSetPenMode}
  4466.  
  4467.   function GdipGetPenMode(pen: GPPEN;
  4468.     var penMode: GPPENALIGNMENT): GPSTATUS; stdcall;
  4469.   {$EXTERNALSYM GdipGetPenMode}
  4470.  
  4471.   function GdipSetPenTransform(pen: GPPEN;
  4472.     matrix: GPMATRIX): GPSTATUS; stdcall;
  4473.   {$EXTERNALSYM GdipSetPenTransform}
  4474.  
  4475.   function GdipGetPenTransform(pen: GPPEN;
  4476.     matrix: GPMATRIX): GPSTATUS; stdcall;
  4477.   {$EXTERNALSYM GdipGetPenTransform}
  4478.  
  4479.   function GdipResetPenTransform(pen: GPPEN): GPSTATUS; stdcall;
  4480.   {$EXTERNALSYM GdipResetPenTransform}
  4481.  
  4482.   function GdipMultiplyPenTransform(pen: GPPEN; matrix: GPMATRIX;
  4483.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  4484.   {$EXTERNALSYM GdipMultiplyPenTransform}
  4485.  
  4486.   function GdipTranslatePenTransform(pen: GPPEN; dx: Single; dy: Single;
  4487.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  4488.   {$EXTERNALSYM GdipTranslatePenTransform}
  4489.  
  4490.   function GdipScalePenTransform(pen: GPPEN; sx: Single; sy: Single;
  4491.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  4492.   {$EXTERNALSYM GdipScalePenTransform}
  4493.  
  4494.   function GdipRotatePenTransform(pen: GPPEN; angle: Single;
  4495.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  4496.   {$EXTERNALSYM GdipRotatePenTransform}
  4497.  
  4498.   function GdipSetPenColor(pen: GPPEN; argb: ARGB): GPSTATUS; stdcall;
  4499.   {$EXTERNALSYM GdipSetPenColor}
  4500.  
  4501.   function GdipGetPenColor(pen: GPPEN; out argb: ARGB): GPSTATUS; stdcall;
  4502.   {$EXTERNALSYM GdipGetPenColor}
  4503.  
  4504.   function GdipSetPenBrushFill(pen: GPPEN; brush: GPBRUSH): GPSTATUS; stdcall;
  4505.   {$EXTERNALSYM GdipSetPenBrushFill}
  4506.  
  4507.   function GdipGetPenBrushFill(pen: GPPEN;
  4508.     out brush: GPBRUSH): GPSTATUS; stdcall;
  4509.   {$EXTERNALSYM GdipGetPenBrushFill}
  4510.  
  4511.   function GdipGetPenFillType(pen: GPPEN;
  4512.     out type_: GPPENTYPE): GPSTATUS; stdcall;
  4513.   {$EXTERNALSYM GdipGetPenFillType}
  4514.  
  4515.   function GdipGetPenDashStyle(pen: GPPEN;
  4516.     out dashstyle: GPDASHSTYLE): GPSTATUS; stdcall;
  4517.   {$EXTERNALSYM GdipGetPenDashStyle}
  4518.  
  4519.   function GdipSetPenDashStyle(pen: GPPEN;
  4520.     dashstyle: GPDASHSTYLE): GPSTATUS; stdcall;
  4521.   {$EXTERNALSYM GdipSetPenDashStyle}
  4522.  
  4523.   function GdipGetPenDashOffset(pen: GPPEN;
  4524.     out offset: Single): GPSTATUS; stdcall;
  4525.   {$EXTERNALSYM GdipGetPenDashOffset}
  4526.  
  4527.   function GdipSetPenDashOffset(pen: GPPEN; offset: Single): GPSTATUS; stdcall;
  4528.   {$EXTERNALSYM GdipSetPenDashOffset}
  4529.  
  4530.   function GdipGetPenDashCount(pen: GPPEN;
  4531.     var count: Integer): GPSTATUS; stdcall;
  4532.   {$EXTERNALSYM GdipGetPenDashCount}
  4533.  
  4534.   function GdipSetPenDashArray(pen: GPPEN; dash: PSingle;
  4535.     count: Integer): GPSTATUS; stdcall;
  4536.   {$EXTERNALSYM GdipSetPenDashArray}
  4537.  
  4538.   function GdipGetPenDashArray(pen: GPPEN; dash: PSingle;
  4539.     count: Integer): GPSTATUS; stdcall;
  4540.   {$EXTERNALSYM GdipGetPenDashArray}
  4541.  
  4542.   function GdipGetPenCompoundCount(pen: GPPEN;
  4543.     out count: Integer): GPSTATUS; stdcall;
  4544.   {$EXTERNALSYM GdipGetPenCompoundCount}
  4545.  
  4546.   function GdipSetPenCompoundArray(pen: GPPEN; dash: PSingle;
  4547.     count: Integer): GPSTATUS; stdcall;
  4548.   {$EXTERNALSYM GdipSetPenCompoundArray}
  4549.  
  4550.   function GdipGetPenCompoundArray(pen: GPPEN; dash: PSingle;
  4551.     count: Integer): GPSTATUS; stdcall;
  4552.   {$EXTERNALSYM GdipGetPenCompoundArray}
  4553.  
  4554. //----------------------------------------------------------------------------
  4555. // CustomLineCap APIs
  4556. //----------------------------------------------------------------------------
  4557.  
  4558.   function GdipCreateCustomLineCap(fillPath: GPPATH; strokePath: GPPATH;
  4559.     baseCap: GPLINECAP; baseInset: Single;
  4560.     out customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall;
  4561.   {$EXTERNALSYM GdipCreateCustomLineCap}
  4562.  
  4563.   function GdipDeleteCustomLineCap(
  4564.     customCap: GPCUSTOMLINECAP): GPSTATUS; stdcall;
  4565.   {$EXTERNALSYM GdipDeleteCustomLineCap}
  4566.  
  4567.   function GdipCloneCustomLineCap(customCap: GPCUSTOMLINECAP;
  4568.     out clonedCap: GPCUSTOMLINECAP): GPSTATUS; stdcall;
  4569.   {$EXTERNALSYM GdipCloneCustomLineCap}
  4570.  
  4571.   function GdipGetCustomLineCapType(customCap: GPCUSTOMLINECAP;
  4572.     var capType: CUSTOMLINECAPTYPE): GPSTATUS; stdcall;
  4573.   {$EXTERNALSYM GdipGetCustomLineCapType}
  4574.  
  4575.   function GdipSetCustomLineCapStrokeCaps(customCap: GPCUSTOMLINECAP;
  4576.     startCap: GPLINECAP; endCap: GPLINECAP): GPSTATUS; stdcall;
  4577.   {$EXTERNALSYM GdipSetCustomLineCapStrokeCaps}
  4578.  
  4579.   function GdipGetCustomLineCapStrokeCaps(customCap: GPCUSTOMLINECAP;
  4580.     var startCap: GPLINECAP; var endCap: GPLINECAP): GPSTATUS; stdcall;
  4581.   {$EXTERNALSYM GdipGetCustomLineCapStrokeCaps}
  4582.  
  4583.   function GdipSetCustomLineCapStrokeJoin(customCap: GPCUSTOMLINECAP;
  4584.   lineJoin: GPLINEJOIN): GPSTATUS; stdcall;
  4585.   {$EXTERNALSYM GdipSetCustomLineCapStrokeJoin}
  4586.  
  4587.   function GdipGetCustomLineCapStrokeJoin(customCap: GPCUSTOMLINECAP;
  4588.   var lineJoin: GPLINEJOIN): GPSTATUS; stdcall;
  4589.   {$EXTERNALSYM GdipGetCustomLineCapStrokeJoin}
  4590.  
  4591.   function GdipSetCustomLineCapBaseCap(customCap: GPCUSTOMLINECAP;
  4592.   baseCap: GPLINECAP): GPSTATUS; stdcall;
  4593.   {$EXTERNALSYM GdipSetCustomLineCapBaseCap}
  4594.  
  4595.   function GdipGetCustomLineCapBaseCap(customCap: GPCUSTOMLINECAP;
  4596.   var baseCap: GPLINECAP): GPSTATUS; stdcall;
  4597.   {$EXTERNALSYM GdipGetCustomLineCapBaseCap}
  4598.  
  4599.   function GdipSetCustomLineCapBaseInset(customCap: GPCUSTOMLINECAP;
  4600.   inset: Single): GPSTATUS; stdcall;
  4601.   {$EXTERNALSYM GdipSetCustomLineCapBaseInset}
  4602.  
  4603.   function GdipGetCustomLineCapBaseInset(customCap: GPCUSTOMLINECAP;
  4604.   var inset: Single): GPSTATUS; stdcall;
  4605.   {$EXTERNALSYM GdipGetCustomLineCapBaseInset}
  4606.  
  4607.   function GdipSetCustomLineCapWidthScale(customCap: GPCUSTOMLINECAP;
  4608.   widthScale: Single): GPSTATUS; stdcall;
  4609.   {$EXTERNALSYM GdipSetCustomLineCapWidthScale}
  4610.  
  4611.   function GdipGetCustomLineCapWidthScale(customCap: GPCUSTOMLINECAP;
  4612.   var widthScale: Single): GPSTATUS; stdcall;
  4613.   {$EXTERNALSYM GdipGetCustomLineCapWidthScale}
  4614.  
  4615. //----------------------------------------------------------------------------
  4616. // AdjustableArrowCap APIs
  4617. //----------------------------------------------------------------------------
  4618.  
  4619.   function GdipCreateAdjustableArrowCap(height: Single;
  4620.   width: Single;
  4621.   isFilled: Bool;
  4622.   out cap: GPADJUSTABLEARROWCAP): GPSTATUS; stdcall;
  4623.   {$EXTERNALSYM GdipCreateAdjustableArrowCap}
  4624.  
  4625.   function GdipSetAdjustableArrowCapHeight(cap: GPADJUSTABLEARROWCAP;
  4626.   height: Single): GPSTATUS; stdcall;
  4627.   {$EXTERNALSYM GdipSetAdjustableArrowCapHeight}
  4628.  
  4629.   function GdipGetAdjustableArrowCapHeight(cap: GPADJUSTABLEARROWCAP;
  4630.   var height: Single): GPSTATUS; stdcall;
  4631.   {$EXTERNALSYM GdipGetAdjustableArrowCapHeight}
  4632.  
  4633.   function GdipSetAdjustableArrowCapWidth(cap: GPADJUSTABLEARROWCAP;
  4634.   width: Single): GPSTATUS; stdcall;
  4635.   {$EXTERNALSYM GdipSetAdjustableArrowCapWidth}
  4636.  
  4637.   function GdipGetAdjustableArrowCapWidth(cap: GPADJUSTABLEARROWCAP;
  4638.   var width: Single): GPSTATUS; stdcall;
  4639.   {$EXTERNALSYM GdipGetAdjustableArrowCapWidth}
  4640.  
  4641.   function GdipSetAdjustableArrowCapMiddleInset(cap: GPADJUSTABLEARROWCAP;
  4642.   middleInset: Single): GPSTATUS; stdcall;
  4643.   {$EXTERNALSYM GdipSetAdjustableArrowCapMiddleInset}
  4644.  
  4645.   function GdipGetAdjustableArrowCapMiddleInset(cap: GPADJUSTABLEARROWCAP;
  4646.   var middleInset: Single): GPSTATUS; stdcall;
  4647.   {$EXTERNALSYM GdipGetAdjustableArrowCapMiddleInset}
  4648.  
  4649.   function GdipSetAdjustableArrowCapFillState(cap: GPADJUSTABLEARROWCAP;
  4650.   fillState: Bool): GPSTATUS; stdcall;
  4651.   {$EXTERNALSYM GdipSetAdjustableArrowCapFillState}
  4652.  
  4653.   function GdipGetAdjustableArrowCapFillState(cap: GPADJUSTABLEARROWCAP;
  4654.   var fillState: Bool): GPSTATUS; stdcall;
  4655.   {$EXTERNALSYM GdipGetAdjustableArrowCapFillState}
  4656.  
  4657. //---------------------------------------------------------------------------- 
  4658. // Image APIs
  4659. //----------------------------------------------------------------------------
  4660.  
  4661.   function GdipLoadImageFromStream(stream: ISTREAM;
  4662.   out image: GPIMAGE): GPSTATUS; stdcall;
  4663.   {$EXTERNALSYM GdipLoadImageFromStream}
  4664.  
  4665.   function GdipLoadImageFromFile(filename: PWCHAR;
  4666.   out image: GPIMAGE): GPSTATUS; stdcall;
  4667.   {$EXTERNALSYM GdipLoadImageFromFile}
  4668.  
  4669.   function GdipLoadImageFromStreamICM(stream: ISTREAM;
  4670.   out image: GPIMAGE): GPSTATUS; stdcall;
  4671.   {$EXTERNALSYM GdipLoadImageFromStreamICM}
  4672.  
  4673.   function GdipLoadImageFromFileICM(filename: PWCHAR;
  4674.   out image: GPIMAGE): GPSTATUS; stdcall;
  4675.   {$EXTERNALSYM GdipLoadImageFromFileICM}
  4676.  
  4677.   function GdipCloneImage(image: GPIMAGE;
  4678.   out cloneImage: GPIMAGE): GPSTATUS; stdcall;
  4679.   {$EXTERNALSYM GdipCloneImage}
  4680.  
  4681.   function GdipDisposeImage(image: GPIMAGE): GPSTATUS; stdcall;
  4682.   {$EXTERNALSYM GdipDisposeImage}
  4683.  
  4684.   function GdipSaveImageToFile(image: GPIMAGE;
  4685.   filename: PWCHAR;
  4686.   clsidEncoder: PGUID;
  4687.   encoderParams: PENCODERPARAMETERS): GPSTATUS; stdcall;
  4688.   {$EXTERNALSYM GdipSaveImageToFile}
  4689.  
  4690.   function GdipSaveImageToStream(image: GPIMAGE;
  4691.   stream: ISTREAM;
  4692.   clsidEncoder: PGUID;
  4693.   encoderParams: PENCODERPARAMETERS): GPSTATUS; stdcall;
  4694.   {$EXTERNALSYM GdipSaveImageToStream}
  4695.  
  4696.   function GdipSaveAdd(image: GPIMAGE;
  4697.   encoderParams: PENCODERPARAMETERS): GPSTATUS; stdcall;
  4698.   {$EXTERNALSYM GdipSaveAdd}
  4699.  
  4700.   function GdipSaveAddImage(image: GPIMAGE;
  4701.   newImage: GPIMAGE;
  4702.   encoderParams: PENCODERPARAMETERS): GPSTATUS; stdcall;
  4703.   {$EXTERNALSYM GdipSaveAddImage}
  4704.  
  4705.   function GdipGetImageGraphicsContext(image: GPIMAGE;
  4706.   out graphics: GPGRAPHICS): GPSTATUS; stdcall;
  4707.   {$EXTERNALSYM GdipGetImageGraphicsContext}
  4708.  
  4709.   function GdipGetImageBounds(image: GPIMAGE;
  4710.   srcRect: GPRECTF;
  4711.   var srcUnit: GPUNIT): GPSTATUS; stdcall;
  4712.   {$EXTERNALSYM GdipGetImageBounds}
  4713.  
  4714.   function GdipGetImageDimension(image: GPIMAGE;
  4715.   var width: Single;
  4716.   var height: Single): GPSTATUS; stdcall;
  4717.   {$EXTERNALSYM GdipGetImageDimension}
  4718.  
  4719.   function GdipGetImageType(image: GPIMAGE;
  4720.   var type_: IMAGETYPE): GPSTATUS; stdcall;
  4721.   {$EXTERNALSYM GdipGetImageType}
  4722.  
  4723.   function GdipGetImageWidth(image: GPIMAGE;
  4724.   var width: UINT): GPSTATUS; stdcall;
  4725.   {$EXTERNALSYM GdipGetImageWidth}
  4726.  
  4727.   function GdipGetImageHeight(image: GPIMAGE;
  4728.   var height: UINT): GPSTATUS; stdcall;
  4729.   {$EXTERNALSYM GdipGetImageHeight}
  4730.  
  4731.   function GdipGetImageHorizontalResolution(image: GPIMAGE;
  4732.   var resolution: Single): GPSTATUS; stdcall;
  4733.   {$EXTERNALSYM GdipGetImageHorizontalResolution}
  4734.  
  4735.   function GdipGetImageVerticalResolution(image: GPIMAGE;
  4736.   var resolution: Single): GPSTATUS; stdcall;
  4737.   {$EXTERNALSYM GdipGetImageVerticalResolution}
  4738.  
  4739.   function GdipGetImageFlags(image: GPIMAGE;
  4740.   var flags: UINT): GPSTATUS; stdcall;
  4741.   {$EXTERNALSYM GdipGetImageFlags}
  4742.  
  4743.   function GdipGetImageRawFormat(image: GPIMAGE;
  4744.   format: PGUID): GPSTATUS; stdcall;
  4745.   {$EXTERNALSYM GdipGetImageRawFormat}
  4746.  
  4747.   function GdipGetImagePixelFormat(image: GPIMAGE;
  4748.   out format: TPIXELFORMAT): GPSTATUS; stdcall;
  4749.   {$EXTERNALSYM GdipGetImagePixelFormat}
  4750.  
  4751.   function GdipGetImageThumbnail(image: GPIMAGE; thumbWidth: UINT;
  4752.     thumbHeight: UINT; out thumbImage: GPIMAGE;
  4753.     callback: GETTHUMBNAILIMAGEABORT; callbackData: Pointer): GPSTATUS; stdcall;
  4754.   {$EXTERNALSYM GdipGetImageThumbnail}
  4755.  
  4756.   function GdipGetEncoderParameterListSize(image: GPIMAGE;
  4757.     clsidEncoder: PGUID; out size: UINT): GPSTATUS; stdcall;
  4758.   {$EXTERNALSYM GdipGetEncoderParameterListSize}
  4759.  
  4760.   function GdipGetEncoderParameterList(image: GPIMAGE; clsidEncoder: PGUID;
  4761.     size: UINT; buffer: PENCODERPARAMETERS): GPSTATUS; stdcall;
  4762.   {$EXTERNALSYM GdipGetEncoderParameterList}
  4763.  
  4764.   function GdipImageGetFrameDimensionsCount(image: GPIMAGE;
  4765.     var count: UINT): GPSTATUS; stdcall;
  4766.   {$EXTERNALSYM GdipImageGetFrameDimensionsCount}
  4767.  
  4768.   function GdipImageGetFrameDimensionsList(image: GPIMAGE; dimensionIDs: PGUID;
  4769.     count: UINT): GPSTATUS; stdcall;
  4770.   {$EXTERNALSYM GdipImageGetFrameDimensionsList}
  4771.  
  4772.   function GdipImageGetFrameCount(image: GPIMAGE; dimensionID: PGUID;
  4773.     var count: UINT): GPSTATUS; stdcall;
  4774.   {$EXTERNALSYM GdipImageGetFrameCount}
  4775.  
  4776.   function GdipImageSelectActiveFrame(image: GPIMAGE; dimensionID: PGUID;
  4777.     frameIndex: UINT): GPSTATUS; stdcall;
  4778.   {$EXTERNALSYM GdipImageSelectActiveFrame}
  4779.  
  4780.   function GdipImageRotateFlip(image: GPIMAGE;
  4781.     rfType: ROTATEFLIPTYPE): GPSTATUS; stdcall;
  4782.   {$EXTERNALSYM GdipImageRotateFlip}
  4783.  
  4784.   function GdipGetImagePalette(image: GPIMAGE; palette: PCOLORPALETTE;
  4785.     size: Integer): GPSTATUS; stdcall;
  4786.   {$EXTERNALSYM GdipGetImagePalette}
  4787.  
  4788.   function GdipSetImagePalette(image: GPIMAGE;
  4789.     palette: PCOLORPALETTE): GPSTATUS; stdcall;
  4790.   {$EXTERNALSYM GdipSetImagePalette}
  4791.  
  4792.   function GdipGetImagePaletteSize(image: GPIMAGE;
  4793.     var size: Integer): GPSTATUS; stdcall;
  4794.   {$EXTERNALSYM GdipGetImagePaletteSize}
  4795.  
  4796.   function GdipGetPropertyCount(image: GPIMAGE;
  4797.     var numOfProperty: UINT): GPSTATUS; stdcall;
  4798.   {$EXTERNALSYM GdipGetPropertyCount}
  4799.  
  4800.   function GdipGetPropertyIdList(image: GPIMAGE; numOfProperty: UINT;
  4801.     list: PPROPID): GPSTATUS; stdcall;
  4802.   {$EXTERNALSYM GdipGetPropertyIdList}
  4803.  
  4804.   function GdipGetPropertyItemSize(image: GPIMAGE; propId: PROPID;
  4805.     var size: UINT): GPSTATUS; stdcall;
  4806.   {$EXTERNALSYM GdipGetPropertyItemSize}
  4807.  
  4808.   function GdipGetPropertyItem(image: GPIMAGE; propId: PROPID; propSize: UINT;
  4809.     buffer: PPROPERTYITEM): GPSTATUS; stdcall;
  4810.   {$EXTERNALSYM GdipGetPropertyItem}
  4811.  
  4812.   function GdipGetPropertySize(image: GPIMAGE; var totalBufferSize: UINT;
  4813.     var numProperties: UINT): GPSTATUS; stdcall;
  4814.   {$EXTERNALSYM GdipGetPropertySize}
  4815.  
  4816.   function GdipGetAllPropertyItems(image: GPIMAGE; totalBufferSize: UINT;
  4817.     numProperties: UINT; allItems: PPROPERTYITEM): GPSTATUS; stdcall;
  4818.   {$EXTERNALSYM GdipGetAllPropertyItems}
  4819.  
  4820.   function GdipRemovePropertyItem(image: GPIMAGE;
  4821.     propId: PROPID): GPSTATUS; stdcall;
  4822.   {$EXTERNALSYM GdipRemovePropertyItem}
  4823.  
  4824.   function GdipSetPropertyItem(image: GPIMAGE;
  4825.     item: PPROPERTYITEM): GPSTATUS; stdcall;
  4826.   {$EXTERNALSYM GdipSetPropertyItem}
  4827.  
  4828.   function GdipImageForceValidation(image: GPIMAGE): GPSTATUS; stdcall;
  4829.   {$EXTERNALSYM GdipImageForceValidation}
  4830.  
  4831. //---------------------------------------------------------------------------- 
  4832. // Bitmap APIs
  4833. //----------------------------------------------------------------------------
  4834.  
  4835.   function GdipCreateBitmapFromStream(stream: ISTREAM;
  4836.     out bitmap: GPBITMAP): GPSTATUS; stdcall;
  4837.   {$EXTERNALSYM GdipCreateBitmapFromStream}
  4838.  
  4839.   function GdipCreateBitmapFromFile(filename: PWCHAR;
  4840.     out bitmap: GPBITMAP): GPSTATUS; stdcall;
  4841.   {$EXTERNALSYM GdipCreateBitmapFromFile}
  4842.  
  4843.   function GdipCreateBitmapFromStreamICM(stream: ISTREAM;
  4844.     out bitmap: GPBITMAP): GPSTATUS; stdcall;
  4845.   {$EXTERNALSYM GdipCreateBitmapFromStreamICM}
  4846.  
  4847.   function GdipCreateBitmapFromFileICM(filename: PWCHAR;
  4848.     var bitmap: GPBITMAP): GPSTATUS; stdcall;
  4849.   {$EXTERNALSYM GdipCreateBitmapFromFileICM}
  4850.  
  4851.   function GdipCreateBitmapFromScan0(width: Integer; height: Integer;
  4852.     stride: Integer; format: PIXELFORMAT; scan0: PBYTE;
  4853.     out bitmap: GPBITMAP): GPSTATUS; stdcall;
  4854.   {$EXTERNALSYM GdipCreateBitmapFromScan0}
  4855.  
  4856.   function GdipCreateBitmapFromGraphics(width: Integer; height: Integer;
  4857.     target: GPGRAPHICS; out bitmap: GPBITMAP): GPSTATUS; stdcall;
  4858.   {$EXTERNALSYM GdipCreateBitmapFromGraphics}
  4859.  
  4860.   function GdipCreateBitmapFromDirectDrawSurface(surface: IDIRECTDRAWSURFACE7;
  4861.     out bitmap: GPBITMAP): GPSTATUS; stdcall;
  4862.   {$EXTERNALSYM GdipCreateBitmapFromDirectDrawSurface}
  4863.  
  4864.   function GdipCreateBitmapFromGdiDib(gdiBitmapInfo: PBitmapInfo;
  4865.     gdiBitmapData: Pointer; out bitmap: GPBITMAP): GPSTATUS; stdcall;
  4866.   {$EXTERNALSYM GdipCreateBitmapFromGdiDib}
  4867.  
  4868.   function GdipCreateBitmapFromHBITMAP(hbm: HBITMAP; hpal: HPALETTE;
  4869.     out bitmap: GPBITMAP): GPSTATUS; stdcall;
  4870.   {$EXTERNALSYM GdipCreateBitmapFromHBITMAP}
  4871.  
  4872.   function GdipCreateHBITMAPFromBitmap(bitmap: GPBITMAP; out hbmReturn: HBITMAP;
  4873.     background: ARGB): GPSTATUS; stdcall;
  4874.   {$EXTERNALSYM GdipCreateHBITMAPFromBitmap}
  4875.  
  4876.   function GdipCreateBitmapFromHICON(hicon: HICON;
  4877.     out bitmap: GPBITMAP): GPSTATUS; stdcall;
  4878.   {$EXTERNALSYM GdipCreateBitmapFromHICON}
  4879.  
  4880.   function GdipCreateHICONFromBitmap(bitmap: GPBITMAP;
  4881.     out hbmReturn: HICON): GPSTATUS; stdcall;
  4882.   {$EXTERNALSYM GdipCreateHICONFromBitmap}
  4883.  
  4884.   function GdipCreateBitmapFromResource(hInstance: HMODULE;
  4885.     lpBitmapName: PWCHAR; out bitmap: GPBITMAP): GPSTATUS; stdcall;
  4886.   {$EXTERNALSYM GdipCreateBitmapFromResource}
  4887.  
  4888.   function GdipCloneBitmapArea(x: Single; y: Single; width: Single;
  4889.     height: Single; format: PIXELFORMAT; srcBitmap: GPBITMAP;
  4890.     out dstBitmap: GPBITMAP): GPSTATUS; stdcall;
  4891.   {$EXTERNALSYM GdipCloneBitmapArea}
  4892.  
  4893.   function GdipCloneBitmapAreaI(x: Integer; y: Integer; width: Integer;
  4894.     height: Integer; format: PIXELFORMAT; srcBitmap: GPBITMAP;
  4895.     out dstBitmap: GPBITMAP): GPSTATUS; stdcall;
  4896.   {$EXTERNALSYM GdipCloneBitmapAreaI}
  4897.  
  4898.   function GdipBitmapLockBits(bitmap: GPBITMAP; rect: GPRECT; flags: UINT;
  4899.     format: PIXELFORMAT; lockedBitmapData: PBITMAPDATA): GPSTATUS; stdcall;
  4900.   {$EXTERNALSYM GdipBitmapLockBits}
  4901.  
  4902.   function GdipBitmapUnlockBits(bitmap: GPBITMAP;
  4903.     lockedBitmapData: PBITMAPDATA): GPSTATUS; stdcall;
  4904.   {$EXTERNALSYM GdipBitmapUnlockBits}
  4905.  
  4906.   function GdipBitmapGetPixel(bitmap: GPBITMAP; x: Integer; y: Integer;
  4907.     var color: ARGB): GPSTATUS; stdcall;
  4908.   {$EXTERNALSYM GdipBitmapGetPixel}
  4909.  
  4910.   function GdipBitmapSetPixel(bitmap: GPBITMAP; x: Integer; y: Integer;
  4911.     color: ARGB): GPSTATUS; stdcall;
  4912.   {$EXTERNALSYM GdipBitmapSetPixel}
  4913.  
  4914.   function GdipBitmapSetResolution(bitmap: GPBITMAP; xdpi: Single;
  4915.     ydpi: Single): GPSTATUS; stdcall;
  4916.   {$EXTERNALSYM GdipBitmapSetResolution}
  4917.  
  4918. //----------------------------------------------------------------------------
  4919. // ImageAttributes APIs
  4920. //----------------------------------------------------------------------------
  4921.  
  4922.   function GdipCreateImageAttributes(
  4923.     out imageattr: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  4924.   {$EXTERNALSYM GdipCreateImageAttributes}
  4925.  
  4926.   function GdipCloneImageAttributes(imageattr: GPIMAGEATTRIBUTES;
  4927.     out cloneImageattr: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  4928.   {$EXTERNALSYM GdipCloneImageAttributes}
  4929.  
  4930.   function GdipDisposeImageAttributes(
  4931.     imageattr: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  4932.   {$EXTERNALSYM GdipDisposeImageAttributes}
  4933.  
  4934.   function GdipSetImageAttributesToIdentity(imageattr: GPIMAGEATTRIBUTES;
  4935.     type_: COLORADJUSTTYPE): GPSTATUS; stdcall;
  4936.   {$EXTERNALSYM GdipSetImageAttributesToIdentity}
  4937.  
  4938.   function GdipResetImageAttributes(imageattr: GPIMAGEATTRIBUTES;
  4939.     type_: COLORADJUSTTYPE): GPSTATUS; stdcall;
  4940.   {$EXTERNALSYM GdipResetImageAttributes}
  4941.  
  4942.   function GdipSetImageAttributesColorMatrix(imageattr: GPIMAGEATTRIBUTES;
  4943.     type_: COLORADJUSTTYPE; enableFlag: Bool; colorMatrix: PCOLORMATRIX;
  4944.     grayMatrix: PCOLORMATRIX; flags: COLORMATRIXFLAGS): GPSTATUS; stdcall;
  4945.   {$EXTERNALSYM GdipSetImageAttributesColorMatrix}
  4946.  
  4947.   function GdipSetImageAttributesThreshold(imageattr: GPIMAGEATTRIBUTES;
  4948.     type_: COLORADJUSTTYPE; enableFlag: Bool;
  4949.     threshold: Single): GPSTATUS; stdcall;
  4950.   {$EXTERNALSYM GdipSetImageAttributesThreshold}
  4951.  
  4952.   function GdipSetImageAttributesGamma(imageattr: GPIMAGEATTRIBUTES;
  4953.     type_: COLORADJUSTTYPE; enableFlag: Bool; gamma: Single): GPSTATUS; stdcall;
  4954.   {$EXTERNALSYM GdipSetImageAttributesGamma}
  4955.  
  4956.   function GdipSetImageAttributesNoOp(imageattr: GPIMAGEATTRIBUTES;
  4957.   type_: COLORADJUSTTYPE; enableFlag: Bool): GPSTATUS; stdcall;
  4958.   {$EXTERNALSYM GdipSetImageAttributesNoOp}
  4959.  
  4960.   function GdipSetImageAttributesColorKeys(imageattr: GPIMAGEATTRIBUTES;
  4961.     type_: COLORADJUSTTYPE; enableFlag: Bool; colorLow: ARGB;
  4962.     colorHigh: ARGB): GPSTATUS; stdcall;
  4963.   {$EXTERNALSYM GdipSetImageAttributesColorKeys}
  4964.  
  4965.   function GdipSetImageAttributesOutputChannel(imageattr: GPIMAGEATTRIBUTES;
  4966.     type_: COLORADJUSTTYPE; enableFlag: Bool;
  4967.     channelFlags: COLORCHANNELFLAGS): GPSTATUS; stdcall;
  4968.   {$EXTERNALSYM GdipSetImageAttributesOutputChannel}
  4969.  
  4970.   function GdipSetImageAttributesOutputChannelColorProfile(imageattr: GPIMAGEATTRIBUTES;
  4971.     type_: COLORADJUSTTYPE; enableFlag: Bool;
  4972.     colorProfileFilename: PWCHAR): GPSTATUS; stdcall;
  4973.   {$EXTERNALSYM GdipSetImageAttributesOutputChannelColorProfile}
  4974.  
  4975.   function GdipSetImageAttributesRemapTable(imageattr: GPIMAGEATTRIBUTES;
  4976.     type_: COLORADJUSTTYPE; enableFlag: Bool; mapSize: UINT;
  4977.     map: PCOLORMAP): GPSTATUS; stdcall;
  4978.   {$EXTERNALSYM GdipSetImageAttributesRemapTable}
  4979.  
  4980.   function GdipSetImageAttributesWrapMode(imageAttr: GPIMAGEATTRIBUTES;
  4981.     wrap: WRAPMODE; argb: ARGB; clamp: Bool): GPSTATUS; stdcall;
  4982.   {$EXTERNALSYM GdipSetImageAttributesWrapMode}
  4983.  
  4984.   function GdipSetImageAttributesICMMode(imageAttr: GPIMAGEATTRIBUTES;
  4985.     on_: Bool): GPSTATUS; stdcall;
  4986.   {$EXTERNALSYM GdipSetImageAttributesICMMode}
  4987.  
  4988.   function GdipGetImageAttributesAdjustedPalette(imageAttr: GPIMAGEATTRIBUTES;
  4989.     colorPalette: PCOLORPALETTE;
  4990.     colorAdjustType: COLORADJUSTTYPE): GPSTATUS; stdcall;
  4991.   {$EXTERNALSYM GdipGetImageAttributesAdjustedPalette}
  4992.  
  4993. //----------------------------------------------------------------------------
  4994. // Graphics APIs
  4995. //----------------------------------------------------------------------------
  4996.  
  4997.   function GdipFlush(graphics: GPGRAPHICS;
  4998.     intention: GPFLUSHINTENTION): GPSTATUS; stdcall;
  4999.   {$EXTERNALSYM GdipFlush}
  5000.  
  5001.   function GdipCreateFromHDC(hdc: HDC;
  5002.     out graphics: GPGRAPHICS): GPSTATUS; stdcall;
  5003.   {$EXTERNALSYM GdipCreateFromHDC}
  5004.  
  5005.   function GdipCreateFromHDC2(hdc: HDC; hDevice: THandle;
  5006.     out graphics: GPGRAPHICS): GPSTATUS; stdcall;
  5007.   {$EXTERNALSYM GdipCreateFromHDC2}
  5008.  
  5009.   function GdipCreateFromHWND(hwnd: HWND;
  5010.     out graphics: GPGRAPHICS): GPSTATUS; stdcall;
  5011.   {$EXTERNALSYM GdipCreateFromHWND}
  5012.  
  5013.   function GdipCreateFromHWNDICM(hwnd: HWND;
  5014.     out graphics: GPGRAPHICS): GPSTATUS; stdcall;
  5015.   {$EXTERNALSYM GdipCreateFromHWNDICM}
  5016.  
  5017.   function GdipDeleteGraphics(graphics: GPGRAPHICS): GPSTATUS; stdcall;
  5018.   {$EXTERNALSYM GdipDeleteGraphics}
  5019.  
  5020.   function GdipGetDC(graphics: GPGRAPHICS; var hdc: HDC): GPSTATUS; stdcall;
  5021.   {$EXTERNALSYM GdipGetDC}
  5022.  
  5023.   function GdipReleaseDC(graphics: GPGRAPHICS; hdc: HDC): GPSTATUS; stdcall;
  5024.   {$EXTERNALSYM GdipReleaseDC}
  5025.  
  5026.   function GdipSetCompositingMode(graphics: GPGRAPHICS;
  5027.     compositingMode: COMPOSITINGMODE): GPSTATUS; stdcall;
  5028.   {$EXTERNALSYM GdipSetCompositingMode}
  5029.  
  5030.   function GdipGetCompositingMode(graphics: GPGRAPHICS;
  5031.     var compositingMode: COMPOSITINGMODE): GPSTATUS; stdcall;
  5032.   {$EXTERNALSYM GdipGetCompositingMode}
  5033.  
  5034.   function GdipSetRenderingOrigin(graphics: GPGRAPHICS; x: Integer;
  5035.     y: Integer): GPSTATUS; stdcall;
  5036.   {$EXTERNALSYM GdipSetRenderingOrigin}
  5037.  
  5038.   function GdipGetRenderingOrigin(graphics: GPGRAPHICS; var x: Integer;
  5039.     var y: Integer): GPSTATUS; stdcall;
  5040.   {$EXTERNALSYM GdipGetRenderingOrigin}
  5041.  
  5042.   function GdipSetCompositingQuality(graphics: GPGRAPHICS;
  5043.     compositingQuality: COMPOSITINGQUALITY): GPSTATUS; stdcall;
  5044.   {$EXTERNALSYM GdipSetCompositingQuality}
  5045.  
  5046.   function GdipGetCompositingQuality(graphics: GPGRAPHICS;
  5047.     var compositingQuality: COMPOSITINGQUALITY): GPSTATUS; stdcall;
  5048.   {$EXTERNALSYM GdipGetCompositingQuality}
  5049.  
  5050.   function GdipSetSmoothingMode(graphics: GPGRAPHICS;
  5051.     smoothingMode: SMOOTHINGMODE): GPSTATUS; stdcall;
  5052.   {$EXTERNALSYM GdipSetSmoothingMode}
  5053.  
  5054.   function GdipGetSmoothingMode(graphics: GPGRAPHICS;
  5055.     var smoothingMode: SMOOTHINGMODE): GPSTATUS; stdcall;
  5056.   {$EXTERNALSYM GdipGetSmoothingMode}
  5057.  
  5058.   function GdipSetPixelOffsetMode(graphics: GPGRAPHICS;
  5059.     pixelOffsetMode: PIXELOFFSETMODE): GPSTATUS; stdcall;
  5060.   {$EXTERNALSYM GdipSetPixelOffsetMode}
  5061.  
  5062.   function GdipGetPixelOffsetMode(graphics: GPGRAPHICS;
  5063.     var pixelOffsetMode: PIXELOFFSETMODE): GPSTATUS; stdcall;
  5064.   {$EXTERNALSYM GdipGetPixelOffsetMode}
  5065.  
  5066.   function GdipSetTextRenderingHint(graphics: GPGRAPHICS;
  5067.     mode: TEXTRENDERINGHINT): GPSTATUS; stdcall;
  5068.   {$EXTERNALSYM GdipSetTextRenderingHint}
  5069.  
  5070.   function GdipGetTextRenderingHint(graphics: GPGRAPHICS;
  5071.     var mode: TEXTRENDERINGHINT): GPSTATUS; stdcall;
  5072.   {$EXTERNALSYM GdipGetTextRenderingHint}
  5073.  
  5074.   function GdipSetTextContrast(graphics: GPGRAPHICS;
  5075.     contrast: Integer): GPSTATUS; stdcall;
  5076.   {$EXTERNALSYM GdipSetTextContrast}
  5077.  
  5078.   function GdipGetTextContrast(graphics: GPGRAPHICS;
  5079.     var contrast: UINT): GPSTATUS; stdcall;
  5080.   {$EXTERNALSYM GdipGetTextContrast}
  5081.  
  5082.   function GdipSetInterpolationMode(graphics: GPGRAPHICS;
  5083.     interpolationMode: INTERPOLATIONMODE): GPSTATUS; stdcall;
  5084.   {$EXTERNALSYM GdipSetInterpolationMode}
  5085.  
  5086.   function GdipGetInterpolationMode(graphics: GPGRAPHICS;
  5087.     var interpolationMode: INTERPOLATIONMODE): GPSTATUS; stdcall;
  5088.   {$EXTERNALSYM GdipGetInterpolationMode}
  5089.  
  5090.   function GdipSetWorldTransform(graphics: GPGRAPHICS;
  5091.     matrix: GPMATRIX): GPSTATUS; stdcall;
  5092.   {$EXTERNALSYM GdipSetWorldTransform}
  5093.  
  5094.   function GdipResetWorldTransform(graphics: GPGRAPHICS): GPSTATUS; stdcall;
  5095.   {$EXTERNALSYM GdipResetWorldTransform}
  5096.  
  5097.   function GdipMultiplyWorldTransform(graphics: GPGRAPHICS; matrix: GPMATRIX;
  5098.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  5099.   {$EXTERNALSYM GdipMultiplyWorldTransform}
  5100.  
  5101.   function GdipTranslateWorldTransform(graphics: GPGRAPHICS; dx: Single;
  5102.     dy: Single; order: GPMATRIXORDER): GPSTATUS; stdcall;
  5103.   {$EXTERNALSYM GdipTranslateWorldTransform}
  5104.  
  5105.   function GdipScaleWorldTransform(graphics: GPGRAPHICS; sx: Single; sy: Single;
  5106.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  5107.   {$EXTERNALSYM GdipScaleWorldTransform}
  5108.  
  5109.   function GdipRotateWorldTransform(graphics: GPGRAPHICS; angle: Single;
  5110.     order: GPMATRIXORDER): GPSTATUS; stdcall;
  5111.   {$EXTERNALSYM GdipRotateWorldTransform}
  5112.  
  5113.   function GdipGetWorldTransform(graphics: GPGRAPHICS;
  5114.     matrix: GPMATRIX): GPSTATUS; stdcall;
  5115.   {$EXTERNALSYM GdipGetWorldTransform}
  5116.  
  5117.   function GdipResetPageTransform(graphics: GPGRAPHICS): GPSTATUS; stdcall;
  5118.   {$EXTERNALSYM GdipResetPageTransform}
  5119.  
  5120.   function GdipGetPageUnit(graphics: GPGRAPHICS;
  5121.     var unit_: GPUNIT): GPSTATUS; stdcall;
  5122.   {$EXTERNALSYM GdipGetPageUnit}
  5123.  
  5124.   function GdipGetPageScale(graphics: GPGRAPHICS;
  5125.     var scale: Single): GPSTATUS; stdcall;
  5126.   {$EXTERNALSYM GdipGetPageScale}
  5127.  
  5128.   function GdipSetPageUnit(graphics: GPGRAPHICS;
  5129.     unit_: GPUNIT): GPSTATUS; stdcall;
  5130.   {$EXTERNALSYM GdipSetPageUnit}
  5131.  
  5132.   function GdipSetPageScale(graphics: GPGRAPHICS;
  5133.     scale: Single): GPSTATUS; stdcall;
  5134.   {$EXTERNALSYM GdipSetPageScale}
  5135.  
  5136.   function GdipGetDpiX(graphics: GPGRAPHICS;
  5137.     var dpi: Single): GPSTATUS; stdcall;
  5138.   {$EXTERNALSYM GdipGetDpiX}
  5139.  
  5140.   function GdipGetDpiY(graphics: GPGRAPHICS;
  5141.     var dpi: Single): GPSTATUS; stdcall;
  5142.   {$EXTERNALSYM GdipGetDpiY}
  5143.  
  5144.   function GdipTransformPoints(graphics: GPGRAPHICS;
  5145.     destSpace: GPCOORDINATESPACE; srcSpace: GPCOORDINATESPACE;
  5146.     points: GPPOINTF; count: Integer): GPSTATUS; stdcall;
  5147.   {$EXTERNALSYM GdipTransformPoints}
  5148.  
  5149.   function GdipTransformPointsI(graphics: GPGRAPHICS;
  5150.     destSpace: GPCOORDINATESPACE; srcSpace: GPCOORDINATESPACE;
  5151.     points: GPPOINT; count: Integer): GPSTATUS; stdcall;
  5152.   {$EXTERNALSYM GdipTransformPointsI}
  5153.  
  5154.   function GdipGetNearestColor(graphics: GPGRAPHICS;
  5155.     argb: PARGB): GPSTATUS; stdcall;
  5156.   {$EXTERNALSYM GdipGetNearestColor}
  5157.  
  5158. // Creates the Win9x Halftone Palette (even on NT) with correct Desktop colors
  5159.  
  5160.   function GdipCreateHalftonePalette: HPALETTE; stdcall;
  5161.   {$EXTERNALSYM GdipCreateHalftonePalette}
  5162.  
  5163.   function GdipDrawLine(graphics: GPGRAPHICS; pen: GPPEN; x1: Single;
  5164.     y1: Single; x2: Single; y2: Single): GPSTATUS; stdcall;
  5165.   {$EXTERNALSYM GdipDrawLine}
  5166.  
  5167.   function GdipDrawLineI(graphics: GPGRAPHICS; pen: GPPEN; x1: Integer;
  5168.     y1: Integer; x2: Integer; y2: Integer): GPSTATUS; stdcall;
  5169.   {$EXTERNALSYM GdipDrawLineI}
  5170.  
  5171.   function GdipDrawLines(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF;
  5172.     count: Integer): GPSTATUS; stdcall;
  5173.   {$EXTERNALSYM GdipDrawLines}
  5174.  
  5175.   function GdipDrawLinesI(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT;
  5176.     count: Integer): GPSTATUS; stdcall;
  5177.   {$EXTERNALSYM GdipDrawLinesI}
  5178.  
  5179.   function GdipDrawArc(graphics: GPGRAPHICS; pen: GPPEN; x: Single; y: Single;
  5180.     width: Single; height: Single; startAngle: Single;
  5181.     sweepAngle: Single): GPSTATUS; stdcall;
  5182.   {$EXTERNALSYM GdipDrawArc}
  5183.  
  5184.   function GdipDrawArcI(graphics: GPGRAPHICS; pen: GPPEN; x: Integer;
  5185.     y: Integer; width: Integer; height: Integer; startAngle: Single;
  5186.     sweepAngle: Single): GPSTATUS; stdcall;
  5187.   {$EXTERNALSYM GdipDrawArcI}
  5188.  
  5189.   function GdipDrawBezier(graphics: GPGRAPHICS; pen: GPPEN; x1: Single;
  5190.     y1: Single; x2: Single; y2: Single; x3: Single; y3: Single; x4: Single;
  5191.     y4: Single): GPSTATUS; stdcall;
  5192.   {$EXTERNALSYM GdipDrawBezier}
  5193.  
  5194.   function GdipDrawBezierI(graphics: GPGRAPHICS; pen: GPPEN; x1: Integer;
  5195.     y1: Integer; x2: Integer; y2: Integer; x3: Integer; y3: Integer;
  5196.     x4: Integer; y4: Integer): GPSTATUS; stdcall;
  5197.   {$EXTERNALSYM GdipDrawBezierI}
  5198.  
  5199.   function GdipDrawBeziers(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF;
  5200.     count: Integer): GPSTATUS; stdcall;
  5201.   {$EXTERNALSYM GdipDrawBeziers}
  5202.  
  5203.   function GdipDrawBeziersI(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT;
  5204.     count: Integer): GPSTATUS; stdcall;
  5205.   {$EXTERNALSYM GdipDrawBeziersI}
  5206.  
  5207.   function GdipDrawRectangle(graphics: GPGRAPHICS; pen: GPPEN; x: Single;
  5208.     y: Single; width: Single; height: Single): GPSTATUS; stdcall;
  5209.   {$EXTERNALSYM GdipDrawRectangle}
  5210.  
  5211.   function GdipDrawRectangleI(graphics: GPGRAPHICS; pen: GPPEN; x: Integer;
  5212.     y: Integer; width: Integer; height: Integer): GPSTATUS; stdcall;
  5213.   {$EXTERNALSYM GdipDrawRectangleI}
  5214.  
  5215.   function GdipDrawRectangles(graphics: GPGRAPHICS; pen: GPPEN; rects: GPRECTF;
  5216.     count: Integer): GPSTATUS; stdcall;
  5217.   {$EXTERNALSYM GdipDrawRectangles}
  5218.  
  5219.   function GdipDrawRectanglesI(graphics: GPGRAPHICS; pen: GPPEN; rects: GPRECT;
  5220.     count: Integer): GPSTATUS; stdcall;
  5221.   {$EXTERNALSYM GdipDrawRectanglesI}
  5222.  
  5223.   function GdipDrawEllipse(graphics: GPGRAPHICS; pen: GPPEN; x: Single;
  5224.     y: Single; width: Single; height: Single): GPSTATUS; stdcall;
  5225.   {$EXTERNALSYM GdipDrawEllipse}
  5226.  
  5227.   function GdipDrawEllipseI(graphics: GPGRAPHICS; pen: GPPEN; x: Integer;
  5228.     y: Integer; width: Integer; height: Integer): GPSTATUS; stdcall;
  5229.   {$EXTERNALSYM GdipDrawEllipseI}
  5230.  
  5231.   function GdipDrawPie(graphics: GPGRAPHICS; pen: GPPEN; x: Single; y: Single;
  5232.     width: Single;  height: Single; startAngle: Single;
  5233.     sweepAngle: Single): GPSTATUS; stdcall;
  5234.   {$EXTERNALSYM GdipDrawPie}
  5235.  
  5236.   function GdipDrawPieI(graphics: GPGRAPHICS; pen: GPPEN; x: Integer;
  5237.     y: Integer; width: Integer; height: Integer; startAngle: Single;
  5238.     sweepAngle: Single): GPSTATUS; stdcall;
  5239.   {$EXTERNALSYM GdipDrawPieI}
  5240.  
  5241.   function GdipDrawPolygon(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF;
  5242.     count: Integer): GPSTATUS; stdcall;
  5243.   {$EXTERNALSYM GdipDrawPolygon}
  5244.  
  5245.   function GdipDrawPolygonI(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT;
  5246.     count: Integer): GPSTATUS; stdcall;
  5247.   {$EXTERNALSYM GdipDrawPolygonI}
  5248.  
  5249.   function GdipDrawPath(graphics: GPGRAPHICS; pen: GPPEN;
  5250.     path: GPPATH): GPSTATUS; stdcall;
  5251.   {$EXTERNALSYM GdipDrawPath}
  5252.  
  5253.   function GdipDrawCurve(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF;
  5254.     count: Integer): GPSTATUS; stdcall;
  5255.   {$EXTERNALSYM GdipDrawCurve}
  5256.  
  5257.   function GdipDrawCurveI(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT;
  5258.     count: Integer): GPSTATUS; stdcall;
  5259.   {$EXTERNALSYM GdipDrawCurveI}
  5260.  
  5261.   function GdipDrawCurve2(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF;
  5262.     count: Integer; tension: Single): GPSTATUS; stdcall;
  5263.   {$EXTERNALSYM GdipDrawCurve2}
  5264.  
  5265.   function GdipDrawCurve2I(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT;
  5266.     count: Integer; tension: Single): GPSTATUS; stdcall;
  5267.   {$EXTERNALSYM GdipDrawCurve2I}
  5268.  
  5269.   function GdipDrawCurve3(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINTF;
  5270.     count: Integer; offset: Integer; numberOfSegments: Integer;
  5271.     tension: Single): GPSTATUS; stdcall;
  5272.   {$EXTERNALSYM GdipDrawCurve3}
  5273.  
  5274.   function GdipDrawCurve3I(graphics: GPGRAPHICS; pen: GPPEN; points: GPPOINT;
  5275.     count: Integer; offset: Integer; numberOfSegments: Integer;
  5276.     tension: Single): GPSTATUS; stdcall;
  5277.   {$EXTERNALSYM GdipDrawCurve3I}
  5278.  
  5279.   function GdipDrawClosedCurve(graphics: GPGRAPHICS; pen: GPPEN;
  5280.     points: GPPOINTF; count: Integer): GPSTATUS; stdcall;
  5281.   {$EXTERNALSYM GdipDrawClosedCurve}
  5282.  
  5283.   function GdipDrawClosedCurveI(graphics: GPGRAPHICS; pen: GPPEN;
  5284.     points: GPPOINT; count: Integer): GPSTATUS; stdcall;
  5285.   {$EXTERNALSYM GdipDrawClosedCurveI}
  5286.  
  5287.   function GdipDrawClosedCurve2(graphics: GPGRAPHICS; pen: GPPEN;
  5288.     points: GPPOINTF; count: Integer; tension: Single): GPSTATUS; stdcall;
  5289.   {$EXTERNALSYM GdipDrawClosedCurve2}
  5290.  
  5291.   function GdipDrawClosedCurve2I(graphics: GPGRAPHICS; pen: GPPEN;
  5292.     points: GPPOINT; count: Integer; tension: Single): GPSTATUS; stdcall;
  5293.   {$EXTERNALSYM GdipDrawClosedCurve2I}
  5294.  
  5295.   function GdipGraphicsClear(graphics: GPGRAPHICS;
  5296.     color: ARGB): GPSTATUS; stdcall;
  5297.   {$EXTERNALSYM GdipGraphicsClear}
  5298.  
  5299.   function GdipFillRectangle(graphics: GPGRAPHICS; brush: GPBRUSH; x: Single;
  5300.     y: Single; width: Single; height: Single): GPSTATUS; stdcall;
  5301.   {$EXTERNALSYM GdipFillRectangle}
  5302.  
  5303.   function GdipFillRectangleI(graphics: GPGRAPHICS; brush: GPBRUSH; x: Integer;
  5304.     y: Integer; width: Integer; height: Integer): GPSTATUS; stdcall;
  5305.   {$EXTERNALSYM GdipFillRectangleI}
  5306.  
  5307.   function GdipFillRectangles(graphics: GPGRAPHICS; brush: GPBRUSH;
  5308.     rects: GPRECTF; count: Integer): GPSTATUS; stdcall;
  5309.   {$EXTERNALSYM GdipFillRectangles}
  5310.  
  5311.   function GdipFillRectanglesI(graphics: GPGRAPHICS; brush: GPBRUSH;
  5312.     rects: GPRECT; count: Integer): GPSTATUS; stdcall;
  5313.   {$EXTERNALSYM GdipFillRectanglesI}
  5314.  
  5315.   function GdipFillPolygon(graphics: GPGRAPHICS; brush: GPBRUSH;
  5316.     points: GPPOINTF; count: Integer; fillMode: GPFILLMODE): GPSTATUS; stdcall;
  5317.   {$EXTERNALSYM GdipFillPolygon}
  5318.  
  5319.   function GdipFillPolygonI(graphics: GPGRAPHICS; brush: GPBRUSH;
  5320.     points: GPPOINT; count: Integer; fillMode: GPFILLMODE): GPSTATUS; stdcall;
  5321.   {$EXTERNALSYM GdipFillPolygonI}
  5322.  
  5323.   function GdipFillPolygon2(graphics: GPGRAPHICS; brush: GPBRUSH;
  5324.     points: GPPOINTF; count: Integer): GPSTATUS; stdcall;
  5325.   {$EXTERNALSYM GdipFillPolygon2}
  5326.  
  5327.   function GdipFillPolygon2I(graphics: GPGRAPHICS; brush: GPBRUSH;
  5328.     points: GPPOINT; count: Integer): GPSTATUS; stdcall;
  5329.   {$EXTERNALSYM GdipFillPolygon2I}
  5330.  
  5331.   function GdipFillEllipse(graphics: GPGRAPHICS; brush: GPBRUSH; x: Single;
  5332.     y: Single; width: Single; height: Single): GPSTATUS; stdcall;
  5333.   {$EXTERNALSYM GdipFillEllipse}
  5334.  
  5335.   function GdipFillEllipseI(graphics: GPGRAPHICS; brush: GPBRUSH; x: Integer;
  5336.     y: Integer; width: Integer; height: Integer): GPSTATUS; stdcall;
  5337.   {$EXTERNALSYM GdipFillEllipseI}
  5338.  
  5339.   function GdipFillPie(graphics: GPGRAPHICS; brush: GPBRUSH; x: Single;
  5340.     y: Single; width: Single; height: Single; startAngle: Single;
  5341.     sweepAngle: Single): GPSTATUS; stdcall;
  5342.   {$EXTERNALSYM GdipFillPie}
  5343.  
  5344.   function GdipFillPieI(graphics: GPGRAPHICS; brush: GPBRUSH; x: Integer;
  5345.     y: Integer; width: Integer; height: Integer; startAngle: Single;
  5346.     sweepAngle: Single): GPSTATUS; stdcall;
  5347.   {$EXTERNALSYM GdipFillPieI}
  5348.  
  5349.   function GdipFillPath(graphics: GPGRAPHICS; brush: GPBRUSH;
  5350.     path: GPPATH): GPSTATUS; stdcall;
  5351.   {$EXTERNALSYM GdipFillPath}
  5352.  
  5353.   function GdipFillClosedCurve(graphics: GPGRAPHICS; brush: GPBRUSH;
  5354.     points: GPPOINTF; count: Integer): GPSTATUS; stdcall;
  5355.   {$EXTERNALSYM GdipFillClosedCurve}
  5356.  
  5357.   function GdipFillClosedCurveI(graphics: GPGRAPHICS; brush: GPBRUSH;
  5358.     points: GPPOINT; count: Integer): GPSTATUS; stdcall;
  5359.   {$EXTERNALSYM GdipFillClosedCurveI}
  5360.  
  5361.   function GdipFillClosedCurve2(graphics: GPGRAPHICS; brush: GPBRUSH;
  5362.     points: GPPOINTF; count: Integer; tension: Single;
  5363.     fillMode: GPFILLMODE): GPSTATUS; stdcall;
  5364.   {$EXTERNALSYM GdipFillClosedCurve2}
  5365.  
  5366.   function GdipFillClosedCurve2I(graphics: GPGRAPHICS; brush: GPBRUSH;
  5367.     points: GPPOINT; count: Integer; tension: Single;
  5368.     fillMode: GPFILLMODE): GPSTATUS; stdcall;
  5369.   {$EXTERNALSYM GdipFillClosedCurve2I}
  5370.  
  5371.   function GdipFillRegion(graphics: GPGRAPHICS; brush: GPBRUSH;
  5372.     region: GPREGION): GPSTATUS; stdcall;
  5373.   {$EXTERNALSYM GdipFillRegion}
  5374.  
  5375.   function GdipDrawImage(graphics: GPGRAPHICS; image: GPIMAGE; x: Single;
  5376.     y: Single): GPSTATUS; stdcall;
  5377.   {$EXTERNALSYM GdipDrawImage}
  5378.  
  5379.   function GdipDrawImageI(graphics: GPGRAPHICS; image: GPIMAGE; x: Integer;
  5380.     y: Integer): GPSTATUS; stdcall;
  5381.   {$EXTERNALSYM GdipDrawImageI}
  5382.  
  5383.   function GdipDrawImageRect(graphics: GPGRAPHICS; image: GPIMAGE; x: Single;
  5384.     y: Single; width: Single; height: Single): GPSTATUS; stdcall;
  5385.   {$EXTERNALSYM GdipDrawImageRect}
  5386.  
  5387.   function GdipDrawImageRectI(graphics: GPGRAPHICS; image: GPIMAGE; x: Integer;
  5388.     y: Integer; width: Integer; height: Integer): GPSTATUS; stdcall;
  5389.   {$EXTERNALSYM GdipDrawImageRectI}
  5390.  
  5391.   function GdipDrawImagePoints(graphics: GPGRAPHICS; image: GPIMAGE;
  5392.     dstpoints: GPPOINTF; count: Integer): GPSTATUS; stdcall;
  5393.   {$EXTERNALSYM GdipDrawImagePoints}
  5394.  
  5395.   function GdipDrawImagePointsI(graphics: GPGRAPHICS; image: GPIMAGE;
  5396.     dstpoints: GPPOINT; count: Integer): GPSTATUS; stdcall;
  5397.   {$EXTERNALSYM GdipDrawImagePointsI}
  5398.  
  5399.   function GdipDrawImagePointRect(graphics: GPGRAPHICS; image: GPIMAGE;
  5400.     x: Single; y: Single; srcx: Single; srcy: Single; srcwidth: Single;
  5401.     srcheight: Single; srcUnit: GPUNIT): GPSTATUS; stdcall;
  5402.   {$EXTERNALSYM GdipDrawImagePointRect}
  5403.  
  5404.   function GdipDrawImagePointRectI(graphics: GPGRAPHICS; image: GPIMAGE;
  5405.     x: Integer; y: Integer; srcx: Integer; srcy: Integer; srcwidth: Integer;
  5406.     srcheight: Integer; srcUnit: GPUNIT): GPSTATUS; stdcall;
  5407.   {$EXTERNALSYM GdipDrawImagePointRectI}
  5408.  
  5409.   function GdipDrawImageRectRect(graphics: GPGRAPHICS; image: GPIMAGE;
  5410.     dstx: Single; dsty: Single; dstwidth: Single; dstheight: Single;
  5411.     srcx: Single; srcy: Single; srcwidth: Single; srcheight: Single;
  5412.     srcUnit: GPUNIT; imageAttributes: GPIMAGEATTRIBUTES;
  5413.     callback: DRAWIMAGEABORT; callbackData: Pointer): GPSTATUS; stdcall;
  5414.   {$EXTERNALSYM GdipDrawImageRectRect}
  5415.  
  5416.   function GdipDrawImageRectRectI(graphics: GPGRAPHICS; image: GPIMAGE;
  5417.     dstx: Integer; dsty: Integer; dstwidth: Integer; dstheight: Integer;
  5418.     srcx: Integer; srcy: Integer; srcwidth: Integer; srcheight: Integer;
  5419.     srcUnit: GPUNIT; imageAttributes: GPIMAGEATTRIBUTES;
  5420.     callback: DRAWIMAGEABORT; callbackData: Pointer): GPSTATUS; stdcall;
  5421.   {$EXTERNALSYM GdipDrawImageRectRectI}
  5422.  
  5423.   function GdipDrawImagePointsRect(graphics: GPGRAPHICS; image: GPIMAGE;
  5424.     points: GPPOINTF; count: Integer; srcx: Single; srcy: Single;
  5425.     srcwidth: Single; srcheight: Single; srcUnit: GPUNIT;
  5426.     imageAttributes: GPIMAGEATTRIBUTES; callback: DRAWIMAGEABORT;
  5427.     callbackData: Pointer): GPSTATUS; stdcall;
  5428.   {$EXTERNALSYM GdipDrawImagePointsRect}
  5429.  
  5430.   function GdipDrawImagePointsRectI(graphics: GPGRAPHICS; image: GPIMAGE;
  5431.     points: GPPOINT; count: Integer; srcx: Integer; srcy: Integer;
  5432.     srcwidth: Integer; srcheight: Integer; srcUnit: GPUNIT;
  5433.     imageAttributes: GPIMAGEATTRIBUTES; callback: DRAWIMAGEABORT;
  5434.     callbackData: Pointer): GPSTATUS; stdcall;
  5435.   {$EXTERNALSYM GdipDrawImagePointsRectI}
  5436.  
  5437.   function GdipEnumerateMetafileDestPoint(graphics: GPGRAPHICS;
  5438.     metafile: GPMETAFILE; destPoint: PGPPointF; callback: ENUMERATEMETAFILEPROC;
  5439.     callbackData: Pointer;
  5440.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5441.   {$EXTERNALSYM GdipEnumerateMetafileDestPoint}
  5442.  
  5443.   function GdipEnumerateMetafileDestPointI(graphics: GPGRAPHICS;
  5444.     metafile: GPMETAFILE; destPoint: PGPPoint; callback: ENUMERATEMETAFILEPROC;
  5445.     callbackData: Pointer;
  5446.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5447.   {$EXTERNALSYM GdipEnumerateMetafileDestPointI}
  5448.  
  5449.   function GdipEnumerateMetafileDestRect(graphics: GPGRAPHICS;
  5450.     metafile: GPMETAFILE; destRect: PGPRectF; callback: ENUMERATEMETAFILEPROC;
  5451.     callbackData: Pointer;
  5452.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5453.   {$EXTERNALSYM GdipEnumerateMetafileDestRect}
  5454.  
  5455.   function GdipEnumerateMetafileDestRectI(graphics: GPGRAPHICS;
  5456.     metafile: GPMETAFILE; destRect: PGPRect; callback: ENUMERATEMETAFILEPROC;
  5457.     callbackData: Pointer;
  5458.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5459.   {$EXTERNALSYM GdipEnumerateMetafileDestRectI}
  5460.  
  5461.   function GdipEnumerateMetafileDestPoints(graphics: GPGRAPHICS;
  5462.     metafile: GPMETAFILE; destPoints: PGPPointF; count: Integer;
  5463.     callback: ENUMERATEMETAFILEPROC; callbackData: Pointer;
  5464.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5465.   {$EXTERNALSYM GdipEnumerateMetafileDestPoints}
  5466.  
  5467.   function GdipEnumerateMetafileDestPointsI(graphics: GPGRAPHICS;
  5468.     metafile: GPMETAFILE; destPoints: PGPPoint; count: Integer;
  5469.     callback: ENUMERATEMETAFILEPROC; callbackData: Pointer;
  5470.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5471.   {$EXTERNALSYM GdipEnumerateMetafileDestPointsI}
  5472.  
  5473.   function GdipEnumerateMetafileSrcRectDestPoint(graphics: GPGRAPHICS;
  5474.     metafile: GPMETAFILE; destPoint: PGPPointF; srcRect: PGPRectF; srcUnit: TUNIT;
  5475.     callback: ENUMERATEMETAFILEPROC; callbackData: Pointer;
  5476.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5477.   {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestPoint}
  5478.  
  5479.   function GdipEnumerateMetafileSrcRectDestPointI(graphics: GPGRAPHICS;
  5480.     metafile: GPMETAFILE; destPoint: PGPPoint; srcRect: PGPRect; srcUnit: TUNIT;
  5481.     callback: ENUMERATEMETAFILEPROC; callbackData: Pointer;
  5482.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5483.   {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestPointI}
  5484.  
  5485.   function GdipEnumerateMetafileSrcRectDestRect(graphics: GPGRAPHICS;
  5486.     metafile: GPMETAFILE; destRect: PGPRectF; srcRect: PGPRectF; srcUnit: TUNIT;
  5487.     callback: ENUMERATEMETAFILEPROC; callbackData: Pointer;
  5488.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5489.   {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestRect}
  5490.  
  5491.   function GdipEnumerateMetafileSrcRectDestRectI(graphics: GPGRAPHICS;
  5492.     metafile: GPMETAFILE; destRect: PGPRect; srcRect: PGPRect; srcUnit: TUNIT;
  5493.     callback: ENUMERATEMETAFILEPROC; callbackData: Pointer;
  5494.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5495.   {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestRectI}
  5496.  
  5497.   function GdipEnumerateMetafileSrcRectDestPoints(graphics: GPGRAPHICS;
  5498.     metafile: GPMETAFILE; destPoints: PGPPointF; count: Integer; srcRect: PGPRectF;
  5499.     srcUnit: TUNIT; callback: ENUMERATEMETAFILEPROC; callbackData: Pointer;
  5500.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5501.   {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestPoints}
  5502.  
  5503.   function GdipEnumerateMetafileSrcRectDestPointsI(graphics: GPGRAPHICS;
  5504.     metafile: GPMETAFILE; destPoints: PGPPoint; count: Integer; srcRect: PGPRect;
  5505.     srcUnit: TUNIT; callback: ENUMERATEMETAFILEPROC; callbackData: Pointer;
  5506.     imageAttributes: GPIMAGEATTRIBUTES): GPSTATUS; stdcall;
  5507.   {$EXTERNALSYM GdipEnumerateMetafileSrcRectDestPointsI}
  5508.  
  5509.   function GdipPlayMetafileRecord(metafile: GPMETAFILE;
  5510.     recordType: EMFPLUSRECORDTYPE; flags: UINT; dataSize: UINT;
  5511.     data: PBYTE): GPSTATUS; stdcall;
  5512.   {$EXTERNALSYM GdipPlayMetafileRecord}
  5513.  
  5514.   function GdipSetClipGraphics(graphics: GPGRAPHICS; srcgraphics: GPGRAPHICS;
  5515.     combineMode: COMBINEMODE): GPSTATUS; stdcall;
  5516.   {$EXTERNALSYM GdipSetClipGraphics}
  5517.  
  5518.   function GdipSetClipRect(graphics: GPGRAPHICS; x: Single; y: Single;
  5519.     width: Single; height: Single; combineMode: COMBINEMODE): GPSTATUS; stdcall;
  5520.   {$EXTERNALSYM GdipSetClipRect}
  5521.  
  5522.   function GdipSetClipRectI(graphics: GPGRAPHICS; x: Integer; y: Integer;
  5523.     width: Integer; height: Integer;
  5524.     combineMode: COMBINEMODE): GPSTATUS; stdcall;
  5525.   {$EXTERNALSYM GdipSetClipRectI}
  5526.  
  5527.   function GdipSetClipPath(graphics: GPGRAPHICS; path: GPPATH;
  5528.     combineMode: COMBINEMODE): GPSTATUS; stdcall;
  5529.   {$EXTERNALSYM GdipSetClipPath}
  5530.  
  5531.   function GdipSetClipRegion(graphics: GPGRAPHICS; region: GPREGION;
  5532.     combineMode: COMBINEMODE): GPSTATUS; stdcall;
  5533.   {$EXTERNALSYM GdipSetClipRegion}
  5534.  
  5535.   function GdipSetClipHrgn(graphics: GPGRAPHICS; hRgn: HRGN;
  5536.     combineMode: COMBINEMODE): GPSTATUS; stdcall;
  5537.   {$EXTERNALSYM GdipSetClipHrgn}
  5538.  
  5539.   function GdipResetClip(graphics: GPGRAPHICS): GPSTATUS; stdcall;
  5540.   {$EXTERNALSYM GdipResetClip}
  5541.  
  5542.   function GdipTranslateClip(graphics: GPGRAPHICS; dx: Single;
  5543.     dy: Single): GPSTATUS; stdcall;
  5544.   {$EXTERNALSYM GdipTranslateClip}
  5545.  
  5546.   function GdipTranslateClipI(graphics: GPGRAPHICS; dx: Integer;
  5547.     dy: Integer): GPSTATUS; stdcall;
  5548.   {$EXTERNALSYM GdipTranslateClipI}
  5549.  
  5550.   function GdipGetClip(graphics: GPGRAPHICS;
  5551.     region: GPREGION): GPSTATUS; stdcall;
  5552.   {$EXTERNALSYM GdipGetClip}
  5553.  
  5554.   function GdipGetClipBounds(graphics: GPGRAPHICS;
  5555.     rect: GPRECTF): GPSTATUS; stdcall;
  5556.   {$EXTERNALSYM GdipGetClipBounds}
  5557.  
  5558.   function GdipGetClipBoundsI(graphics: GPGRAPHICS;
  5559.     rect: GPRECT): GPSTATUS; stdcall;
  5560.   {$EXTERNALSYM GdipGetClipBoundsI}
  5561.  
  5562.   function GdipIsClipEmpty(graphics: GPGRAPHICS;
  5563.     result: PBool): GPSTATUS; stdcall;
  5564.   {$EXTERNALSYM GdipIsClipEmpty}
  5565.  
  5566.   function GdipGetVisibleClipBounds(graphics: GPGRAPHICS;
  5567.     rect: GPRECTF): GPSTATUS; stdcall;
  5568.   {$EXTERNALSYM GdipGetVisibleClipBounds}
  5569.  
  5570.   function GdipGetVisibleClipBoundsI(graphics: GPGRAPHICS;
  5571.     rect: GPRECT): GPSTATUS; stdcall;
  5572.   {$EXTERNALSYM GdipGetVisibleClipBoundsI}
  5573.  
  5574.   function GdipIsVisibleClipEmpty(graphics: GPGRAPHICS;
  5575.     var result: Bool): GPSTATUS; stdcall;
  5576.   {$EXTERNALSYM GdipIsVisibleClipEmpty}
  5577.  
  5578.   function GdipIsVisiblePoint(graphics: GPGRAPHICS; x: Single; y: Single;
  5579.     var result: Bool): GPSTATUS; stdcall;
  5580.   {$EXTERNALSYM GdipIsVisiblePoint}
  5581.  
  5582.   function GdipIsVisiblePointI(graphics: GPGRAPHICS; x: Integer; y: Integer;
  5583.     var result: Bool): GPSTATUS; stdcall;
  5584.   {$EXTERNALSYM GdipIsVisiblePointI}
  5585.  
  5586.   function GdipIsVisibleRect(graphics: GPGRAPHICS; x: Single; y: Single;
  5587.     width: Single; height: Single; var result: Bool): GPSTATUS; stdcall;
  5588.   {$EXTERNALSYM GdipIsVisibleRect}
  5589.  
  5590.   function GdipIsVisibleRectI(graphics: GPGRAPHICS; x: Integer; y: Integer;
  5591.     width: Integer; height: Integer; var result: Bool): GPSTATUS; stdcall;
  5592.   {$EXTERNALSYM GdipIsVisibleRectI}
  5593.  
  5594.   function GdipSaveGraphics(graphics: GPGRAPHICS;
  5595.     var state: GRAPHICSSTATE): GPSTATUS; stdcall;
  5596.   {$EXTERNALSYM GdipSaveGraphics}
  5597.  
  5598.   function GdipRestoreGraphics(graphics: GPGRAPHICS;
  5599.     state: GRAPHICSSTATE): GPSTATUS; stdcall;
  5600.   {$EXTERNALSYM GdipRestoreGraphics}
  5601.  
  5602.   function GdipBeginContainer(graphics: GPGRAPHICS; dstrect: GPRECTF;
  5603.     srcrect: GPRECTF; unit_: GPUNIT;
  5604.     var state: GRAPHICSCONTAINER): GPSTATUS; stdcall;
  5605.   {$EXTERNALSYM GdipBeginContainer}
  5606.  
  5607.   function GdipBeginContainerI(graphics: GPGRAPHICS; dstrect: GPRECT;
  5608.     srcrect: GPRECT; unit_: GPUNIT;
  5609.     var state: GRAPHICSCONTAINER): GPSTATUS; stdcall;
  5610.   {$EXTERNALSYM GdipBeginContainerI}
  5611.  
  5612.   function GdipBeginContainer2(graphics: GPGRAPHICS;
  5613.     var state: GRAPHICSCONTAINER): GPSTATUS; stdcall;
  5614.   {$EXTERNALSYM GdipBeginContainer2}
  5615.  
  5616.   function GdipEndContainer(graphics: GPGRAPHICS;
  5617.     state: GRAPHICSCONTAINER): GPSTATUS; stdcall;
  5618.   {$EXTERNALSYM GdipEndContainer}
  5619.  
  5620.   function GdipGetMetafileHeaderFromWmf(hWmf: HMETAFILE;
  5621.     wmfPlaceableFileHeader: PWMFPLACEABLEFILEHEADER;
  5622.     header: Pointer): GPSTATUS; stdcall;
  5623.   {$EXTERNALSYM GdipGetMetafileHeaderFromWmf}
  5624.  
  5625.   function GdipGetMetafileHeaderFromEmf(hEmf: HENHMETAFILE;
  5626.     header: Pointer): GPSTATUS; stdcall;
  5627.   {$EXTERNALSYM GdipGetMetafileHeaderFromEmf}
  5628.  
  5629.   function GdipGetMetafileHeaderFromFile(filename: PWCHAR;
  5630.     header: Pointer): GPSTATUS; stdcall;
  5631.   {$EXTERNALSYM GdipGetMetafileHeaderFromFile}
  5632.  
  5633.   function GdipGetMetafileHeaderFromStream(stream: ISTREAM;
  5634.     header: Pointer): GPSTATUS; stdcall;
  5635.   {$EXTERNALSYM GdipGetMetafileHeaderFromStream}
  5636.  
  5637.   function GdipGetMetafileHeaderFromMetafile(metafile: GPMETAFILE;
  5638.     header: Pointer): GPSTATUS; stdcall;
  5639.   {$EXTERNALSYM GdipGetMetafileHeaderFromMetafile}
  5640.  
  5641.   function GdipGetHemfFromMetafile(metafile: GPMETAFILE;
  5642.     var hEmf: HENHMETAFILE): GPSTATUS; stdcall;
  5643.   {$EXTERNALSYM GdipGetHemfFromMetafile}
  5644.  
  5645.   function GdipCreateStreamOnFile(filename: PWCHAR; access: UINT;
  5646.     out stream: ISTREAM): GPSTATUS; stdcall;
  5647.   {$EXTERNALSYM GdipCreateStreamOnFile}
  5648.  
  5649.   function GdipCreateMetafileFromWmf(hWmf: HMETAFILE; deleteWmf: Bool;
  5650.     wmfPlaceableFileHeader: PWMFPLACEABLEFILEHEADER;
  5651.     out metafile: GPMETAFILE): GPSTATUS; stdcall;
  5652.   {$EXTERNALSYM GdipCreateMetafileFromWmf}
  5653.  
  5654.   function GdipCreateMetafileFromEmf(hEmf: HENHMETAFILE; deleteEmf: Bool;
  5655.     out metafile: GPMETAFILE): GPSTATUS; stdcall;
  5656.   {$EXTERNALSYM GdipCreateMetafileFromEmf}
  5657.  
  5658.   function GdipCreateMetafileFromFile(file_: PWCHAR;
  5659.     out metafile: GPMETAFILE): GPSTATUS; stdcall;
  5660.   {$EXTERNALSYM GdipCreateMetafileFromFile}
  5661.  
  5662.   function GdipCreateMetafileFromWmfFile(file_: PWCHAR;
  5663.     wmfPlaceableFileHeader: PWMFPLACEABLEFILEHEADER;
  5664.     out metafile: GPMETAFILE): GPSTATUS; stdcall;
  5665.   {$EXTERNALSYM GdipCreateMetafileFromWmfFile}
  5666.  
  5667.   function GdipCreateMetafileFromStream(stream: ISTREAM;
  5668.     out metafile: GPMETAFILE): GPSTATUS; stdcall;
  5669.   {$EXTERNALSYM GdipCreateMetafileFromStream}
  5670.  
  5671.   function GdipRecordMetafile(referenceHdc: HDC; type_: EMFTYPE;
  5672.     frameRect: GPRECTF; frameUnit: METAFILEFRAMEUNIT;
  5673.     description: PWCHAR; out metafile: GPMETAFILE): GPSTATUS; stdcall;
  5674.   {$EXTERNALSYM GdipRecordMetafile}
  5675.  
  5676.   function GdipRecordMetafileI(referenceHdc: HDC; type_: EMFTYPE;
  5677.     frameRect: GPRECT; frameUnit: METAFILEFRAMEUNIT; description: PWCHAR;
  5678.     out metafile: GPMETAFILE): GPSTATUS; stdcall;
  5679.   {$EXTERNALSYM GdipRecordMetafileI}
  5680.  
  5681.   function GdipRecordMetafileFileName(fileName: PWCHAR; referenceHdc: HDC;
  5682.     type_: EMFTYPE; frameRect: GPRECTF; frameUnit: METAFILEFRAMEUNIT;
  5683.     description: PWCHAR; out metafile: GPMETAFILE): GPSTATUS; stdcall;
  5684.   {$EXTERNALSYM GdipRecordMetafileFileName}
  5685.  
  5686.   function GdipRecordMetafileFileNameI(fileName: PWCHAR; referenceHdc: HDC;
  5687.     type_: EMFTYPE; frameRect: GPRECT; frameUnit: METAFILEFRAMEUNIT;
  5688.     description: PWCHAR; out metafile: GPMETAFILE): GPSTATUS; stdcall;
  5689.   {$EXTERNALSYM GdipRecordMetafileFileNameI}
  5690.  
  5691.   function GdipRecordMetafileStream(stream: ISTREAM; referenceHdc: HDC;
  5692.     type_: EMFTYPE; frameRect: GPRECTF; frameUnit: METAFILEFRAMEUNIT;
  5693.     description: PWCHAR; out metafile: GPMETAFILE): GPSTATUS; stdcall;
  5694.   {$EXTERNALSYM GdipRecordMetafileStream}
  5695.  
  5696.   function GdipRecordMetafileStreamI(stream: ISTREAM; referenceHdc: HDC;
  5697.     type_: EMFTYPE; frameRect: GPRECT; frameUnit: METAFILEFRAMEUNIT;
  5698.     description: PWCHAR; out metafile: GPMETAFILE): GPSTATUS; stdcall;
  5699.   {$EXTERNALSYM GdipRecordMetafileStreamI}
  5700.  
  5701.   function GdipSetMetafileDownLevelRasterizationLimit(metafile: GPMETAFILE;
  5702.     metafileRasterizationLimitDpi: UINT): GPSTATUS; stdcall;
  5703.   {$EXTERNALSYM GdipSetMetafileDownLevelRasterizationLimit}
  5704.  
  5705.   function GdipGetMetafileDownLevelRasterizationLimit(metafile: GPMETAFILE;
  5706.     var metafileRasterizationLimitDpi: UINT): GPSTATUS; stdcall;
  5707.   {$EXTERNALSYM GdipGetMetafileDownLevelRasterizationLimit}
  5708.  
  5709.   function GdipGetImageDecodersSize(out numDecoders: UINT;
  5710.     out size: UINT): GPSTATUS; stdcall;
  5711.   {$EXTERNALSYM GdipGetImageDecodersSize}
  5712.  
  5713.   function GdipGetImageDecoders(numDecoders: UINT; size: UINT;
  5714.     decoders: PIMAGECODECINFO): GPSTATUS; stdcall;
  5715.   {$EXTERNALSYM GdipGetImageDecoders}
  5716.  
  5717.   function GdipGetImageEncodersSize(out numEncoders: UINT;
  5718.     out size: UINT): GPSTATUS; stdcall;
  5719.   {$EXTERNALSYM GdipGetImageEncodersSize}
  5720.  
  5721.   function GdipGetImageEncoders(numEncoders: UINT; size: UINT;
  5722.     encoders: PIMAGECODECINFO): GPSTATUS; stdcall;
  5723.   {$EXTERNALSYM GdipGetImageEncoders}
  5724.  
  5725.   function GdipComment(graphics: GPGRAPHICS; sizeData: UINT;
  5726.     data: PBYTE): GPSTATUS; stdcall;
  5727.   {$EXTERNALSYM GdipComment}
  5728.  
  5729. //----------------------------------------------------------------------------
  5730. // FontFamily APIs
  5731. //----------------------------------------------------------------------------
  5732.  
  5733.   function GdipCreateFontFamilyFromName(name: PWCHAR;
  5734.     fontCollection: GPFONTCOLLECTION;
  5735.     out FontFamily: GPFONTFAMILY): GPSTATUS; stdcall;
  5736.   {$EXTERNALSYM GdipCreateFontFamilyFromName}
  5737.  
  5738.   function GdipDeleteFontFamily(FontFamily: GPFONTFAMILY): GPSTATUS; stdcall;
  5739.   {$EXTERNALSYM GdipDeleteFontFamily}
  5740.  
  5741.   function GdipCloneFontFamily(FontFamily: GPFONTFAMILY;
  5742.     out clonedFontFamily: GPFONTFAMILY): GPSTATUS; stdcall;
  5743.   {$EXTERNALSYM GdipCloneFontFamily}
  5744.  
  5745.   function GdipGetGenericFontFamilySansSerif(
  5746.     out nativeFamily: GPFONTFAMILY): GPSTATUS; stdcall;
  5747.   {$EXTERNALSYM GdipGetGenericFontFamilySansSerif}
  5748.  
  5749.   function GdipGetGenericFontFamilySerif(
  5750.     out nativeFamily: GPFONTFAMILY): GPSTATUS; stdcall;
  5751.   {$EXTERNALSYM GdipGetGenericFontFamilySerif}
  5752.  
  5753.   function GdipGetGenericFontFamilyMonospace(
  5754.     out nativeFamily: GPFONTFAMILY): GPSTATUS; stdcall;
  5755.   {$EXTERNALSYM GdipGetGenericFontFamilyMonospace}
  5756.  
  5757.   function GdipGetFamilyName(family: GPFONTFAMILY; name: PWideChar;
  5758.     language: LANGID): GPSTATUS; stdcall;
  5759.   {$EXTERNALSYM GdipGetFamilyName}
  5760.  
  5761.   function GdipIsStyleAvailable(family: GPFONTFAMILY; style: Integer;
  5762.     var IsStyleAvailable: Bool): GPSTATUS; stdcall;
  5763.   {$EXTERNALSYM GdipIsStyleAvailable}
  5764.  
  5765.   function GdipFontCollectionEnumerable(fontCollection: GPFONTCOLLECTION;
  5766.     graphics: GPGRAPHICS; var numFound: Integer): GPSTATUS; stdcall;
  5767.   {$EXTERNALSYM GdipFontCollectionEnumerable}
  5768.  
  5769.   function GdipFontCollectionEnumerate(fontCollection: GPFONTCOLLECTION;
  5770.     numSought: Integer; gpfamilies: array of GPFONTFAMILY;
  5771.     var numFound: Integer; graphics: GPGRAPHICS): GPSTATUS; stdcall;
  5772.   {$EXTERNALSYM GdipFontCollectionEnumerate}
  5773.  
  5774.   function GdipGetEmHeight(family: GPFONTFAMILY; style: Integer;
  5775.     out EmHeight: UINT16): GPSTATUS; stdcall;
  5776.   {$EXTERNALSYM GdipGetEmHeight}
  5777.  
  5778.   function GdipGetCellAscent(family: GPFONTFAMILY; style: Integer;
  5779.     var CellAscent: UINT16): GPSTATUS; stdcall;
  5780.   {$EXTERNALSYM GdipGetCellAscent}
  5781.  
  5782.   function GdipGetCellDescent(family: GPFONTFAMILY; style: Integer;
  5783.     var CellDescent: UINT16): GPSTATUS; stdcall;
  5784.   {$EXTERNALSYM GdipGetCellDescent}
  5785.  
  5786.   function GdipGetLineSpacing(family: GPFONTFAMILY; style: Integer;
  5787.     var LineSpacing: UINT16): GPSTATUS; stdcall;
  5788.   {$EXTERNALSYM GdipGetLineSpacing}
  5789.  
  5790. //----------------------------------------------------------------------------
  5791. // Font APIs
  5792. //----------------------------------------------------------------------------
  5793.  
  5794.   function GdipCreateFontFromDC(hdc: HDC; out font: GPFONT): GPSTATUS; stdcall;
  5795.   {$EXTERNALSYM GdipCreateFontFromDC}
  5796.  
  5797.   function GdipCreateFontFromLogfontA(hdc: HDC; logfont: PLOGFONTA;
  5798.     out font: GPFONT): GPSTATUS; stdcall;
  5799.   {$EXTERNALSYM GdipCreateFontFromLogfontA}
  5800.  
  5801.   function GdipCreateFontFromLogfontW(hdc: HDC; logfont: PLOGFONTW;
  5802.     out font: GPFONT): GPSTATUS; stdcall;
  5803.   {$EXTERNALSYM GdipCreateFontFromLogfontW}
  5804.  
  5805.   function GdipCreateFont(fontFamily: GPFONTFAMILY; emSize: Single;
  5806.     style: Integer; unit_: Integer; out font: GPFONT): GPSTATUS; stdcall;
  5807.   {$EXTERNALSYM GdipCreateFont}
  5808.  
  5809.   function GdipCloneFont(font: GPFONT;
  5810.     out cloneFont: GPFONT): GPSTATUS; stdcall;
  5811.   {$EXTERNALSYM GdipCloneFont}
  5812.  
  5813.   function GdipDeleteFont(font: GPFONT): GPSTATUS; stdcall;
  5814.   {$EXTERNALSYM GdipDeleteFont}
  5815.  
  5816.   function GdipGetFamily(font: GPFONT;
  5817.     out family: GPFONTFAMILY): GPSTATUS; stdcall;
  5818.   {$EXTERNALSYM GdipGetFamily}
  5819.  
  5820.   function GdipGetFontStyle(font: GPFONT;
  5821.     var style: Integer): GPSTATUS; stdcall;
  5822.   {$EXTERNALSYM GdipGetFontStyle}
  5823.  
  5824.   function GdipGetFontSize(font: GPFONT; var size: Single): GPSTATUS; stdcall;
  5825.   {$EXTERNALSYM GdipGetFontSize}
  5826.  
  5827.   function GdipGetFontUnit(font: GPFONT; var unit_: TUNIT): GPSTATUS; stdcall;
  5828.   {$EXTERNALSYM GdipGetFontUnit}
  5829.  
  5830.   function GdipGetFontHeight(font: GPFONT; graphics: GPGRAPHICS;
  5831.     var height: Single): GPSTATUS; stdcall;
  5832.   {$EXTERNALSYM GdipGetFontHeight}
  5833.  
  5834.   function GdipGetFontHeightGivenDPI(font: GPFONT; dpi: Single;
  5835.     var height: Single): GPSTATUS; stdcall;
  5836.   {$EXTERNALSYM GdipGetFontHeightGivenDPI}
  5837.  
  5838.   function GdipGetLogFontA(font: GPFONT; graphics: GPGRAPHICS;
  5839.     var logfontA: LOGFONTA): GPSTATUS; stdcall;
  5840.   {$EXTERNALSYM GdipGetLogFontA}
  5841.  
  5842.   function GdipGetLogFontW(font: GPFONT; graphics: GPGRAPHICS;
  5843.     var logfontW: LOGFONTW): GPSTATUS; stdcall;
  5844.   {$EXTERNALSYM GdipGetLogFontW}
  5845.  
  5846.   function GdipNewInstalledFontCollection(
  5847.     out fontCollection: GPFONTCOLLECTION): GPSTATUS; stdcall;
  5848.   {$EXTERNALSYM GdipNewInstalledFontCollection}
  5849.  
  5850.   function GdipNewPrivateFontCollection(
  5851.     out fontCollection: GPFONTCOLLECTION): GPSTATUS; stdcall;
  5852.   {$EXTERNALSYM GdipNewPrivateFontCollection}
  5853.  
  5854.   function GdipDeletePrivateFontCollection(
  5855.     out fontCollection: GPFONTCOLLECTION): GPSTATUS; stdcall;
  5856.   {$EXTERNALSYM GdipDeletePrivateFontCollection}
  5857.  
  5858.   function GdipGetFontCollectionFamilyCount(fontCollection: GPFONTCOLLECTION;
  5859.     var numFound: Integer): GPSTATUS; stdcall;
  5860.   {$EXTERNALSYM GdipGetFontCollectionFamilyCount}
  5861.  
  5862.   function GdipGetFontCollectionFamilyList(fontCollection: GPFONTCOLLECTION;
  5863.     numSought: Integer; gpfamilies: GPFONTFAMILY;
  5864.     var numFound: Integer): GPSTATUS; stdcall;
  5865.   {$EXTERNALSYM GdipGetFontCollectionFamilyList}
  5866.  
  5867.   function GdipPrivateAddFontFile(fontCollection: GPFONTCOLLECTION;
  5868.     filename: PWCHAR): GPSTATUS; stdcall;
  5869.   {$EXTERNALSYM GdipPrivateAddFontFile}
  5870.  
  5871.   function GdipPrivateAddMemoryFont(fontCollection: GPFONTCOLLECTION;
  5872.     memory: Pointer; length: Integer): GPSTATUS; stdcall;
  5873.   {$EXTERNALSYM GdipPrivateAddMemoryFont}
  5874.  
  5875. //----------------------------------------------------------------------------
  5876. // Text APIs
  5877. //----------------------------------------------------------------------------
  5878.  
  5879.   function GdipDrawString(graphics: GPGRAPHICS; string_: PWCHAR;
  5880.     length: Integer; font: GPFONT; layoutRect: PGPRectF;
  5881.     stringFormat: GPSTRINGFORMAT; brush: GPBRUSH): GPSTATUS; stdcall;
  5882.   {$EXTERNALSYM GdipDrawString}
  5883.  
  5884.   function GdipMeasureString(graphics: GPGRAPHICS; string_: PWCHAR;
  5885.     length: Integer; font: GPFONT; layoutRect: PGPRectF;
  5886.     stringFormat: GPSTRINGFORMAT; boundingBox: PGPRectF;
  5887.     codepointsFitted: PInteger; linesFilled: PInteger): GPSTATUS; stdcall;
  5888.   {$EXTERNALSYM GdipMeasureString}
  5889.  
  5890.   function GdipMeasureCharacterRanges(graphics: GPGRAPHICS; string_: PWCHAR;
  5891.     length: Integer; font: GPFONT; layoutRect: PGPRectF;
  5892.     stringFormat: GPSTRINGFORMAT; regionCount: Integer;
  5893.     const regions: GPREGION): GPSTATUS; stdcall;
  5894.   {$EXTERNALSYM GdipMeasureCharacterRanges}
  5895.  
  5896.   function GdipDrawDriverString(graphics: GPGRAPHICS; const text: PUINT16;
  5897.     length: Integer; const font: GPFONT; const brush: GPBRUSH;
  5898.     const positions: PGPPointF; flags: Integer;
  5899.     const matrix: GPMATRIX): GPSTATUS; stdcall;
  5900.   {$EXTERNALSYM GdipDrawDriverString}
  5901.  
  5902.   function GdipMeasureDriverString(graphics: GPGRAPHICS; text: PUINT16;
  5903.     length: Integer; font: GPFONT; positions: PGPPointF; flags: Integer;
  5904.     matrix: GPMATRIX; boundingBox: PGPRectF): GPSTATUS; stdcall;
  5905.   {$EXTERNALSYM GdipMeasureDriverString}
  5906.  
  5907. //----------------------------------------------------------------------------
  5908. // String format APIs
  5909. //----------------------------------------------------------------------------
  5910.  
  5911.   function GdipCreateStringFormat(formatAttributes: Integer; language: LANGID;
  5912.     out format: GPSTRINGFORMAT): GPSTATUS; stdcall;
  5913.   {$EXTERNALSYM GdipCreateStringFormat}
  5914.  
  5915.   function GdipStringFormatGetGenericDefault(
  5916.     out format: GPSTRINGFORMAT): GPSTATUS; stdcall;
  5917.   {$EXTERNALSYM GdipStringFormatGetGenericDefault}
  5918.  
  5919.   function GdipStringFormatGetGenericTypographic(
  5920.     out format: GPSTRINGFORMAT): GPSTATUS; stdcall;
  5921.   {$EXTERNALSYM GdipStringFormatGetGenericTypographic}
  5922.  
  5923.   function GdipDeleteStringFormat(format: GPSTRINGFORMAT): GPSTATUS; stdcall;
  5924.   {$EXTERNALSYM GdipDeleteStringFormat}
  5925.  
  5926.   function GdipCloneStringFormat(format: GPSTRINGFORMAT;
  5927.     out newFormat: GPSTRINGFORMAT): GPSTATUS; stdcall;
  5928.   {$EXTERNALSYM GdipCloneStringFormat}
  5929.  
  5930.   function GdipSetStringFormatFlags(format: GPSTRINGFORMAT;
  5931.     flags: Integer): GPSTATUS; stdcall;
  5932.   {$EXTERNALSYM GdipSetStringFormatFlags}
  5933.  
  5934.   function GdipGetStringFormatFlags(format: GPSTRINGFORMAT;
  5935.     out flags: Integer): GPSTATUS; stdcall;
  5936.   {$EXTERNALSYM GdipGetStringFormatFlags}
  5937.  
  5938.   function GdipSetStringFormatAlign(format: GPSTRINGFORMAT;
  5939.     align: STRINGALIGNMENT): GPSTATUS; stdcall;
  5940.   {$EXTERNALSYM GdipSetStringFormatAlign}
  5941.  
  5942.   function GdipGetStringFormatAlign(format: GPSTRINGFORMAT;
  5943.     out align: STRINGALIGNMENT): GPSTATUS; stdcall;
  5944.   {$EXTERNALSYM GdipGetStringFormatAlign}
  5945.  
  5946.   function GdipSetStringFormatLineAlign(format: GPSTRINGFORMAT;
  5947.     align: STRINGALIGNMENT): GPSTATUS; stdcall;
  5948.   {$EXTERNALSYM GdipSetStringFormatLineAlign}
  5949.  
  5950.   function GdipGetStringFormatLineAlign(format: GPSTRINGFORMAT;
  5951.     out align: STRINGALIGNMENT): GPSTATUS; stdcall;
  5952.   {$EXTERNALSYM GdipGetStringFormatLineAlign}
  5953.  
  5954.   function GdipSetStringFormatTrimming(format: GPSTRINGFORMAT;
  5955.     trimming: STRINGTRIMMING): GPSTATUS; stdcall;
  5956.   {$EXTERNALSYM GdipSetStringFormatTrimming}
  5957.  
  5958.   function GdipGetStringFormatTrimming(format: GPSTRINGFORMAT;
  5959.     out trimming: STRINGTRIMMING): GPSTATUS; stdcall;
  5960.   {$EXTERNALSYM GdipGetStringFormatTrimming}
  5961.  
  5962.   function GdipSetStringFormatHotkeyPrefix(format: GPSTRINGFORMAT;
  5963.     hotkeyPrefix: Integer): GPSTATUS; stdcall;
  5964.   {$EXTERNALSYM GdipSetStringFormatHotkeyPrefix}
  5965.  
  5966.   function GdipGetStringFormatHotkeyPrefix(format: GPSTRINGFORMAT;
  5967.     out hotkeyPrefix: Integer): GPSTATUS; stdcall;
  5968.   {$EXTERNALSYM GdipGetStringFormatHotkeyPrefix}
  5969.  
  5970.   function GdipSetStringFormatTabStops(format: GPSTRINGFORMAT;
  5971.     firstTabOffset: Single; count: Integer;
  5972.     tabStops: PSingle): GPSTATUS; stdcall;
  5973.   {$EXTERNALSYM GdipSetStringFormatTabStops}
  5974.  
  5975.   function GdipGetStringFormatTabStops(format: GPSTRINGFORMAT;
  5976.     count: Integer; firstTabOffset: PSingle;
  5977.     tabStops: PSingle): GPSTATUS; stdcall;
  5978.   {$EXTERNALSYM GdipGetStringFormatTabStops}
  5979.  
  5980.   function GdipGetStringFormatTabStopCount(format: GPSTRINGFORMAT;
  5981.     out count: Integer): GPSTATUS; stdcall;
  5982.   {$EXTERNALSYM GdipGetStringFormatTabStopCount}
  5983.  
  5984.   function GdipSetStringFormatDigitSubstitution(format: GPSTRINGFORMAT;
  5985.     language: LANGID;
  5986.     substitute: STRINGDIGITSUBSTITUTE): GPSTATUS; stdcall;
  5987.   {$EXTERNALSYM GdipSetStringFormatDigitSubstitution}
  5988.  
  5989.   function GdipGetStringFormatDigitSubstitution(format: GPSTRINGFORMAT;
  5990.     language: PUINT; substitute: PSTRINGDIGITSUBSTITUTE): GPSTATUS; stdcall;
  5991.   {$EXTERNALSYM GdipGetStringFormatDigitSubstitution}
  5992.  
  5993.   function GdipGetStringFormatMeasurableCharacterRangeCount(format: GPSTRINGFORMAT;
  5994.     out count: Integer): GPSTATUS; stdcall;
  5995.   {$EXTERNALSYM GdipGetStringFormatMeasurableCharacterRangeCount}
  5996.  
  5997.   function GdipSetStringFormatMeasurableCharacterRanges(format: GPSTRINGFORMAT;
  5998.     rangeCount: Integer; ranges: PCHARACTERRANGE): GPSTATUS; stdcall;
  5999.   {$EXTERNALSYM GdipSetStringFormatMeasurableCharacterRanges}
  6000.  
  6001. //----------------------------------------------------------------------------
  6002. // Cached Bitmap APIs
  6003. //----------------------------------------------------------------------------
  6004.  
  6005.   function GdipCreateCachedBitmap(bitmap: GPBITMAP; graphics: GPGRAPHICS;
  6006.     out cachedBitmap: GPCACHEDBITMAP): GPSTATUS; stdcall;
  6007.   {$EXTERNALSYM GdipCreateCachedBitmap}
  6008.  
  6009.   function GdipDeleteCachedBitmap(
  6010.     cachedBitmap: GPCACHEDBITMAP): GPSTATUS; stdcall;
  6011.   {$EXTERNALSYM GdipDeleteCachedBitmap}
  6012.  
  6013.   function GdipDrawCachedBitmap(graphics: GPGRAPHICS;
  6014.     cachedBitmap: GPCACHEDBITMAP; x: Integer;
  6015.     y: Integer): GPSTATUS; stdcall;
  6016.   {$EXTERNALSYM GdipDrawCachedBitmap}
  6017.  
  6018.   function GdipEmfToWmfBits(hemf: HENHMETAFILE; cbData16: UINT; pData16: PBYTE;
  6019.     iMapMode: Integer; eFlags: Integer): UINT; stdcall;
  6020.   {$EXTERNALSYM GdipEmfToWmfBits}
  6021.  
  6022. implementation
  6023.  
  6024.   function GdipAlloc; external WINGDIPDLL name 'GdipAlloc';
  6025.   procedure GdipFree; external WINGDIPDLL name 'GdipFree';
  6026.   function GdiplusStartup; external WINGDIPDLL name 'GdiplusStartup';
  6027.   procedure GdiplusShutdown; external WINGDIPDLL name 'GdiplusShutdown';
  6028.  
  6029.   function GdipCreatePath; external WINGDIPDLL name 'GdipCreatePath';
  6030.   function GdipCreatePath2; external WINGDIPDLL name 'GdipCreatePath2';
  6031.   function GdipCreatePath2I; external WINGDIPDLL name 'GdipCreatePath2I';
  6032.   function GdipClonePath; external WINGDIPDLL name 'GdipClonePath';
  6033.   function GdipDeletePath; external WINGDIPDLL name 'GdipDeletePath';
  6034.   function GdipResetPath; external WINGDIPDLL name 'GdipResetPath';
  6035.   function GdipGetPointCount; external WINGDIPDLL name 'GdipGetPointCount';
  6036.   function GdipGetPathTypes; external WINGDIPDLL name 'GdipGetPathTypes';
  6037.   function GdipGetPathPoints; external WINGDIPDLL name 'GdipGetPathPoints';
  6038.   function GdipGetPathPointsI; external WINGDIPDLL name 'GdipGetPathPointsI';
  6039.   function GdipGetPathFillMode; external WINGDIPDLL name 'GdipGetPathFillMode';
  6040.   function GdipSetPathFillMode; external WINGDIPDLL name 'GdipSetPathFillMode';
  6041.   function GdipGetPathData; external WINGDIPDLL name 'GdipGetPathData';
  6042.   function GdipStartPathFigure; external WINGDIPDLL name 'GdipStartPathFigure';
  6043.   function GdipClosePathFigure; external WINGDIPDLL name 'GdipClosePathFigure';
  6044.   function GdipClosePathFigures; external WINGDIPDLL name 'GdipClosePathFigures';
  6045.   function GdipSetPathMarker; external WINGDIPDLL name 'GdipSetPathMarker';
  6046.   function GdipClearPathMarkers; external WINGDIPDLL name 'GdipClearPathMarkers';
  6047.   function GdipReversePath; external WINGDIPDLL name 'GdipReversePath';
  6048.   function GdipGetPathLastPoint; external WINGDIPDLL name 'GdipGetPathLastPoint';
  6049.   function GdipAddPathLine; external WINGDIPDLL name 'GdipAddPathLine';
  6050.   function GdipAddPathLine2; external WINGDIPDLL name 'GdipAddPathLine2';
  6051.   function GdipAddPathArc; external WINGDIPDLL name 'GdipAddPathArc';
  6052.   function GdipAddPathBezier; external WINGDIPDLL name 'GdipAddPathBezier';
  6053.   function GdipAddPathBeziers; external WINGDIPDLL name 'GdipAddPathBeziers';
  6054.   function GdipAddPathCurve; external WINGDIPDLL name 'GdipAddPathCurve';
  6055.   function GdipAddPathCurve2; external WINGDIPDLL name 'GdipAddPathCurve2';
  6056.   function GdipAddPathCurve3; external WINGDIPDLL name 'GdipAddPathCurve3';
  6057.   function GdipAddPathClosedCurve; external WINGDIPDLL name 'GdipAddPathClosedCurve';
  6058.   function GdipAddPathClosedCurve2; external WINGDIPDLL name 'GdipAddPathClosedCurve2';
  6059.   function GdipAddPathRectangle; external WINGDIPDLL name 'GdipAddPathRectangle';
  6060.   function GdipAddPathRectangles; external WINGDIPDLL name 'GdipAddPathRectangles';
  6061.   function GdipAddPathEllipse; external WINGDIPDLL name 'GdipAddPathEllipse';
  6062.   function GdipAddPathPie; external WINGDIPDLL name 'GdipAddPathPie';
  6063.   function GdipAddPathPolygon; external WINGDIPDLL name 'GdipAddPathPolygon';
  6064.   function GdipAddPathPath; external WINGDIPDLL name 'GdipAddPathPath';
  6065.   function GdipAddPathString; external WINGDIPDLL name 'GdipAddPathString';
  6066.   function GdipAddPathStringI; external WINGDIPDLL name 'GdipAddPathStringI';
  6067.   function GdipAddPathLineI; external WINGDIPDLL name 'GdipAddPathLineI';
  6068.   function GdipAddPathLine2I; external WINGDIPDLL name 'GdipAddPathLine2I';
  6069.   function GdipAddPathArcI; external WINGDIPDLL name 'GdipAddPathArcI';
  6070.   function GdipAddPathBezierI; external WINGDIPDLL name 'GdipAddPathBezierI';
  6071.   function GdipAddPathBeziersI; external WINGDIPDLL name 'GdipAddPathBeziersI';
  6072.   function GdipAddPathCurveI; external WINGDIPDLL name 'GdipAddPathCurveI';
  6073.   function GdipAddPathCurve2I; external WINGDIPDLL name 'GdipAddPathCurve2I';
  6074.   function GdipAddPathCurve3I; external WINGDIPDLL name 'GdipAddPathCurve3I';
  6075.   function GdipAddPathClosedCurveI; external WINGDIPDLL name 'GdipAddPathClosedCurveI';
  6076.   function GdipAddPathClosedCurve2I; external WINGDIPDLL name 'GdipAddPathClosedCurve2I';
  6077.   function GdipAddPathRectangleI; external WINGDIPDLL name 'GdipAddPathRectangleI';
  6078.   function GdipAddPathRectanglesI; external WINGDIPDLL name 'GdipAddPathRectanglesI';
  6079.   function GdipAddPathEllipseI; external WINGDIPDLL name 'GdipAddPathEllipseI';
  6080.   function GdipAddPathPieI; external WINGDIPDLL name 'GdipAddPathPieI';
  6081.   function GdipAddPathPolygonI; external WINGDIPDLL name 'GdipAddPathPolygonI';
  6082.   function GdipFlattenPath; external WINGDIPDLL name 'GdipFlattenPath';
  6083.   function GdipWindingModeOutline; external WINGDIPDLL name 'GdipWindingModeOutline';
  6084.   function GdipWidenPath; external WINGDIPDLL name 'GdipWidenPath';
  6085.   function GdipWarpPath; external WINGDIPDLL name 'GdipWarpPath';
  6086.   function GdipTransformPath; external WINGDIPDLL name 'GdipTransformPath';
  6087.   function GdipGetPathWorldBounds; external WINGDIPDLL name 'GdipGetPathWorldBounds';
  6088.   function GdipGetPathWorldBoundsI; external WINGDIPDLL name 'GdipGetPathWorldBoundsI';
  6089.   function GdipIsVisiblePathPoint; external WINGDIPDLL name 'GdipIsVisiblePathPoint';
  6090.   function GdipIsVisiblePathPointI; external WINGDIPDLL name 'GdipIsVisiblePathPointI';
  6091.   function GdipIsOutlineVisiblePathPoint; external WINGDIPDLL name 'GdipIsOutlineVisiblePathPoint';
  6092.   function GdipIsOutlineVisiblePathPointI; external WINGDIPDLL name 'GdipIsOutlineVisiblePathPointI';
  6093.   function GdipCreatePathIter; external WINGDIPDLL name 'GdipCreatePathIter';
  6094.   function GdipDeletePathIter; external WINGDIPDLL name 'GdipDeletePathIter';
  6095.   function GdipPathIterNextSubpath; external WINGDIPDLL name 'GdipPathIterNextSubpath';
  6096.   function GdipPathIterNextSubpathPath; external WINGDIPDLL name 'GdipPathIterNextSubpathPath';
  6097.   function GdipPathIterNextPathType; external WINGDIPDLL name 'GdipPathIterNextPathType';
  6098.   function GdipPathIterNextMarker; external WINGDIPDLL name 'GdipPathIterNextMarker';
  6099.   function GdipPathIterNextMarkerPath; external WINGDIPDLL name 'GdipPathIterNextMarkerPath';
  6100.   function GdipPathIterGetCount; external WINGDIPDLL name 'GdipPathIterGetCount';
  6101.   function GdipPathIterGetSubpathCount; external WINGDIPDLL name 'GdipPathIterGetSubpathCount';
  6102.   function GdipPathIterIsValid; external WINGDIPDLL name 'GdipPathIterIsValid';
  6103.   function GdipPathIterHasCurve; external WINGDIPDLL name 'GdipPathIterHasCurve';
  6104.   function GdipPathIterRewind; external WINGDIPDLL name 'GdipPathIterRewind';
  6105.   function GdipPathIterEnumerate; external WINGDIPDLL name 'GdipPathIterEnumerate';
  6106.   function GdipPathIterCopyData; external WINGDIPDLL name 'GdipPathIterCopyData';
  6107.   function GdipCreateMatrix; external WINGDIPDLL name 'GdipCreateMatrix';
  6108.   function GdipCreateMatrix2; external WINGDIPDLL name 'GdipCreateMatrix2';
  6109.   function GdipCreateMatrix3; external WINGDIPDLL name 'GdipCreateMatrix3';
  6110.   function GdipCreateMatrix3I; external WINGDIPDLL name 'GdipCreateMatrix3I';
  6111.   function GdipCloneMatrix; external WINGDIPDLL name 'GdipCloneMatrix';
  6112.   function GdipDeleteMatrix; external WINGDIPDLL name 'GdipDeleteMatrix';
  6113.   function GdipSetMatrixElements; external WINGDIPDLL name 'GdipSetMatrixElements';
  6114.   function GdipMultiplyMatrix; external WINGDIPDLL name 'GdipMultiplyMatrix';
  6115.   function GdipTranslateMatrix; external WINGDIPDLL name 'GdipTranslateMatrix';
  6116.   function GdipScaleMatrix; external WINGDIPDLL name 'GdipScaleMatrix';
  6117.   function GdipRotateMatrix; external WINGDIPDLL name 'GdipRotateMatrix';
  6118.   function GdipShearMatrix; external WINGDIPDLL name 'GdipShearMatrix';
  6119.   function GdipInvertMatrix; external WINGDIPDLL name 'GdipInvertMatrix';
  6120.   function GdipTransformMatrixPoints; external WINGDIPDLL name 'GdipTransformMatrixPoints';
  6121.   function GdipTransformMatrixPointsI; external WINGDIPDLL name 'GdipTransformMatrixPointsI';
  6122.   function GdipVectorTransformMatrixPoints; external WINGDIPDLL name 'GdipVectorTransformMatrixPoints';
  6123.   function GdipVectorTransformMatrixPointsI; external WINGDIPDLL name 'GdipVectorTransformMatrixPointsI';
  6124.   function GdipGetMatrixElements; external WINGDIPDLL name 'GdipGetMatrixElements';
  6125.   function GdipIsMatrixInvertible; external WINGDIPDLL name 'GdipIsMatrixInvertible';
  6126.   function GdipIsMatrixIdentity; external WINGDIPDLL name 'GdipIsMatrixIdentity';
  6127.   function GdipIsMatrixEqual; external WINGDIPDLL name 'GdipIsMatrixEqual';
  6128.   function GdipCreateRegion; external WINGDIPDLL name 'GdipCreateRegion';
  6129.   function GdipCreateRegionRect; external WINGDIPDLL name 'GdipCreateRegionRect';
  6130.   function GdipCreateRegionRectI; external WINGDIPDLL name 'GdipCreateRegionRectI';
  6131.   function GdipCreateRegionPath; external WINGDIPDLL name 'GdipCreateRegionPath';
  6132.   function GdipCreateRegionRgnData; external WINGDIPDLL name 'GdipCreateRegionRgnData';
  6133.   function GdipCreateRegionHrgn; external WINGDIPDLL name 'GdipCreateRegionHrgn';
  6134.   function GdipCloneRegion; external WINGDIPDLL name 'GdipCloneRegion';
  6135.   function GdipDeleteRegion; external WINGDIPDLL name 'GdipDeleteRegion';
  6136.   function GdipSetInfinite; external WINGDIPDLL name 'GdipSetInfinite';
  6137.   function GdipSetEmpty; external WINGDIPDLL name 'GdipSetEmpty';
  6138.   function GdipCombineRegionRect; external WINGDIPDLL name 'GdipCombineRegionRect';
  6139.   function GdipCombineRegionRectI; external WINGDIPDLL name 'GdipCombineRegionRectI';
  6140.   function GdipCombineRegionPath; external WINGDIPDLL name 'GdipCombineRegionPath';
  6141.   function GdipCombineRegionRegion; external WINGDIPDLL name 'GdipCombineRegionRegion';
  6142.   function GdipTranslateRegion; external WINGDIPDLL name 'GdipTranslateRegion';
  6143.   function GdipTranslateRegionI; external WINGDIPDLL name 'GdipTranslateRegionI';
  6144.   function GdipTransformRegion; external WINGDIPDLL name 'GdipTransformRegion';
  6145.   function GdipGetRegionBounds; external WINGDIPDLL name 'GdipGetRegionBounds';
  6146.   function GdipGetRegionBoundsI; external WINGDIPDLL name 'GdipGetRegionBoundsI';
  6147.   function GdipGetRegionHRgn; external WINGDIPDLL name 'GdipGetRegionHRgn';
  6148.   function GdipIsEmptyRegion; external WINGDIPDLL name 'GdipIsEmptyRegion';
  6149.   function GdipIsInfiniteRegion; external WINGDIPDLL name 'GdipIsInfiniteRegion';
  6150.   function GdipIsEqualRegion; external WINGDIPDLL name 'GdipIsEqualRegion';
  6151.   function GdipGetRegionDataSize; external WINGDIPDLL name 'GdipGetRegionDataSize';
  6152.   function GdipGetRegionData; external WINGDIPDLL name 'GdipGetRegionData';
  6153.   function GdipIsVisibleRegionPoint; external WINGDIPDLL name 'GdipIsVisibleRegionPoint';
  6154.   function GdipIsVisibleRegionPointI; external WINGDIPDLL name 'GdipIsVisibleRegionPointI';
  6155.   function GdipIsVisibleRegionRect; external WINGDIPDLL name 'GdipIsVisibleRegionRect';
  6156.   function GdipIsVisibleRegionRectI; external WINGDIPDLL name 'GdipIsVisibleRegionRectI';
  6157.   function GdipGetRegionScansCount; external WINGDIPDLL name 'GdipGetRegionScansCount';
  6158.   function GdipGetRegionScans; external WINGDIPDLL name 'GdipGetRegionScans';
  6159.   function GdipGetRegionScansI; external WINGDIPDLL name 'GdipGetRegionScansI';
  6160.   function GdipCloneBrush; external WINGDIPDLL name 'GdipCloneBrush';
  6161.   function GdipDeleteBrush; external WINGDIPDLL name 'GdipDeleteBrush';
  6162.   function GdipGetBrushType; external WINGDIPDLL name 'GdipGetBrushType';
  6163.   function GdipCreateHatchBrush; external WINGDIPDLL name 'GdipCreateHatchBrush';
  6164.   function GdipGetHatchStyle; external WINGDIPDLL name 'GdipGetHatchStyle';
  6165.   function GdipGetHatchForegroundColor; external WINGDIPDLL name 'GdipGetHatchForegroundColor';
  6166.   function GdipGetHatchBackgroundColor; external WINGDIPDLL name 'GdipGetHatchBackgroundColor';
  6167.   function GdipCreateTexture; external WINGDIPDLL name 'GdipCreateTexture';
  6168.   function GdipCreateTexture2; external WINGDIPDLL name 'GdipCreateTexture2';
  6169.   function GdipCreateTextureIA; external WINGDIPDLL name 'GdipCreateTextureIA';
  6170.   function GdipCreateTexture2I; external WINGDIPDLL name 'GdipCreateTexture2I';
  6171.   function GdipCreateTextureIAI; external WINGDIPDLL name 'GdipCreateTextureIAI';
  6172.   function GdipGetTextureTransform; external WINGDIPDLL name 'GdipGetTextureTransform';
  6173.   function GdipSetTextureTransform; external WINGDIPDLL name 'GdipSetTextureTransform';
  6174.   function GdipResetTextureTransform; external WINGDIPDLL name 'GdipResetTextureTransform';
  6175.   function GdipMultiplyTextureTransform; external WINGDIPDLL name 'GdipMultiplyTextureTransform';
  6176.   function GdipTranslateTextureTransform; external WINGDIPDLL name 'GdipTranslateTextureTransform';
  6177.   function GdipScaleTextureTransform; external WINGDIPDLL name 'GdipScaleTextureTransform';
  6178.   function GdipRotateTextureTransform; external WINGDIPDLL name 'GdipRotateTextureTransform';
  6179.   function GdipSetTextureWrapMode; external WINGDIPDLL name 'GdipSetTextureWrapMode';
  6180.   function GdipGetTextureWrapMode; external WINGDIPDLL name 'GdipGetTextureWrapMode';
  6181.   function GdipGetTextureImage; external WINGDIPDLL name 'GdipGetTextureImage';
  6182.   function GdipCreateSolidFill; external WINGDIPDLL name 'GdipCreateSolidFill';
  6183.   function GdipSetSolidFillColor; external WINGDIPDLL name 'GdipSetSolidFillColor';
  6184.   function GdipGetSolidFillColor; external WINGDIPDLL name 'GdipGetSolidFillColor';
  6185.   function GdipCreateLineBrush; external WINGDIPDLL name 'GdipCreateLineBrush';
  6186.   function GdipCreateLineBrushI; external WINGDIPDLL name 'GdipCreateLineBrushI';
  6187.   function GdipCreateLineBrushFromRect; external WINGDIPDLL name 'GdipCreateLineBrushFromRect';
  6188.   function GdipCreateLineBrushFromRectI; external WINGDIPDLL name 'GdipCreateLineBrushFromRectI';
  6189.   function GdipCreateLineBrushFromRectWithAngle; external WINGDIPDLL name 'GdipCreateLineBrushFromRectWithAngle';
  6190.   function GdipCreateLineBrushFromRectWithAngleI; external WINGDIPDLL name 'GdipCreateLineBrushFromRectWithAngleI';
  6191.   function GdipSetLineColors; external WINGDIPDLL name 'GdipSetLineColors';
  6192.   function GdipGetLineColors; external WINGDIPDLL name 'GdipGetLineColors';
  6193.   function GdipGetLineRect; external WINGDIPDLL name 'GdipGetLineRect';
  6194.   function GdipGetLineRectI; external WINGDIPDLL name 'GdipGetLineRectI';
  6195.   function GdipSetLineGammaCorrection; external WINGDIPDLL name 'GdipSetLineGammaCorrection';
  6196.   function GdipGetLineGammaCorrection; external WINGDIPDLL name 'GdipGetLineGammaCorrection';
  6197.   function GdipGetLineBlendCount; external WINGDIPDLL name 'GdipGetLineBlendCount';
  6198.   function GdipGetLineBlend; external WINGDIPDLL name 'GdipGetLineBlend';
  6199.   function GdipSetLineBlend; external WINGDIPDLL name 'GdipSetLineBlend';
  6200.   function GdipGetLinePresetBlendCount; external WINGDIPDLL name 'GdipGetLinePresetBlendCount';
  6201.   function GdipGetLinePresetBlend; external WINGDIPDLL name 'GdipGetLinePresetBlend';
  6202.   function GdipSetLinePresetBlend; external WINGDIPDLL name 'GdipSetLinePresetBlend';
  6203.   function GdipSetLineSigmaBlend; external WINGDIPDLL name 'GdipSetLineSigmaBlend';
  6204.   function GdipSetLineLinearBlend; external WINGDIPDLL name 'GdipSetLineLinearBlend';
  6205.   function GdipSetLineWrapMode; external WINGDIPDLL name 'GdipSetLineWrapMode';
  6206.   function GdipGetLineWrapMode; external WINGDIPDLL name 'GdipGetLineWrapMode';
  6207.   function GdipGetLineTransform; external WINGDIPDLL name 'GdipGetLineTransform';
  6208.   function GdipSetLineTransform; external WINGDIPDLL name 'GdipSetLineTransform';
  6209.   function GdipResetLineTransform; external WINGDIPDLL name 'GdipResetLineTransform';
  6210.   function GdipMultiplyLineTransform; external WINGDIPDLL name 'GdipMultiplyLineTransform';
  6211.   function GdipTranslateLineTransform; external WINGDIPDLL name 'GdipTranslateLineTransform';
  6212.   function GdipScaleLineTransform; external WINGDIPDLL name 'GdipScaleLineTransform';
  6213.   function GdipRotateLineTransform; external WINGDIPDLL name 'GdipRotateLineTransform';
  6214.   function GdipCreatePathGradient; external WINGDIPDLL name 'GdipCreatePathGradient';
  6215.   function GdipCreatePathGradientI; external WINGDIPDLL name 'GdipCreatePathGradientI';
  6216.   function GdipCreatePathGradientFromPath; external WINGDIPDLL name 'GdipCreatePathGradientFromPath';
  6217.   function GdipGetPathGradientCenterColor; external WINGDIPDLL name 'GdipGetPathGradientCenterColor';
  6218.   function GdipSetPathGradientCenterColor; external WINGDIPDLL name 'GdipSetPathGradientCenterColor';
  6219.   function GdipGetPathGradientSurroundColorsWithCount; external WINGDIPDLL name 'GdipGetPathGradientSurroundColorsWithCount';
  6220.   function GdipSetPathGradientSurroundColorsWithCount; external WINGDIPDLL name 'GdipSetPathGradientSurroundColorsWithCount';
  6221.   function GdipGetPathGradientPath; external WINGDIPDLL name 'GdipGetPathGradientPath';
  6222.   function GdipSetPathGradientPath; external WINGDIPDLL name 'GdipSetPathGradientPath';
  6223.   function GdipGetPathGradientCenterPoint; external WINGDIPDLL name 'GdipGetPathGradientCenterPoint';
  6224.   function GdipGetPathGradientCenterPointI; external WINGDIPDLL name 'GdipGetPathGradientCenterPointI';
  6225.   function GdipSetPathGradientCenterPoint; external WINGDIPDLL name 'GdipSetPathGradientCenterPoint';
  6226.   function GdipSetPathGradientCenterPointI; external WINGDIPDLL name 'GdipSetPathGradientCenterPointI';
  6227.   function GdipGetPathGradientRect; external WINGDIPDLL name 'GdipGetPathGradientRect';
  6228.   function GdipGetPathGradientRectI; external WINGDIPDLL name 'GdipGetPathGradientRectI';
  6229.   function GdipGetPathGradientPointCount; external WINGDIPDLL name 'GdipGetPathGradientPointCount';
  6230.   function GdipGetPathGradientSurroundColorCount; external WINGDIPDLL name 'GdipGetPathGradientSurroundColorCount';
  6231.   function GdipSetPathGradientGammaCorrection; external WINGDIPDLL name 'GdipSetPathGradientGammaCorrection';
  6232.   function GdipGetPathGradientGammaCorrection; external WINGDIPDLL name 'GdipGetPathGradientGammaCorrection';
  6233.   function GdipGetPathGradientBlendCount; external WINGDIPDLL name 'GdipGetPathGradientBlendCount';
  6234.   function GdipGetPathGradientBlend; external WINGDIPDLL name 'GdipGetPathGradientBlend';
  6235.   function GdipSetPathGradientBlend; external WINGDIPDLL name 'GdipSetPathGradientBlend';
  6236.   function GdipGetPathGradientPresetBlendCount; external WINGDIPDLL name 'GdipGetPathGradientPresetBlendCount';
  6237.   function GdipGetPathGradientPresetBlend; external WINGDIPDLL name 'GdipGetPathGradientPresetBlend';
  6238.   function GdipSetPathGradientPresetBlend; external WINGDIPDLL name 'GdipSetPathGradientPresetBlend';
  6239.   function GdipSetPathGradientSigmaBlend; external WINGDIPDLL name 'GdipSetPathGradientSigmaBlend';
  6240.   function GdipSetPathGradientLinearBlend; external WINGDIPDLL name 'GdipSetPathGradientLinearBlend';
  6241.   function GdipGetPathGradientWrapMode; external WINGDIPDLL name 'GdipGetPathGradientWrapMode';
  6242.   function GdipSetPathGradientWrapMode; external WINGDIPDLL name 'GdipSetPathGradientWrapMode';
  6243.   function GdipGetPathGradientTransform; external WINGDIPDLL name 'GdipGetPathGradientTransform';
  6244.   function GdipSetPathGradientTransform; external WINGDIPDLL name 'GdipSetPathGradientTransform';
  6245.   function GdipResetPathGradientTransform; external WINGDIPDLL name 'GdipResetPathGradientTransform';
  6246.   function GdipMultiplyPathGradientTransform; external WINGDIPDLL name 'GdipMultiplyPathGradientTransform';
  6247.   function GdipTranslatePathGradientTransform; external WINGDIPDLL name 'GdipTranslatePathGradientTransform';
  6248.   function GdipScalePathGradientTransform; external WINGDIPDLL name 'GdipScalePathGradientTransform';
  6249.   function GdipRotatePathGradientTransform; external WINGDIPDLL name 'GdipRotatePathGradientTransform';
  6250.   function GdipGetPathGradientFocusScales; external WINGDIPDLL name 'GdipGetPathGradientFocusScales';
  6251.   function GdipSetPathGradientFocusScales; external WINGDIPDLL name 'GdipSetPathGradientFocusScales';
  6252.   function GdipCreatePen1; external WINGDIPDLL name 'GdipCreatePen1';
  6253.   function GdipCreatePen2; external WINGDIPDLL name 'GdipCreatePen2';
  6254.   function GdipClonePen; external WINGDIPDLL name 'GdipClonePen';
  6255.   function GdipDeletePen; external WINGDIPDLL name 'GdipDeletePen';
  6256.   function GdipSetPenWidth; external WINGDIPDLL name 'GdipSetPenWidth';
  6257.   function GdipGetPenWidth; external WINGDIPDLL name 'GdipGetPenWidth';
  6258.   function GdipSetPenUnit; external WINGDIPDLL name 'GdipSetPenUnit';
  6259.   function GdipGetPenUnit; external WINGDIPDLL name 'GdipGetPenUnit';
  6260.   function GdipSetPenLineCap197819; external WINGDIPDLL name 'GdipSetPenLineCap197819';
  6261.   function GdipSetPenStartCap; external WINGDIPDLL name 'GdipSetPenStartCap';
  6262.   function GdipSetPenEndCap; external WINGDIPDLL name 'GdipSetPenEndCap';
  6263.   function GdipSetPenDashCap197819; external WINGDIPDLL name 'GdipSetPenDashCap197819';
  6264.   function GdipGetPenStartCap; external WINGDIPDLL name 'GdipGetPenStartCap';
  6265.   function GdipGetPenEndCap; external WINGDIPDLL name 'GdipGetPenEndCap';
  6266.   function GdipGetPenDashCap197819; external WINGDIPDLL name 'GdipGetPenDashCap197819';
  6267.   function GdipSetPenLineJoin; external WINGDIPDLL name 'GdipSetPenLineJoin';
  6268.   function GdipGetPenLineJoin; external WINGDIPDLL name 'GdipGetPenLineJoin';
  6269.   function GdipSetPenCustomStartCap; external WINGDIPDLL name 'GdipSetPenCustomStartCap';
  6270.   function GdipGetPenCustomStartCap; external WINGDIPDLL name 'GdipGetPenCustomStartCap';
  6271.   function GdipSetPenCustomEndCap; external WINGDIPDLL name 'GdipSetPenCustomEndCap';
  6272.   function GdipGetPenCustomEndCap; external WINGDIPDLL name 'GdipGetPenCustomEndCap';
  6273.   function GdipSetPenMiterLimit; external WINGDIPDLL name 'GdipSetPenMiterLimit';
  6274.   function GdipGetPenMiterLimit; external WINGDIPDLL name 'GdipGetPenMiterLimit';
  6275.   function GdipSetPenMode; external WINGDIPDLL name 'GdipSetPenMode';
  6276.   function GdipGetPenMode; external WINGDIPDLL name 'GdipGetPenMode';
  6277.   function GdipSetPenTransform; external WINGDIPDLL name 'GdipSetPenTransform';
  6278.   function GdipGetPenTransform; external WINGDIPDLL name 'GdipGetPenTransform';
  6279.   function GdipResetPenTransform; external WINGDIPDLL name 'GdipResetPenTransform';
  6280.   function GdipMultiplyPenTransform; external WINGDIPDLL name 'GdipMultiplyPenTransform';
  6281.   function GdipTranslatePenTransform; external WINGDIPDLL name 'GdipTranslatePenTransform';
  6282.   function GdipScalePenTransform; external WINGDIPDLL name 'GdipScalePenTransform';
  6283.   function GdipRotatePenTransform; external WINGDIPDLL name 'GdipRotatePenTransform';
  6284.   function GdipSetPenColor; external WINGDIPDLL name 'GdipSetPenColor';
  6285.   function GdipGetPenColor; external WINGDIPDLL name 'GdipGetPenColor';
  6286.   function GdipSetPenBrushFill; external WINGDIPDLL name 'GdipSetPenBrushFill';
  6287.   function GdipGetPenBrushFill; external WINGDIPDLL name 'GdipGetPenBrushFill';
  6288.   function GdipGetPenFillType; external WINGDIPDLL name 'GdipGetPenFillType';
  6289.   function GdipGetPenDashStyle; external WINGDIPDLL name 'GdipGetPenDashStyle';
  6290.   function GdipSetPenDashStyle; external WINGDIPDLL name 'GdipSetPenDashStyle';
  6291.   function GdipGetPenDashOffset; external WINGDIPDLL name 'GdipGetPenDashOffset';
  6292.   function GdipSetPenDashOffset; external WINGDIPDLL name 'GdipSetPenDashOffset';
  6293.   function GdipGetPenDashCount; external WINGDIPDLL name 'GdipGetPenDashCount';
  6294.   function GdipSetPenDashArray; external WINGDIPDLL name 'GdipSetPenDashArray';
  6295.   function GdipGetPenDashArray; external WINGDIPDLL name 'GdipGetPenDashArray';
  6296.   function GdipGetPenCompoundCount; external WINGDIPDLL name 'GdipGetPenCompoundCount';
  6297.   function GdipSetPenCompoundArray; external WINGDIPDLL name 'GdipSetPenCompoundArray';
  6298.   function GdipGetPenCompoundArray; external WINGDIPDLL name 'GdipGetPenCompoundArray';
  6299.   function GdipCreateCustomLineCap; external WINGDIPDLL name 'GdipCreateCustomLineCap';
  6300.   function GdipDeleteCustomLineCap; external WINGDIPDLL name 'GdipDeleteCustomLineCap';
  6301.   function GdipCloneCustomLineCap; external WINGDIPDLL name 'GdipCloneCustomLineCap';
  6302.   function GdipGetCustomLineCapType; external WINGDIPDLL name 'GdipGetCustomLineCapType';
  6303.   function GdipSetCustomLineCapStrokeCaps; external WINGDIPDLL name 'GdipSetCustomLineCapStrokeCaps';
  6304.   function GdipGetCustomLineCapStrokeCaps; external WINGDIPDLL name 'GdipGetCustomLineCapStrokeCaps';
  6305.   function GdipSetCustomLineCapStrokeJoin; external WINGDIPDLL name 'GdipSetCustomLineCapStrokeJoin';
  6306.   function GdipGetCustomLineCapStrokeJoin; external WINGDIPDLL name 'GdipGetCustomLineCapStrokeJoin';
  6307.   function GdipSetCustomLineCapBaseCap; external WINGDIPDLL name 'GdipSetCustomLineCapBaseCap';
  6308.   function GdipGetCustomLineCapBaseCap; external WINGDIPDLL name 'GdipGetCustomLineCapBaseCap';
  6309.   function GdipSetCustomLineCapBaseInset; external WINGDIPDLL name 'GdipSetCustomLineCapBaseInset';
  6310.   function GdipGetCustomLineCapBaseInset; external WINGDIPDLL name 'GdipGetCustomLineCapBaseInset';
  6311.   function GdipSetCustomLineCapWidthScale; external WINGDIPDLL name 'GdipSetCustomLineCapWidthScale';
  6312.   function GdipGetCustomLineCapWidthScale; external WINGDIPDLL name 'GdipGetCustomLineCapWidthScale';
  6313.   function GdipCreateAdjustableArrowCap; external WINGDIPDLL name 'GdipCreateAdjustableArrowCap';
  6314.   function GdipSetAdjustableArrowCapHeight; external WINGDIPDLL name 'GdipSetAdjustableArrowCapHeight';
  6315.   function GdipGetAdjustableArrowCapHeight; external WINGDIPDLL name 'GdipGetAdjustableArrowCapHeight';
  6316.   function GdipSetAdjustableArrowCapWidth; external WINGDIPDLL name 'GdipSetAdjustableArrowCapWidth';
  6317.   function GdipGetAdjustableArrowCapWidth; external WINGDIPDLL name 'GdipGetAdjustableArrowCapWidth';
  6318.   function GdipSetAdjustableArrowCapMiddleInset; external WINGDIPDLL name 'GdipSetAdjustableArrowCapMiddleInset';
  6319.   function GdipGetAdjustableArrowCapMiddleInset; external WINGDIPDLL name 'GdipGetAdjustableArrowCapMiddleInset';
  6320.   function GdipSetAdjustableArrowCapFillState; external WINGDIPDLL name 'GdipSetAdjustableArrowCapFillState';
  6321.   function GdipGetAdjustableArrowCapFillState; external WINGDIPDLL name 'GdipGetAdjustableArrowCapFillState';
  6322.   function GdipLoadImageFromStream; external WINGDIPDLL name 'GdipLoadImageFromStream';
  6323.   function GdipLoadImageFromFile; external WINGDIPDLL name 'GdipLoadImageFromFile';
  6324.   function GdipLoadImageFromStreamICM; external WINGDIPDLL name 'GdipLoadImageFromStreamICM';
  6325.   function GdipLoadImageFromFileICM; external WINGDIPDLL name 'GdipLoadImageFromFileICM';
  6326.   function GdipCloneImage; external WINGDIPDLL name 'GdipCloneImage';
  6327.   function GdipDisposeImage; external WINGDIPDLL name 'GdipDisposeImage';
  6328.   function GdipSaveImageToFile; external WINGDIPDLL name 'GdipSaveImageToFile';
  6329.   function GdipSaveImageToStream; external WINGDIPDLL name 'GdipSaveImageToStream';
  6330.   function GdipSaveAdd; external WINGDIPDLL name 'GdipSaveAdd';
  6331.   function GdipSaveAddImage; external WINGDIPDLL name 'GdipSaveAddImage';
  6332.   function GdipGetImageGraphicsContext; external WINGDIPDLL name 'GdipGetImageGraphicsContext';
  6333.   function GdipGetImageBounds; external WINGDIPDLL name 'GdipGetImageBounds';
  6334.   function GdipGetImageDimension; external WINGDIPDLL name 'GdipGetImageDimension';
  6335.   function GdipGetImageType; external WINGDIPDLL name 'GdipGetImageType';
  6336.   function GdipGetImageWidth; external WINGDIPDLL name 'GdipGetImageWidth';
  6337.   function GdipGetImageHeight; external WINGDIPDLL name 'GdipGetImageHeight';
  6338.   function GdipGetImageHorizontalResolution; external WINGDIPDLL name 'GdipGetImageHorizontalResolution';
  6339.   function GdipGetImageVerticalResolution; external WINGDIPDLL name 'GdipGetImageVerticalResolution';
  6340.   function GdipGetImageFlags; external WINGDIPDLL name 'GdipGetImageFlags';
  6341.   function GdipGetImageRawFormat; external WINGDIPDLL name 'GdipGetImageRawFormat';
  6342.   function GdipGetImagePixelFormat; external WINGDIPDLL name 'GdipGetImagePixelFormat';
  6343.   function GdipGetImageThumbnail; external WINGDIPDLL name 'GdipGetImageThumbnail';
  6344.   function GdipGetEncoderParameterListSize; external WINGDIPDLL name 'GdipGetEncoderParameterListSize';
  6345.   function GdipGetEncoderParameterList; external WINGDIPDLL name 'GdipGetEncoderParameterList';
  6346.   function GdipImageGetFrameDimensionsCount; external WINGDIPDLL name 'GdipImageGetFrameDimensionsCount';
  6347.   function GdipImageGetFrameDimensionsList; external WINGDIPDLL name 'GdipImageGetFrameDimensionsList';
  6348.   function GdipImageGetFrameCount; external WINGDIPDLL name 'GdipImageGetFrameCount';
  6349.   function GdipImageSelectActiveFrame; external WINGDIPDLL name 'GdipImageSelectActiveFrame';
  6350.   function GdipImageRotateFlip; external WINGDIPDLL name 'GdipImageRotateFlip';
  6351.   function GdipGetImagePalette; external WINGDIPDLL name 'GdipGetImagePalette';
  6352.   function GdipSetImagePalette; external WINGDIPDLL name 'GdipSetImagePalette';
  6353.   function GdipGetImagePaletteSize; external WINGDIPDLL name 'GdipGetImagePaletteSize';
  6354.   function GdipGetPropertyCount; external WINGDIPDLL name 'GdipGetPropertyCount';
  6355.   function GdipGetPropertyIdList; external WINGDIPDLL name 'GdipGetPropertyIdList';
  6356.   function GdipGetPropertyItemSize; external WINGDIPDLL name 'GdipGetPropertyItemSize';
  6357.   function GdipGetPropertyItem; external WINGDIPDLL name 'GdipGetPropertyItem';
  6358.   function GdipGetPropertySize; external WINGDIPDLL name 'GdipGetPropertySize';
  6359.   function GdipGetAllPropertyItems; external WINGDIPDLL name 'GdipGetAllPropertyItems';
  6360.   function GdipRemovePropertyItem; external WINGDIPDLL name 'GdipRemovePropertyItem';
  6361.   function GdipSetPropertyItem; external WINGDIPDLL name 'GdipSetPropertyItem';
  6362.   function GdipImageForceValidation; external WINGDIPDLL name 'GdipImageForceValidation';
  6363.   function GdipCreateBitmapFromStream; external WINGDIPDLL name 'GdipCreateBitmapFromStream';
  6364.   function GdipCreateBitmapFromFile; external WINGDIPDLL name 'GdipCreateBitmapFromFile';
  6365.   function GdipCreateBitmapFromStreamICM; external WINGDIPDLL name 'GdipCreateBitmapFromStreamICM';
  6366.   function GdipCreateBitmapFromFileICM; external WINGDIPDLL name 'GdipCreateBitmapFromFileICM';
  6367.   function GdipCreateBitmapFromScan0; external WINGDIPDLL name 'GdipCreateBitmapFromScan0';
  6368.   function GdipCreateBitmapFromGraphics; external WINGDIPDLL name 'GdipCreateBitmapFromGraphics';
  6369.   function GdipCreateBitmapFromDirectDrawSurface; external WINGDIPDLL name 'GdipCreateBitmapFromDirectDrawSurface';
  6370.   function GdipCreateBitmapFromGdiDib; external WINGDIPDLL name 'GdipCreateBitmapFromGdiDib';
  6371.   function GdipCreateBitmapFromHBITMAP; external WINGDIPDLL name 'GdipCreateBitmapFromHBITMAP';
  6372.   function GdipCreateHBITMAPFromBitmap; external WINGDIPDLL name 'GdipCreateHBITMAPFromBitmap';
  6373.   function GdipCreateBitmapFromHICON; external WINGDIPDLL name 'GdipCreateBitmapFromHICON';
  6374.   function GdipCreateHICONFromBitmap; external WINGDIPDLL name 'GdipCreateHICONFromBitmap';
  6375.   function GdipCreateBitmapFromResource; external WINGDIPDLL name 'GdipCreateBitmapFromResource';
  6376.   function GdipCloneBitmapArea; external WINGDIPDLL name 'GdipCloneBitmapArea';
  6377.   function GdipCloneBitmapAreaI; external WINGDIPDLL name 'GdipCloneBitmapAreaI';
  6378.   function GdipBitmapLockBits; external WINGDIPDLL name 'GdipBitmapLockBits';
  6379.   function GdipBitmapUnlockBits; external WINGDIPDLL name 'GdipBitmapUnlockBits';
  6380.   function GdipBitmapGetPixel; external WINGDIPDLL name 'GdipBitmapGetPixel';
  6381.   function GdipBitmapSetPixel; external WINGDIPDLL name 'GdipBitmapSetPixel';
  6382.   function GdipBitmapSetResolution; external WINGDIPDLL name 'GdipBitmapSetResolution';
  6383.   function GdipCreateImageAttributes; external WINGDIPDLL name 'GdipCreateImageAttributes';
  6384.   function GdipCloneImageAttributes; external WINGDIPDLL name 'GdipCloneImageAttributes';
  6385.   function GdipDisposeImageAttributes; external WINGDIPDLL name 'GdipDisposeImageAttributes';
  6386.   function GdipSetImageAttributesToIdentity; external WINGDIPDLL name 'GdipSetImageAttributesToIdentity';
  6387.   function GdipResetImageAttributes; external WINGDIPDLL name 'GdipResetImageAttributes';
  6388.   function GdipSetImageAttributesColorMatrix; external WINGDIPDLL name 'GdipSetImageAttributesColorMatrix';
  6389.   function GdipSetImageAttributesThreshold; external WINGDIPDLL name 'GdipSetImageAttributesThreshold';
  6390.   function GdipSetImageAttributesGamma; external WINGDIPDLL name 'GdipSetImageAttributesGamma';
  6391.   function GdipSetImageAttributesNoOp; external WINGDIPDLL name 'GdipSetImageAttributesNoOp';
  6392.   function GdipSetImageAttributesColorKeys; external WINGDIPDLL name 'GdipSetImageAttributesColorKeys';
  6393.   function GdipSetImageAttributesOutputChannel; external WINGDIPDLL name 'GdipSetImageAttributesOutputChannel';
  6394.   function GdipSetImageAttributesOutputChannelColorProfile; external WINGDIPDLL name 'GdipSetImageAttributesOutputChannelColorProfile';
  6395.   function GdipSetImageAttributesRemapTable; external WINGDIPDLL name 'GdipSetImageAttributesRemapTable';
  6396.   function GdipSetImageAttributesWrapMode; external WINGDIPDLL name 'GdipSetImageAttributesWrapMode';
  6397.   function GdipSetImageAttributesICMMode; external WINGDIPDLL name 'GdipSetImageAttributesICMMode';
  6398.   function GdipGetImageAttributesAdjustedPalette; external WINGDIPDLL name 'GdipGetImageAttributesAdjustedPalette';
  6399.   function GdipFlush; external WINGDIPDLL name 'GdipFlush';
  6400.   function GdipCreateFromHDC; external WINGDIPDLL name 'GdipCreateFromHDC';
  6401.   function GdipCreateFromHDC2; external WINGDIPDLL name 'GdipCreateFromHDC2';
  6402.   function GdipCreateFromHWND; external WINGDIPDLL name 'GdipCreateFromHWND';
  6403.   function GdipCreateFromHWNDICM; external WINGDIPDLL name 'GdipCreateFromHWNDICM';
  6404.   function GdipDeleteGraphics; external WINGDIPDLL name 'GdipDeleteGraphics';
  6405.   function GdipGetDC; external WINGDIPDLL name 'GdipGetDC';
  6406.   function GdipReleaseDC; external WINGDIPDLL name 'GdipReleaseDC';
  6407.   function GdipSetCompositingMode; external WINGDIPDLL name 'GdipSetCompositingMode';
  6408.   function GdipGetCompositingMode; external WINGDIPDLL name 'GdipGetCompositingMode';
  6409.   function GdipSetRenderingOrigin; external WINGDIPDLL name 'GdipSetRenderingOrigin';
  6410.   function GdipGetRenderingOrigin; external WINGDIPDLL name 'GdipGetRenderingOrigin';
  6411.   function GdipSetCompositingQuality; external WINGDIPDLL name 'GdipSetCompositingQuality';
  6412.   function GdipGetCompositingQuality; external WINGDIPDLL name 'GdipGetCompositingQuality';
  6413.   function GdipSetSmoothingMode; external WINGDIPDLL name 'GdipSetSmoothingMode';
  6414.   function GdipGetSmoothingMode; external WINGDIPDLL name 'GdipGetSmoothingMode';
  6415.   function GdipSetPixelOffsetMode; external WINGDIPDLL name 'GdipSetPixelOffsetMode';
  6416.   function GdipGetPixelOffsetMode; external WINGDIPDLL name 'GdipGetPixelOffsetMode';
  6417.   function GdipSetTextRenderingHint; external WINGDIPDLL name 'GdipSetTextRenderingHint';
  6418.   function GdipGetTextRenderingHint; external WINGDIPDLL name 'GdipGetTextRenderingHint';
  6419.   function GdipSetTextContrast; external WINGDIPDLL name 'GdipSetTextContrast';
  6420.   function GdipGetTextContrast; external WINGDIPDLL name 'GdipGetTextContrast';
  6421.   function GdipSetInterpolationMode; external WINGDIPDLL name 'GdipSetInterpolationMode';
  6422.   function GdipGetInterpolationMode; external WINGDIPDLL name 'GdipGetInterpolationMode';
  6423.   function GdipSetWorldTransform; external WINGDIPDLL name 'GdipSetWorldTransform';
  6424.   function GdipResetWorldTransform; external WINGDIPDLL name 'GdipResetWorldTransform';
  6425.   function GdipMultiplyWorldTransform; external WINGDIPDLL name 'GdipMultiplyWorldTransform';
  6426.   function GdipTranslateWorldTransform; external WINGDIPDLL name 'GdipTranslateWorldTransform';
  6427.   function GdipScaleWorldTransform; external WINGDIPDLL name 'GdipScaleWorldTransform';
  6428.   function GdipRotateWorldTransform; external WINGDIPDLL name 'GdipRotateWorldTransform';
  6429.   function GdipGetWorldTransform; external WINGDIPDLL name 'GdipGetWorldTransform';
  6430.   function GdipResetPageTransform; external WINGDIPDLL name 'GdipResetPageTransform';
  6431.   function GdipGetPageUnit; external WINGDIPDLL name 'GdipGetPageUnit';
  6432.   function GdipGetPageScale; external WINGDIPDLL name 'GdipGetPageScale';
  6433.   function GdipSetPageUnit; external WINGDIPDLL name 'GdipSetPageUnit';
  6434.   function GdipSetPageScale; external WINGDIPDLL name 'GdipSetPageScale';
  6435.   function GdipGetDpiX; external WINGDIPDLL name 'GdipGetDpiX';
  6436.   function GdipGetDpiY; external WINGDIPDLL name 'GdipGetDpiY';
  6437.   function GdipTransformPoints; external WINGDIPDLL name 'GdipTransformPoints';
  6438.   function GdipTransformPointsI; external WINGDIPDLL name 'GdipTransformPointsI';
  6439.   function GdipGetNearestColor; external WINGDIPDLL name 'GdipGetNearestColor';
  6440.   function GdipCreateHalftonePalette; external WINGDIPDLL name 'GdipCreateHalftonePalette';
  6441.   function GdipDrawLine; external WINGDIPDLL name 'GdipDrawLine';
  6442.   function GdipDrawLineI; external WINGDIPDLL name 'GdipDrawLineI';
  6443.   function GdipDrawLines; external WINGDIPDLL name 'GdipDrawLines';
  6444.   function GdipDrawLinesI; external WINGDIPDLL name 'GdipDrawLinesI';
  6445.   function GdipDrawArc; external WINGDIPDLL name 'GdipDrawArc';
  6446.   function GdipDrawArcI; external WINGDIPDLL name 'GdipDrawArcI';
  6447.   function GdipDrawBezier; external WINGDIPDLL name 'GdipDrawBezier';
  6448.   function GdipDrawBezierI; external WINGDIPDLL name 'GdipDrawBezierI';
  6449.   function GdipDrawBeziers; external WINGDIPDLL name 'GdipDrawBeziers';
  6450.   function GdipDrawBeziersI; external WINGDIPDLL name 'GdipDrawBeziersI';
  6451.   function GdipDrawRectangle; external WINGDIPDLL name 'GdipDrawRectangle';
  6452.   function GdipDrawRectangleI; external WINGDIPDLL name 'GdipDrawRectangleI';
  6453.   function GdipDrawRectangles; external WINGDIPDLL name 'GdipDrawRectangles';
  6454.   function GdipDrawRectanglesI; external WINGDIPDLL name 'GdipDrawRectanglesI';
  6455.   function GdipDrawEllipse; external WINGDIPDLL name 'GdipDrawEllipse';
  6456.   function GdipDrawEllipseI; external WINGDIPDLL name 'GdipDrawEllipseI';
  6457.   function GdipDrawPie; external WINGDIPDLL name 'GdipDrawPie';
  6458.   function GdipDrawPieI; external WINGDIPDLL name 'GdipDrawPieI';
  6459.   function GdipDrawPolygon; external WINGDIPDLL name 'GdipDrawPolygon';
  6460.   function GdipDrawPolygonI; external WINGDIPDLL name 'GdipDrawPolygonI';
  6461.   function GdipDrawPath; external WINGDIPDLL name 'GdipDrawPath';
  6462.   function GdipDrawCurve; external WINGDIPDLL name 'GdipDrawCurve';
  6463.   function GdipDrawCurveI; external WINGDIPDLL name 'GdipDrawCurveI';
  6464.   function GdipDrawCurve2; external WINGDIPDLL name 'GdipDrawCurve2';
  6465.   function GdipDrawCurve2I; external WINGDIPDLL name 'GdipDrawCurve2I';
  6466.   function GdipDrawCurve3; external WINGDIPDLL name 'GdipDrawCurve3';
  6467.   function GdipDrawCurve3I; external WINGDIPDLL name 'GdipDrawCurve3I';
  6468.   function GdipDrawClosedCurve; external WINGDIPDLL name 'GdipDrawClosedCurve';
  6469.   function GdipDrawClosedCurveI; external WINGDIPDLL name 'GdipDrawClosedCurveI';
  6470.   function GdipDrawClosedCurve2; external WINGDIPDLL name 'GdipDrawClosedCurve2';
  6471.   function GdipDrawClosedCurve2I; external WINGDIPDLL name 'GdipDrawClosedCurve2I';
  6472.   function GdipGraphicsClear; external WINGDIPDLL name 'GdipGraphicsClear';
  6473.   function GdipFillRectangle; external WINGDIPDLL name 'GdipFillRectangle';
  6474.   function GdipFillRectangleI; external WINGDIPDLL name 'GdipFillRectangleI';
  6475.   function GdipFillRectangles; external WINGDIPDLL name 'GdipFillRectangles';
  6476.   function GdipFillRectanglesI; external WINGDIPDLL name 'GdipFillRectanglesI';
  6477.   function GdipFillPolygon; external WINGDIPDLL name 'GdipFillPolygon';
  6478.   function GdipFillPolygonI; external WINGDIPDLL name 'GdipFillPolygonI';
  6479.   function GdipFillPolygon2; external WINGDIPDLL name 'GdipFillPolygon2';
  6480.   function GdipFillPolygon2I; external WINGDIPDLL name 'GdipFillPolygon2I';
  6481.   function GdipFillEllipse; external WINGDIPDLL name 'GdipFillEllipse';
  6482.   function GdipFillEllipseI; external WINGDIPDLL name 'GdipFillEllipseI';
  6483.   function GdipFillPie; external WINGDIPDLL name 'GdipFillPie';
  6484.   function GdipFillPieI; external WINGDIPDLL name 'GdipFillPieI';
  6485.   function GdipFillPath; external WINGDIPDLL name 'GdipFillPath';
  6486.   function GdipFillClosedCurve; external WINGDIPDLL name 'GdipFillClosedCurve';
  6487.   function GdipFillClosedCurveI; external WINGDIPDLL name 'GdipFillClosedCurveI';
  6488.   function GdipFillClosedCurve2; external WINGDIPDLL name 'GdipFillClosedCurve2';
  6489.   function GdipFillClosedCurve2I; external WINGDIPDLL name 'GdipFillClosedCurve2I';
  6490.   function GdipFillRegion; external WINGDIPDLL name 'GdipFillRegion';
  6491.   function GdipDrawImage; external WINGDIPDLL name 'GdipDrawImage';
  6492.   function GdipDrawImageI; external WINGDIPDLL name 'GdipDrawImageI';
  6493.   function GdipDrawImageRect; external WINGDIPDLL name 'GdipDrawImageRect';
  6494.   function GdipDrawImageRectI; external WINGDIPDLL name 'GdipDrawImageRectI';
  6495.   function GdipDrawImagePoints; external WINGDIPDLL name 'GdipDrawImagePoints';
  6496.   function GdipDrawImagePointsI; external WINGDIPDLL name 'GdipDrawImagePointsI';
  6497.   function GdipDrawImagePointRect; external WINGDIPDLL name 'GdipDrawImagePointRect';
  6498.   function GdipDrawImagePointRectI; external WINGDIPDLL name 'GdipDrawImagePointRectI';
  6499.   function GdipDrawImageRectRect; external WINGDIPDLL name 'GdipDrawImageRectRect';
  6500.   function GdipDrawImageRectRectI; external WINGDIPDLL name 'GdipDrawImageRectRectI';
  6501.   function GdipDrawImagePointsRect; external WINGDIPDLL name 'GdipDrawImagePointsRect';
  6502.   function GdipDrawImagePointsRectI; external WINGDIPDLL name 'GdipDrawImagePointsRectI';
  6503.   function GdipEnumerateMetafileDestPoint; external WINGDIPDLL name 'GdipEnumerateMetafileDestPoint';
  6504.   function GdipEnumerateMetafileDestPointI; external WINGDIPDLL name 'GdipEnumerateMetafileDestPointI';
  6505.   function GdipEnumerateMetafileDestRect; external WINGDIPDLL name 'GdipEnumerateMetafileDestRect';
  6506.   function GdipEnumerateMetafileDestRectI; external WINGDIPDLL name 'GdipEnumerateMetafileDestRectI';
  6507.   function GdipEnumerateMetafileDestPoints; external WINGDIPDLL name 'GdipEnumerateMetafileDestPoints';
  6508.   function GdipEnumerateMetafileDestPointsI; external WINGDIPDLL name 'GdipEnumerateMetafileDestPointsI';
  6509.   function GdipEnumerateMetafileSrcRectDestPoint; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestPoint';
  6510.   function GdipEnumerateMetafileSrcRectDestPointI; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestPointI';
  6511.   function GdipEnumerateMetafileSrcRectDestRect; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestRect';
  6512.   function GdipEnumerateMetafileSrcRectDestRectI; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestRectI';
  6513.   function GdipEnumerateMetafileSrcRectDestPoints; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestPoints';
  6514.   function GdipEnumerateMetafileSrcRectDestPointsI; external WINGDIPDLL name 'GdipEnumerateMetafileSrcRectDestPointsI';
  6515.   function GdipPlayMetafileRecord; external WINGDIPDLL name 'GdipPlayMetafileRecord';
  6516.   function GdipSetClipGraphics; external WINGDIPDLL name 'GdipSetClipGraphics';
  6517.   function GdipSetClipRect; external WINGDIPDLL name 'GdipSetClipRect';
  6518.   function GdipSetClipRectI; external WINGDIPDLL name 'GdipSetClipRectI';
  6519.   function GdipSetClipPath; external WINGDIPDLL name 'GdipSetClipPath';
  6520.   function GdipSetClipRegion; external WINGDIPDLL name 'GdipSetClipRegion';
  6521.   function GdipSetClipHrgn; external WINGDIPDLL name 'GdipSetClipHrgn';
  6522.   function GdipResetClip; external WINGDIPDLL name 'GdipResetClip';
  6523.   function GdipTranslateClip; external WINGDIPDLL name 'GdipTranslateClip';
  6524.   function GdipTranslateClipI; external WINGDIPDLL name 'GdipTranslateClipI';
  6525.   function GdipGetClip; external WINGDIPDLL name 'GdipGetClip';
  6526.   function GdipGetClipBounds; external WINGDIPDLL name 'GdipGetClipBounds';
  6527.   function GdipGetClipBoundsI; external WINGDIPDLL name 'GdipGetClipBoundsI';
  6528.   function GdipIsClipEmpty; external WINGDIPDLL name 'GdipIsClipEmpty';
  6529.   function GdipGetVisibleClipBounds; external WINGDIPDLL name 'GdipGetVisibleClipBounds';
  6530.   function GdipGetVisibleClipBoundsI; external WINGDIPDLL name 'GdipGetVisibleClipBoundsI';
  6531.   function GdipIsVisibleClipEmpty; external WINGDIPDLL name 'GdipIsVisibleClipEmpty';
  6532.   function GdipIsVisiblePoint; external WINGDIPDLL name 'GdipIsVisiblePoint';
  6533.   function GdipIsVisiblePointI; external WINGDIPDLL name 'GdipIsVisiblePointI';
  6534.   function GdipIsVisibleRect; external WINGDIPDLL name 'GdipIsVisibleRect';
  6535.   function GdipIsVisibleRectI; external WINGDIPDLL name 'GdipIsVisibleRectI';
  6536.   function GdipSaveGraphics; external WINGDIPDLL name 'GdipSaveGraphics';
  6537.   function GdipRestoreGraphics; external WINGDIPDLL name 'GdipRestoreGraphics';
  6538.   function GdipBeginContainer; external WINGDIPDLL name 'GdipBeginContainer';
  6539.   function GdipBeginContainerI; external WINGDIPDLL name 'GdipBeginContainerI';
  6540.   function GdipBeginContainer2; external WINGDIPDLL name 'GdipBeginContainer2';
  6541.   function GdipEndContainer; external WINGDIPDLL name 'GdipEndContainer';
  6542.   function GdipGetMetafileHeaderFromWmf; external WINGDIPDLL name 'GdipGetMetafileHeaderFromWmf';
  6543.   function GdipGetMetafileHeaderFromEmf; external WINGDIPDLL name 'GdipGetMetafileHeaderFromEmf';
  6544.   function GdipGetMetafileHeaderFromFile; external WINGDIPDLL name 'GdipGetMetafileHeaderFromFile';
  6545.   function GdipGetMetafileHeaderFromStream; external WINGDIPDLL name 'GdipGetMetafileHeaderFromStream';
  6546.   function GdipGetMetafileHeaderFromMetafile; external WINGDIPDLL name 'GdipGetMetafileHeaderFromMetafile';
  6547.   function GdipGetHemfFromMetafile; external WINGDIPDLL name 'GdipGetHemfFromMetafile';
  6548.   function GdipCreateStreamOnFile; external WINGDIPDLL name 'GdipCreateStreamOnFile';
  6549.   function GdipCreateMetafileFromWmf; external WINGDIPDLL name 'GdipCreateMetafileFromWmf';
  6550.   function GdipCreateMetafileFromEmf; external WINGDIPDLL name 'GdipCreateMetafileFromEmf';
  6551.   function GdipCreateMetafileFromFile; external WINGDIPDLL name 'GdipCreateMetafileFromFile';
  6552.   function GdipCreateMetafileFromWmfFile; external WINGDIPDLL name 'GdipCreateMetafileFromWmfFile';
  6553.   function GdipCreateMetafileFromStream; external WINGDIPDLL name 'GdipCreateMetafileFromStream';
  6554.   function GdipRecordMetafile; external WINGDIPDLL name 'GdipRecordMetafile';
  6555.   function GdipRecordMetafileI; external WINGDIPDLL name 'GdipRecordMetafileI';
  6556.   function GdipRecordMetafileFileName; external WINGDIPDLL name 'GdipRecordMetafileFileName';
  6557.   function GdipRecordMetafileFileNameI; external WINGDIPDLL name 'GdipRecordMetafileFileNameI';
  6558.   function GdipRecordMetafileStream; external WINGDIPDLL name 'GdipRecordMetafileStream';
  6559.   function GdipRecordMetafileStreamI; external WINGDIPDLL name 'GdipRecordMetafileStreamI';
  6560.   function GdipSetMetafileDownLevelRasterizationLimit; external WINGDIPDLL name 'GdipSetMetafileDownLevelRasterizationLimit';
  6561.   function GdipGetMetafileDownLevelRasterizationLimit; external WINGDIPDLL name 'GdipGetMetafileDownLevelRasterizationLimit';
  6562.   function GdipGetImageDecodersSize; external WINGDIPDLL name 'GdipGetImageDecodersSize';
  6563.   function GdipGetImageDecoders; external WINGDIPDLL name 'GdipGetImageDecoders';
  6564.   function GdipGetImageEncodersSize; external WINGDIPDLL name 'GdipGetImageEncodersSize';
  6565.   function GdipGetImageEncoders; external WINGDIPDLL name 'GdipGetImageEncoders';
  6566.   function GdipComment; external WINGDIPDLL name 'GdipComment';
  6567.   function GdipCreateFontFamilyFromName; external WINGDIPDLL name 'GdipCreateFontFamilyFromName';
  6568.   function GdipDeleteFontFamily; external WINGDIPDLL name 'GdipDeleteFontFamily';
  6569.   function GdipCloneFontFamily; external WINGDIPDLL name 'GdipCloneFontFamily';
  6570.   function GdipGetGenericFontFamilySansSerif; external WINGDIPDLL name 'GdipGetGenericFontFamilySansSerif';
  6571.   function GdipGetGenericFontFamilySerif; external WINGDIPDLL name 'GdipGetGenericFontFamilySerif';
  6572.   function GdipGetGenericFontFamilyMonospace; external WINGDIPDLL name 'GdipGetGenericFontFamilyMonospace';
  6573.   function GdipGetFamilyName; external WINGDIPDLL name 'GdipGetFamilyName';
  6574.   function GdipIsStyleAvailable; external WINGDIPDLL name 'GdipIsStyleAvailable';
  6575.   function GdipFontCollectionEnumerable; external WINGDIPDLL name 'GdipFontCollectionEnumerable';
  6576.   function GdipFontCollectionEnumerate; external WINGDIPDLL name 'GdipFontCollectionEnumerate';
  6577.   function GdipGetEmHeight; external WINGDIPDLL name 'GdipGetEmHeight';
  6578.   function GdipGetCellAscent; external WINGDIPDLL name 'GdipGetCellAscent';
  6579.   function GdipGetCellDescent; external WINGDIPDLL name 'GdipGetCellDescent';
  6580.   function GdipGetLineSpacing; external WINGDIPDLL name 'GdipGetLineSpacing';
  6581.   function GdipCreateFontFromDC; external WINGDIPDLL name 'GdipCreateFontFromDC';
  6582.   function GdipCreateFontFromLogfontA; external WINGDIPDLL name 'GdipCreateFontFromLogfontA';
  6583.   function GdipCreateFontFromLogfontW; external WINGDIPDLL name 'GdipCreateFontFromLogfontW';
  6584.   function GdipCreateFont; external WINGDIPDLL name 'GdipCreateFont';
  6585.   function GdipCloneFont; external WINGDIPDLL name 'GdipCloneFont';
  6586.   function GdipDeleteFont; external WINGDIPDLL name 'GdipDeleteFont';
  6587.   function GdipGetFamily; external WINGDIPDLL name 'GdipGetFamily';
  6588.   function GdipGetFontStyle; external WINGDIPDLL name 'GdipGetFontStyle';
  6589.   function GdipGetFontSize; external WINGDIPDLL name 'GdipGetFontSize';
  6590.   function GdipGetFontUnit; external WINGDIPDLL name 'GdipGetFontUnit';
  6591.   function GdipGetFontHeight; external WINGDIPDLL name 'GdipGetFontHeight';
  6592.   function GdipGetFontHeightGivenDPI; external WINGDIPDLL name 'GdipGetFontHeightGivenDPI';
  6593.   function GdipGetLogFontA; external WINGDIPDLL name 'GdipGetLogFontA';
  6594.   function GdipGetLogFontW; external WINGDIPDLL name 'GdipGetLogFontW';
  6595.   function GdipNewInstalledFontCollection; external WINGDIPDLL name 'GdipNewInstalledFontCollection';
  6596.   function GdipNewPrivateFontCollection; external WINGDIPDLL name 'GdipNewPrivateFontCollection';
  6597.   function GdipDeletePrivateFontCollection; external WINGDIPDLL name 'GdipDeletePrivateFontCollection';
  6598.   function GdipGetFontCollectionFamilyCount; external WINGDIPDLL name 'GdipGetFontCollectionFamilyCount';
  6599.   function GdipGetFontCollectionFamilyList; external WINGDIPDLL name 'GdipGetFontCollectionFamilyList';
  6600.   function GdipPrivateAddFontFile; external WINGDIPDLL name 'GdipPrivateAddFontFile';
  6601.   function GdipPrivateAddMemoryFont; external WINGDIPDLL name 'GdipPrivateAddMemoryFont';
  6602.   function GdipDrawString; external WINGDIPDLL name 'GdipDrawString';
  6603.   function GdipMeasureString; external WINGDIPDLL name 'GdipMeasureString';
  6604.   function GdipMeasureCharacterRanges; external WINGDIPDLL name 'GdipMeasureCharacterRanges';
  6605.   function GdipDrawDriverString; external WINGDIPDLL name 'GdipDrawDriverString';
  6606.   function GdipMeasureDriverString; external WINGDIPDLL name 'GdipMeasureDriverString';
  6607.   function GdipCreateStringFormat; external WINGDIPDLL name 'GdipCreateStringFormat';
  6608.   function GdipStringFormatGetGenericDefault; external WINGDIPDLL name 'GdipStringFormatGetGenericDefault';
  6609.   function GdipStringFormatGetGenericTypographic; external WINGDIPDLL name 'GdipStringFormatGetGenericTypographic';
  6610.   function GdipDeleteStringFormat; external WINGDIPDLL name 'GdipDeleteStringFormat';
  6611.   function GdipCloneStringFormat; external WINGDIPDLL name 'GdipCloneStringFormat';
  6612.   function GdipSetStringFormatFlags; external WINGDIPDLL name 'GdipSetStringFormatFlags';
  6613.   function GdipGetStringFormatFlags; external WINGDIPDLL name 'GdipGetStringFormatFlags';
  6614.   function GdipSetStringFormatAlign; external WINGDIPDLL name 'GdipSetStringFormatAlign';
  6615.   function GdipGetStringFormatAlign; external WINGDIPDLL name 'GdipGetStringFormatAlign';
  6616.   function GdipSetStringFormatLineAlign; external WINGDIPDLL name 'GdipSetStringFormatLineAlign';
  6617.   function GdipGetStringFormatLineAlign; external WINGDIPDLL name 'GdipGetStringFormatLineAlign';
  6618.   function GdipSetStringFormatTrimming; external WINGDIPDLL name 'GdipSetStringFormatTrimming';
  6619.   function GdipGetStringFormatTrimming; external WINGDIPDLL name 'GdipGetStringFormatTrimming';
  6620.   function GdipSetStringFormatHotkeyPrefix; external WINGDIPDLL name 'GdipSetStringFormatHotkeyPrefix';
  6621.   function GdipGetStringFormatHotkeyPrefix; external WINGDIPDLL name 'GdipGetStringFormatHotkeyPrefix';
  6622.   function GdipSetStringFormatTabStops; external WINGDIPDLL name 'GdipSetStringFormatTabStops';
  6623.   function GdipGetStringFormatTabStops; external WINGDIPDLL name 'GdipGetStringFormatTabStops';
  6624.   function GdipGetStringFormatTabStopCount; external WINGDIPDLL name 'GdipGetStringFormatTabStopCount';
  6625.   function GdipSetStringFormatDigitSubstitution; external WINGDIPDLL name 'GdipSetStringFormatDigitSubstitution';
  6626.   function GdipGetStringFormatDigitSubstitution; external WINGDIPDLL name 'GdipGetStringFormatDigitSubstitution';
  6627.   function GdipGetStringFormatMeasurableCharacterRangeCount; external WINGDIPDLL name 'GdipGetStringFormatMeasurableCharacterRangeCount';
  6628.   function GdipSetStringFormatMeasurableCharacterRanges; external WINGDIPDLL name 'GdipSetStringFormatMeasurableCharacterRanges';
  6629.   function GdipCreateCachedBitmap; external WINGDIPDLL name 'GdipCreateCachedBitmap';
  6630.   function GdipDeleteCachedBitmap; external WINGDIPDLL name 'GdipDeleteCachedBitmap';
  6631.   function GdipDrawCachedBitmap; external WINGDIPDLL name 'GdipDrawCachedBitmap';
  6632.   function GdipEmfToWmfBits; external WINGDIPDLL name 'GdipEmfToWmfBits';
  6633.  
  6634. // -----------------------------------------------------------------------------
  6635. // TGdiplusBase class
  6636. // -----------------------------------------------------------------------------
  6637.  
  6638.   class function TGdiplusBase.NewInstance: TObject;
  6639.   begin
  6640.     Result := InitInstance(GdipAlloc(ULONG(instanceSize)));
  6641.   end;
  6642.  
  6643.   procedure TGdiplusBase.FreeInstance;
  6644.   begin
  6645.     CleanupInstance;
  6646.     GdipFree(Self);
  6647.   end;
  6648.  
  6649. // -----------------------------------------------------------------------------
  6650. // macros
  6651. // -----------------------------------------------------------------------------
  6652.  
  6653. function ObjectTypeIsValid(type_: ObjectType): BOOL;
  6654. begin
  6655.   result :=  ((type_ >= ObjectTypeMin) and (type_ <= ObjectTypeMax));
  6656. end;
  6657.  
  6658. function GDIP_WMF_RECORD_TO_EMFPLUS(n: integer): Integer;
  6659. begin
  6660.   result := (n or GDIP_WMF_RECORD_BASE);
  6661. end;
  6662.  
  6663. function GDIP_EMFPLUS_RECORD_TO_WMF(n: integer): Integer;
  6664. begin
  6665.   result := n and (not GDIP_WMF_RECORD_BASE);
  6666. end;
  6667.  
  6668. function GDIP_IS_WMF_RECORDTYPE(n: integer): BOOL;
  6669. begin
  6670.   result := ((n and GDIP_WMF_RECORD_BASE) <> 0);
  6671. end;
  6672.  
  6673.  
  6674. //--------------------------------------------------------------------------
  6675. // TGPPoint Util
  6676. //--------------------------------------------------------------------------
  6677.  
  6678.   function MakePoint(X, Y: Integer): TGPPoint;
  6679.   begin
  6680.     result.X := X;
  6681.     result.Y := Y;
  6682.   end;
  6683.  
  6684.   function MakePoint(X, Y: Single): TGPPointF;
  6685.   begin
  6686.     Result.X := X;
  6687.     result.Y := Y;
  6688.   end;
  6689.  
  6690. //--------------------------------------------------------------------------
  6691. // TGPSize Util
  6692. //--------------------------------------------------------------------------
  6693.  
  6694.   function MakeSize(Width, Height: Single): TGPSizeF;
  6695.   begin
  6696.     result.Width := Width;
  6697.     result.Height := Height;
  6698.   end;
  6699.  
  6700.   function MakeSize(Width, Height: Integer): TGPSize;
  6701.   begin
  6702.     result.Width := Width;
  6703.     result.Height := Height;
  6704.   end;
  6705.  
  6706. //--------------------------------------------------------------------------
  6707. // TCharacterRange Util
  6708. //--------------------------------------------------------------------------
  6709.  
  6710.   function MakeCharacterRange(First, Length: Integer): TCharacterRange;
  6711.   begin
  6712.     result.First  := First;
  6713.     result.Length := Length;
  6714.   end;
  6715.  
  6716. // -----------------------------------------------------------------------------
  6717. // RectF class
  6718. // -----------------------------------------------------------------------------
  6719.  
  6720.   function MakeRect(x, y, width, height: Single): TGPRectF; overload;
  6721.   begin
  6722.     Result.X      := x;
  6723.     Result.Y      := y;
  6724.     Result.Width  := width;
  6725.     Result.Height := height;
  6726.   end;
  6727.  
  6728.   function MakeRect(location: TGPPointF; size: TGPSizeF): TGPRectF; overload;
  6729.   begin
  6730.     Result.X      := location.X;
  6731.     Result.Y      := location.Y;
  6732.     Result.Width  := size.Width;
  6733.     Result.Height := size.Height;
  6734.   end;
  6735.  
  6736. // -----------------------------------------------------------------------------
  6737. // Rect class
  6738. // -----------------------------------------------------------------------------
  6739.  
  6740.   function MakeRect(x, y, width, height: Integer): TGPRect; overload;
  6741.   begin
  6742.     Result.X      := x;
  6743.     Result.Y      := y;
  6744.     Result.Width  := width;
  6745.     Result.Height := height;
  6746.   end;
  6747.  
  6748.   function MakeRect(location: TGPPoint; size: TGPSize): TGPRect; overload;
  6749.   begin
  6750.     Result.X      := location.X;
  6751.     Result.Y      := location.Y;
  6752.     Result.Width  := size.Width;
  6753.     Result.Height := size.Height;
  6754.   end;
  6755.  
  6756.   function MakeRect(const Rect: TRect): TGPRect;
  6757.   begin
  6758.     Result.X := rect.Left;
  6759.     Result.Y := Rect.Top;
  6760.     Result.Width := Rect.Right-Rect.Left;
  6761.     Result.Height:= Rect.Bottom-Rect.Top;
  6762.   end;
  6763.  
  6764. // -----------------------------------------------------------------------------
  6765. // PathData class
  6766. // -----------------------------------------------------------------------------
  6767.  
  6768.   constructor TPathData.Create;
  6769.   begin
  6770.     Count := 0;
  6771.     Points := nil;
  6772.     Types := nil;
  6773.   end;
  6774.  
  6775.   destructor TPathData.destroy;
  6776.   begin
  6777.     if assigned(Points) then freemem(Points);
  6778.     if assigned(Types) then freemem(Types);
  6779.   end;
  6780.  
  6781.  
  6782. function GetPixelFormatSize(pixfmt: PixelFormat): UINT;
  6783. begin
  6784.   result := (pixfmt shr 8) and $ff;
  6785. end;
  6786.  
  6787. function IsIndexedPixelFormat(pixfmt: PixelFormat): BOOL;
  6788. begin
  6789.   result := (pixfmt and PixelFormatIndexed) <> 0;
  6790. end;
  6791.  
  6792. function IsAlphaPixelFormat(pixfmt: PixelFormat): BOOL;
  6793. begin
  6794.   result := (pixfmt and PixelFormatAlpha) <> 0;
  6795. end;
  6796.  
  6797. function IsExtendedPixelFormat(pixfmt: PixelFormat): BOOL;
  6798. begin
  6799.   result := (pixfmt and PixelFormatExtended) <> 0;
  6800. end;
  6801.  
  6802. function IsCanonicalPixelFormat(pixfmt: PixelFormat): BOOL;
  6803. begin
  6804.   result := (pixfmt and PixelFormatCanonical) <> 0;
  6805. end;
  6806.  
  6807. // -----------------------------------------------------------------------------
  6808. // Color class
  6809. // -----------------------------------------------------------------------------
  6810.  
  6811. {  constructor TGPColor.Create;
  6812.   begin
  6813.     Argb := DWORD(Black);
  6814.   end;
  6815.  
  6816.   // Construct an opaque Color object with
  6817.   // the specified Red, Green, Blue values.
  6818.   //
  6819.   // Color values are not premultiplied.
  6820.  
  6821.   constructor TGPColor.Create(r, g, b: Byte);
  6822.   begin
  6823.     Argb := MakeARGB(255, r, g, b);
  6824.   end;
  6825.  
  6826.   constructor TGPColor.Create(a, r, g, b: Byte);
  6827.   begin
  6828.     Argb := MakeARGB(a, r, g, b);
  6829.   end;
  6830.  
  6831.   constructor TGPColor.Create(Value: ARGB);
  6832.   begin
  6833.     Argb := Value;
  6834.   end;
  6835.  
  6836.   function TGPColor.GetAlpha: BYTE;
  6837.   begin
  6838.     result := BYTE(Argb shr AlphaShift);
  6839.   end;
  6840.  
  6841.   function TGPColor.GetA: BYTE;
  6842.   begin
  6843.     result := GetAlpha;
  6844.   end;
  6845.  
  6846.   function TGPColor.GetRed: BYTE;
  6847.   begin
  6848.     result := BYTE(Argb shr RedShift);
  6849.   end;
  6850.  
  6851.   function TGPColor.GetR: BYTE;
  6852.   begin
  6853.     result := GetRed;
  6854.   end;
  6855.  
  6856.   function TGPColor.GetGreen: Byte;
  6857.   begin
  6858.     result := BYTE(Argb shr GreenShift);
  6859.   end;
  6860.  
  6861.   function TGPColor.GetG: Byte;
  6862.   begin
  6863.     result := GetGreen;
  6864.   end;
  6865.  
  6866.   function TGPColor.GetBlue: Byte;
  6867.   begin
  6868.     result := BYTE(Argb shr BlueShift);
  6869.   end;
  6870.  
  6871.   function TGPColor.GetB: Byte;
  6872.   begin
  6873.     result := GetBlue;
  6874.   end;
  6875.  
  6876.   function TGPColor.GetValue: ARGB;
  6877.   begin
  6878.     result := Argb;
  6879.   end;
  6880.  
  6881.   procedure TGPColor.SetValue(Value: ARGB);
  6882.   begin
  6883.     Argb := Value;
  6884.   end;
  6885.  
  6886.   procedure TGPColor.SetFromCOLORREF(rgb: COLORREF);
  6887.   begin
  6888.     Argb := MakeARGB(255, GetRValue(rgb), GetGValue(rgb), GetBValue(rgb));
  6889.   end;
  6890.  
  6891.   function TGPColor.ToCOLORREF: COLORREF;
  6892.   begin
  6893.     result := RGB(GetRed, GetGreen, GetBlue);
  6894.   end;
  6895.  
  6896.   function TGPColor.MakeARGB(a, r, g, b: Byte): ARGB;
  6897.   begin
  6898.     result := ((DWORD(b) shl  BlueShift) or
  6899.                (DWORD(g) shl GreenShift) or
  6900.                (DWORD(r) shl   RedShift) or
  6901.                (DWORD(a) shl AlphaShift));
  6902.   end;  }
  6903.  
  6904.   function MakeColor(r, g, b: Byte): ARGB; overload;
  6905.   begin
  6906.     result := MakeColor(255, r, g, b);
  6907.   end;
  6908.  
  6909.   function MakeColor(a, r, g, b: Byte): ARGB; overload;
  6910.   begin
  6911.     result := ((DWORD(b) shl  BlueShift) or
  6912.                (DWORD(g) shl GreenShift) or
  6913.                (DWORD(r) shl   RedShift) or
  6914.                (DWORD(a) shl AlphaShift));
  6915.   end;
  6916.  
  6917.   function GetAlpha(color: ARGB): BYTE;
  6918.   begin
  6919.     result := BYTE(color shr AlphaShift);
  6920.   end;
  6921.  
  6922.   function GetRed(color: ARGB): BYTE;
  6923.   begin
  6924.     result := BYTE(color shr RedShift);
  6925.   end;
  6926.  
  6927.   function GetGreen(color: ARGB): BYTE;
  6928.   begin
  6929.     result := BYTE(color shr GreenShift);
  6930.   end;
  6931.  
  6932.   function GetBlue(color: ARGB): BYTE;
  6933.   begin
  6934.     result := BYTE(color shr BlueShift);
  6935.   end;
  6936.  
  6937.   function ColorRefToARGB(rgb: COLORREF): ARGB;
  6938.   begin
  6939.     result := MakeColor(255, GetRValue(rgb), GetGValue(rgb), GetBValue(rgb));
  6940.   end;
  6941.  
  6942.   function ARGBToColorRef(Color: ARGB): COLORREF;
  6943.   begin
  6944.     result := RGB(GetRed(Color), GetGreen(Color), GetBlue(Color));
  6945.   end;
  6946.  
  6947.  
  6948. // -----------------------------------------------------------------------------
  6949. // MetafileHeader class
  6950. // -----------------------------------------------------------------------------
  6951.  
  6952.   procedure TMetafileHeader.GetBounds(out Rect: TGPRect);
  6953.   begin
  6954.     rect.X      := X;
  6955.     rect.Y      := Y;
  6956.     rect.Width  := Width;
  6957.     rect.Height := Height;
  6958.   end;
  6959.  
  6960.   function TMetafileHeader.IsWmf: BOOL;
  6961.   begin
  6962.     result :=  ((Type_ = MetafileTypeWmf) or (Type_ = MetafileTypeWmfPlaceable));
  6963.   end;
  6964.  
  6965.   function TMetafileHeader.IsWmfPlaceable: BOOL;
  6966.   begin
  6967.     result := (Type_ = MetafileTypeWmfPlaceable);
  6968.   end;
  6969.  
  6970.   function TMetafileHeader.IsEmf: BOOL;
  6971.   begin
  6972.     result := (Type_ = MetafileTypeEmf);
  6973.   end;
  6974.  
  6975.   function TMetafileHeader.IsEmfOrEmfPlus: BOOL;
  6976.   begin
  6977.     result := (Type_ >= MetafileTypeEmf);
  6978.   end;
  6979.  
  6980.   function TMetafileHeader.IsEmfPlus: BOOL;
  6981.   begin
  6982.     result := (Type_ >= MetafileTypeEmfPlusOnly)
  6983.   end;
  6984.  
  6985.   function TMetafileHeader.IsEmfPlusDual: BOOL;
  6986.   begin
  6987.     result := (Type_ = MetafileTypeEmfPlusDual)
  6988.   end;
  6989.  
  6990.   function TMetafileHeader.IsEmfPlusOnly: BOOL;
  6991.   begin
  6992.     result := (Type_ = MetafileTypeEmfPlusOnly)
  6993.   end;
  6994.  
  6995.   function TMetafileHeader.IsDisplay: BOOL;
  6996.   begin
  6997.     result := (IsEmfPlus and ((EmfPlusFlags and GDIP_EMFPLUSFLAGS_DISPLAY) <> 0));
  6998.   end;
  6999.  
  7000.   function TMetafileHeader.GetWmfHeader: PMetaHeader;
  7001.   begin
  7002.     if IsWmf then result :=  @Header.WmfHeader
  7003.              else result := nil;
  7004.   end;
  7005.  
  7006.   function TMetafileHeader.GetEmfHeader: PENHMETAHEADER3;
  7007.   begin
  7008.     if IsEmfOrEmfPlus then result := @Header.EmfHeader
  7009.                       else result := nil;
  7010.   end;
  7011.  
  7012. end.
  7013.  
  7014.  
  7015.  
  7016.