JwaWinGDI.pas
上传用户:davidchvip
上传日期:2009-07-28
资源大小:1749k
文件大小:424k
源码类别:

Windows编程

开发平台:

Delphi

  1.   TOutlineTextMetricA = _OUTLINETEXTMETRICA;
  2.   POutlineTextMetricW = ^TOutlineTextMetricW;
  3.   _OUTLINETEXTMETRICW = record
  4.     otmSize: UINT;
  5.     otmTextMetrics: TEXTMETRICW;
  6.     otmFiller: BYTE;
  7.     otmPanoseNumber: PANOSE;
  8.     otmfsSelection: UINT;
  9.     otmfsType: UINT;
  10.     otmsCharSlopeRise: Integer;
  11.     otmsCharSlopeRun: Integer;
  12.     otmItalicAngle: Integer;
  13.     otmEMSquare: UINT;
  14.     otmAscent: Integer;
  15.     otmDescent: Integer;
  16.     otmLineGap: UINT;
  17.     otmsCapEmHeight: UINT;
  18.     otmsXHeight: UINT;
  19.     otmrcFontBox: RECT;
  20.     otmMacAscent: Integer;
  21.     otmMacDescent: Integer;
  22.     otmMacLineGap: UINT;
  23.     otmusMinimumPPEM: UINT;
  24.     otmptSubscriptSize: POINT;
  25.     otmptSubscriptOffset: POINT;
  26.     otmptSuperscriptSize: POINT;
  27.     otmptSuperscriptOffset: POINT;
  28.     otmsStrikeoutSize: UINT;
  29.     otmsStrikeoutPosition: Integer;
  30.     otmsUnderscoreSize: Integer;
  31.     otmsUnderscorePosition: Integer;
  32.     otmpFamilyName: PSTR;
  33.     otmpFaceName: PSTR;
  34.     otmpStyleName: PSTR;
  35.     otmpFullName: PSTR;
  36.   end;
  37.   {$EXTERNALSYM _OUTLINETEXTMETRICW}
  38.   OUTLINETEXTMETRICW = _OUTLINETEXTMETRICW;
  39.   {$EXTERNALSYM OUTLINETEXTMETRICW}
  40.   LPOUTLINETEXTMETRICW = ^OUTLINETEXTMETRICW;
  41.   {$EXTERNALSYM LPOUTLINETEXTMETRICW}
  42.   NPOUTLINETEXTMETRICW = ^OUTLINETEXTMETRICW;
  43.   {$EXTERNALSYM NPOUTLINETEXTMETRICW}
  44.   TOutlineTextMetricW = _OUTLINETEXTMETRICW;
  45. {$IFDEF UNICODE}
  46.   OUTLINETEXTMETRIC = OUTLINETEXTMETRICW;
  47.   {$EXTERNALSYM OUTLINETEXTMETRIC}
  48.   POUTLINETEXTMETRIC = POUTLINETEXTMETRICW;
  49.   {$EXTERNALSYM POUTLINETEXTMETRIC}
  50.   NPOUTLINETEXTMETRIC = NPOUTLINETEXTMETRICW;
  51.   {$EXTERNALSYM NPOUTLINETEXTMETRIC}
  52.   LPOUTLINETEXTMETRIC = LPOUTLINETEXTMETRICW;
  53.   {$EXTERNALSYM LPOUTLINETEXTMETRIC}
  54.   TOutlineTextMetric = TOutlineTextMetricW;
  55. {$ELSE}
  56.   OUTLINETEXTMETRIC = OUTLINETEXTMETRICA;
  57.   {$EXTERNALSYM OUTLINETEXTMETRIC}
  58.   POUTLINETEXTMETRIC = POUTLINETEXTMETRICA;
  59.   {$EXTERNALSYM POUTLINETEXTMETRIC}
  60.   NPOUTLINETEXTMETRIC = NPOUTLINETEXTMETRICA;
  61.   {$EXTERNALSYM NPOUTLINETEXTMETRIC}
  62.   LPOUTLINETEXTMETRIC = LPOUTLINETEXTMETRICA;
  63.   {$EXTERNALSYM LPOUTLINETEXTMETRIC}
  64.   TOutlineTextMetric = TOutlineTextMetricA;
  65. {$ENDIF}
  66.   PPolytextA = ^TPolytextA;
  67.   tagPOLYTEXTA = record
  68.     x: Integer;
  69.     y: Integer;
  70.     n: UINT;
  71.     lpstr: LPCSTR;
  72.     uiFlags: UINT;
  73.     rcl: RECT;
  74.     pdx: PINT;
  75.   end;
  76.   {$EXTERNALSYM tagPOLYTEXTA}
  77.   POLYTEXTA = tagPOLYTEXTA;
  78.   {$EXTERNALSYM POLYTEXTA}
  79.   LPPOLYTEXTA = ^POLYTEXTA;
  80.   {$EXTERNALSYM LPPOLYTEXTA}
  81.   NPPOLYTEXTA = ^POLYTEXTA;
  82.   {$EXTERNALSYM NPPOLYTEXTA}
  83.   TPolytextA = POLYTEXTA;
  84.   PPolytextW = ^TPolytextW;
  85.   tagPOLYTEXTW = record
  86.     x: Integer;
  87.     y: Integer;
  88.     n: UINT;
  89.     lpstr: LPCWSTR;
  90.     uiFlags: UINT;
  91.     rcl: RECT;
  92.     pdx: PINT;
  93.   end;
  94.   {$EXTERNALSYM tagPOLYTEXTW}
  95.   POLYTEXTW = tagPOLYTEXTW;
  96.   {$EXTERNALSYM POLYTEXTW}
  97.   LPPOLYTEXTW = ^POLYTEXTW;
  98.   {$EXTERNALSYM LPPOLYTEXTW}
  99.   NPPOLYTEXTW = ^POLYTEXTW;
  100.   {$EXTERNALSYM NPPOLYTEXTW}
  101.   TPolytextW = POLYTEXTW;
  102. {$IFDEF UNICODE}
  103.   POLYTEXT = POLYTEXTW;
  104.   {$EXTERNALSYM POLYTEXT}
  105.   PPOLYTEXT = PPOLYTEXTW;
  106.   {$EXTERNALSYM PPOLYTEXT}
  107.   NPPOLYTEXT = NPPOLYTEXTW;
  108.   {$EXTERNALSYM NPPOLYTEXT}
  109.   LPPOLYTEXT = LPPOLYTEXTW;
  110.   {$EXTERNALSYM LPPOLYTEXT}
  111.   TPolyText = TPolyTextW;
  112. {$ELSE}
  113.   POLYTEXT = POLYTEXTA;
  114.   {$EXTERNALSYM POLYTEXT}
  115.   PPOLYTEXT = PPOLYTEXTA;
  116.   {$EXTERNALSYM PPOLYTEXT}
  117.   NPPOLYTEXT = NPPOLYTEXTA;
  118.   {$EXTERNALSYM NPPOLYTEXT}
  119.   LPPOLYTEXT = LPPOLYTEXTA;
  120.   {$EXTERNALSYM LPPOLYTEXT}
  121.   TPolyText = TPolyTextA;
  122. {$ENDIF}
  123.   PFixed = ^TFixed;
  124.   _FIXED = record
  125.     fract: WORD;
  126.     value: short;
  127.   end;
  128.   {$EXTERNALSYM _FIXED}
  129.   FIXED = _FIXED;
  130.   {$EXTERNALSYM FIXED}
  131.   TFixed = _FIXED;
  132.   PMat2 = ^TMat2;
  133.   _MAT2 = record
  134.     eM11: FIXED;
  135.     eM12: FIXED;
  136.     eM21: FIXED;
  137.     eM22: FIXED;
  138.   end;
  139.   {$EXTERNALSYM _MAT2}
  140.   MAT2 = _MAT2;
  141.   {$EXTERNALSYM MAT2}
  142.   LPMAT2 = ^MAT2;
  143.   {$EXTERNALSYM LPMAT2}
  144.   TMat2 = _MAT2;
  145.   PGlyphMetrics = ^TGlyphMetrics;
  146.   _GLYPHMETRICS = record
  147.     gmBlackBoxX: UINT;
  148.     gmBlackBoxY: UINT;
  149.     gmptGlyphOrigin: POINT;
  150.     gmCellIncX: short;
  151.     gmCellIncY: short;
  152.   end;
  153.   {$EXTERNALSYM _GLYPHMETRICS}
  154.   GLYPHMETRICS = _GLYPHMETRICS;
  155.   {$EXTERNALSYM GLYPHMETRICS}
  156.   LPGLYPHMETRICS = ^GLYPHMETRICS;
  157.   {$EXTERNALSYM LPGLYPHMETRICS}
  158.   TGlyphMetrics = _GLYPHMETRICS;
  159. //  GetGlyphOutline constants
  160. const
  161.   GGO_METRICS = 0;
  162.   {$EXTERNALSYM GGO_METRICS}
  163.   GGO_BITMAP  = 1;
  164.   {$EXTERNALSYM GGO_BITMAP}
  165.   GGO_NATIVE  = 2;
  166.   {$EXTERNALSYM GGO_NATIVE}
  167.   GGO_BEZIER  = 3;
  168.   {$EXTERNALSYM GGO_BEZIER}
  169.   GGO_GRAY2_BITMAP = 4;
  170.   {$EXTERNALSYM GGO_GRAY2_BITMAP}
  171.   GGO_GRAY4_BITMAP = 5;
  172.   {$EXTERNALSYM GGO_GRAY4_BITMAP}
  173.   GGO_GRAY8_BITMAP = 6;
  174.   {$EXTERNALSYM GGO_GRAY8_BITMAP}
  175.   GGO_GLYPH_INDEX  = $0080;
  176.   {$EXTERNALSYM GGO_GLYPH_INDEX}
  177.   GGO_UNHINTED = $0100;
  178.   {$EXTERNALSYM GGO_UNHINTED}
  179.   TT_POLYGON_TYPE = 24;
  180.   {$EXTERNALSYM TT_POLYGON_TYPE}
  181.   TT_PRIM_LINE    = 1;
  182.   {$EXTERNALSYM TT_PRIM_LINE}
  183.   TT_PRIM_QSPLINE = 2;
  184.   {$EXTERNALSYM TT_PRIM_QSPLINE}
  185.   TT_PRIM_CSPLINE = 3;
  186.   {$EXTERNALSYM TT_PRIM_CSPLINE}
  187. type
  188.   PPointFx = ^TPointFx;
  189.   tagPOINTFX = record
  190.     x: FIXED;
  191.     y: FIXED;
  192.   end;
  193.   {$EXTERNALSYM tagPOINTFX}
  194.   POINTFX = tagPOINTFX;
  195.   {$EXTERNALSYM POINTFX}
  196.   LPPOINTFX = ^POINTFX;
  197.   {$EXTERNALSYM LPPOINTFX}
  198.   TPointFx = POINTFX;
  199.   PTtPolyCurve = ^TTtPolyCurve;
  200.   tagTTPOLYCURVE = record
  201.     wType: WORD;
  202.     cpfx: WORD;
  203.     apfx: array [0..0] of POINTFX;
  204.   end;
  205.   {$EXTERNALSYM tagTTPOLYCURVE}
  206.   TTPOLYCURVE = tagTTPOLYCURVE;
  207.   {$EXTERNALSYM TTPOLYCURVE}
  208.   LPTTPOLYCURVE = ^TTPOLYCURVE;
  209.   {$EXTERNALSYM LPTTPOLYCURVE}
  210.   TTtPolyCurve = TTPOLYCURVE;
  211.   PTtPolygonHeader = ^TTtPolygonHeader;
  212.   tagTTPOLYGONHEADER = record
  213.     cb: DWORD;
  214.     dwType: DWORD;
  215.     pfxStart: POINTFX;
  216.   end;
  217.   {$EXTERNALSYM tagTTPOLYGONHEADER}
  218.   TTPOLYGONHEADER = tagTTPOLYGONHEADER;
  219.   {$EXTERNALSYM TTPOLYGONHEADER}
  220.   LPTTPOLYGONHEADER = ^TTPOLYGONHEADER;
  221.   {$EXTERNALSYM LPTTPOLYGONHEADER}
  222.   TTtPolygonHeader = TTPOLYGONHEADER;
  223. const
  224.   GCP_DBCS       = $0001;
  225.   {$EXTERNALSYM GCP_DBCS}
  226.   GCP_REORDER    = $0002;
  227.   {$EXTERNALSYM GCP_REORDER}
  228.   GCP_USEKERNING = $0008;
  229.   {$EXTERNALSYM GCP_USEKERNING}
  230.   GCP_GLYPHSHAPE = $0010;
  231.   {$EXTERNALSYM GCP_GLYPHSHAPE}
  232.   GCP_LIGATE     = $0020;
  233.   {$EXTERNALSYM GCP_LIGATE}
  234. ////#define GCP_GLYPHINDEXING  0x0080
  235.   GCP_DIACRITIC = $0100;
  236.   {$EXTERNALSYM GCP_DIACRITIC}
  237.   GCP_KASHIDA   = $0400;
  238.   {$EXTERNALSYM GCP_KASHIDA}
  239.   GCP_ERROR     = $8000;
  240.   {$EXTERNALSYM GCP_ERROR}
  241.   FLI_MASK      = $103B;
  242.   {$EXTERNALSYM FLI_MASK}
  243.   GCP_JUSTIFY = $00010000;
  244.   {$EXTERNALSYM GCP_JUSTIFY}
  245. ////#define GCP_NODIACRITICS   0x00020000L
  246.   FLI_GLYPHS          = $00040000;
  247.   {$EXTERNALSYM FLI_GLYPHS}
  248.   GCP_CLASSIN         = $00080000;
  249.   {$EXTERNALSYM GCP_CLASSIN}
  250.   GCP_MAXEXTENT       = $00100000;
  251.   {$EXTERNALSYM GCP_MAXEXTENT}
  252.   GCP_JUSTIFYIN       = $00200000;
  253.   {$EXTERNALSYM GCP_JUSTIFYIN}
  254.   GCP_DISPLAYZWG      = $00400000;
  255.   {$EXTERNALSYM GCP_DISPLAYZWG}
  256.   GCP_SYMSWAPOFF      = $00800000;
  257.   {$EXTERNALSYM GCP_SYMSWAPOFF}
  258.   GCP_NUMERICOVERRIDE = $01000000;
  259.   {$EXTERNALSYM GCP_NUMERICOVERRIDE}
  260.   GCP_NEUTRALOVERRIDE = $02000000;
  261.   {$EXTERNALSYM GCP_NEUTRALOVERRIDE}
  262.   GCP_NUMERICSLATIN   = $04000000;
  263.   {$EXTERNALSYM GCP_NUMERICSLATIN}
  264.   GCP_NUMERICSLOCAL   = $08000000;
  265.   {$EXTERNALSYM GCP_NUMERICSLOCAL}
  266.   GCPCLASS_LATIN                  = 1;
  267.   {$EXTERNALSYM GCPCLASS_LATIN}
  268.   GCPCLASS_HEBREW                 = 2;
  269.   {$EXTERNALSYM GCPCLASS_HEBREW}
  270.   GCPCLASS_ARABIC                 = 2;
  271.   {$EXTERNALSYM GCPCLASS_ARABIC}
  272.   GCPCLASS_NEUTRAL                = 3;
  273.   {$EXTERNALSYM GCPCLASS_NEUTRAL}
  274.   GCPCLASS_LOCALNUMBER            = 4;
  275.   {$EXTERNALSYM GCPCLASS_LOCALNUMBER}
  276.   GCPCLASS_LATINNUMBER            = 5;
  277.   {$EXTERNALSYM GCPCLASS_LATINNUMBER}
  278.   GCPCLASS_LATINNUMERICTERMINATOR = 6;
  279.   {$EXTERNALSYM GCPCLASS_LATINNUMERICTERMINATOR}
  280.   GCPCLASS_LATINNUMERICSEPARATOR  = 7;
  281.   {$EXTERNALSYM GCPCLASS_LATINNUMERICSEPARATOR}
  282.   GCPCLASS_NUMERICSEPARATOR       = 8;
  283.   {$EXTERNALSYM GCPCLASS_NUMERICSEPARATOR}
  284.   GCPCLASS_PREBOUNDLTR            = $80;
  285.   {$EXTERNALSYM GCPCLASS_PREBOUNDLTR}
  286.   GCPCLASS_PREBOUNDRTL            = $40;
  287.   {$EXTERNALSYM GCPCLASS_PREBOUNDRTL}
  288.   GCPCLASS_POSTBOUNDLTR           = $20;
  289.   {$EXTERNALSYM GCPCLASS_POSTBOUNDLTR}
  290.   GCPCLASS_POSTBOUNDRTL           = $10;
  291.   {$EXTERNALSYM GCPCLASS_POSTBOUNDRTL}
  292.   GCPGLYPH_LINKBEFORE = $8000;
  293.   {$EXTERNALSYM GCPGLYPH_LINKBEFORE}
  294.   GCPGLYPH_LINKAFTER  = $4000;
  295.   {$EXTERNALSYM GCPGLYPH_LINKAFTER}
  296. type
  297.   PGcpResultsA = ^TGcpResultsA;
  298.   tagGCP_RESULTSA = record
  299.     lStructSize: DWORD;
  300.     lpOutString: LPSTR;
  301.     lpOrder: LPUINT;
  302.     lpDx: PINT;
  303.     lpCaretPos: PINT;
  304.     lpClass: LPSTR;
  305.     lpGlyphs: LPWSTR;
  306.     nGlyphs: UINT;
  307.     nMaxFit: Integer;
  308.   end;
  309.   {$EXTERNALSYM tagGCP_RESULTSA}
  310.   GCP_RESULTSA = tagGCP_RESULTSA;
  311.   {$EXTERNALSYM GCP_RESULTSA}
  312.   LPGCP_RESULTSA = ^GCP_RESULTSA;
  313.   {$EXTERNALSYM LPGCP_RESULTSA}
  314.   TGcpResultsA = GCP_RESULTSA;
  315.   PGcpResultsW = ^TGcpResultsW;
  316.   tagGCP_RESULTSW = record
  317.     lStructSize: DWORD;
  318.     lpOutString: LPWSTR;
  319.     lpOrder: LPUINT;
  320.     lpDx: PINT;
  321.     lpCaretPos: PINT;
  322.     lpClass: LPSTR;
  323.     lpGlyphs: LPWSTR;
  324.     nGlyphs: UINT;
  325.     nMaxFit: Integer;
  326.   end;
  327.   {$EXTERNALSYM tagGCP_RESULTSW}
  328.   GCP_RESULTSW = tagGCP_RESULTSW;
  329.   {$EXTERNALSYM GCP_RESULTSW}
  330.   LPGCP_RESULTSW = ^GCP_RESULTSW;
  331.   {$EXTERNALSYM LPGCP_RESULTSW}
  332.   TGcpResultsW = GCP_RESULTSW;
  333. {$IFDEF UNICODE}
  334.   GCP_RESULTS = GCP_RESULTSW;
  335.   {$EXTERNALSYM GCP_RESULTS}
  336.   LPGCP_RESULTS = LPGCP_RESULTSW;
  337.   {$EXTERNALSYM LPGCP_RESULTS}
  338.   TGcpResults = TGcpResultsW;
  339.   PGcpResults = PGcpResultsW;
  340. {$ELSE}
  341.   GCP_RESULTS = GCP_RESULTSA;
  342.   {$EXTERNALSYM GCP_RESULTS}
  343.   LPGCP_RESULTS = LPGCP_RESULTSA;
  344.   {$EXTERNALSYM LPGCP_RESULTS}
  345.   TGcpResults = TGcpResultsA;
  346.   PGcpResults = PGcpResultsA;
  347. {$ENDIF}
  348.   PRasterizerStatus = ^TRasterizerStatus;
  349.   _RASTERIZER_STATUS = record
  350.     nSize: short;
  351.     wFlags: short;
  352.     nLanguageID: short;
  353.   end;
  354.   {$EXTERNALSYM _RASTERIZER_STATUS}
  355.   RASTERIZER_STATUS = _RASTERIZER_STATUS;
  356.   {$EXTERNALSYM RASTERIZER_STATUS}
  357.   LPRASTERIZER_STATUS = ^RASTERIZER_STATUS;
  358.   {$EXTERNALSYM LPRASTERIZER_STATUS}
  359.   TRasterizerStatus = _RASTERIZER_STATUS;
  360. // bits defined in wFlags of RASTERIZER_STATUS
  361. const
  362.   TT_AVAILABLE = $0001;
  363.   {$EXTERNALSYM TT_AVAILABLE}
  364.   TT_ENABLED   = $0002;
  365.   {$EXTERNALSYM TT_ENABLED}
  366. // Pixel format descriptor
  367. type
  368.   PPixelFormatDescriptor = ^TPixelFormatDescriptor;
  369.   tagPIXELFORMATDESCRIPTOR = record
  370.     nSize: WORD;
  371.     nVersion: WORD;
  372.     dwFlags: DWORD;
  373.     iPixelType: BYTE;
  374.     cColorBits: BYTE;
  375.     cRedBits: BYTE;
  376.     cRedShift: BYTE;
  377.     cGreenBits: BYTE;
  378.     cGreenShift: BYTE;
  379.     cBlueBits: BYTE;
  380.     cBlueShift: BYTE;
  381.     cAlphaBits: BYTE;
  382.     cAlphaShift: BYTE;
  383.     cAccumBits: BYTE;
  384.     cAccumRedBits: BYTE;
  385.     cAccumGreenBits: BYTE;
  386.     cAccumBlueBits: BYTE;
  387.     cAccumAlphaBits: BYTE;
  388.     cDepthBits: BYTE;
  389.     cStencilBits: BYTE;
  390.     cAuxBuffers: BYTE;
  391.     iLayerType: BYTE;
  392.     bReserved: BYTE;
  393.     dwLayerMask: DWORD;
  394.     dwVisibleMask: DWORD;
  395.     dwDamageMask: DWORD;
  396.   end;
  397.   {$EXTERNALSYM tagPIXELFORMATDESCRIPTOR}
  398.   PIXELFORMATDESCRIPTOR = tagPIXELFORMATDESCRIPTOR;
  399.   {$EXTERNALSYM PIXELFORMATDESCRIPTOR}
  400.   LPPIXELFORMATDESCRIPTOR = ^PIXELFORMATDESCRIPTOR;
  401.   {$EXTERNALSYM LPPIXELFORMATDESCRIPTOR}
  402.   TPixelFormatDescriptor = PIXELFORMATDESCRIPTOR;
  403. // pixel types
  404. const
  405.   PFD_TYPE_RGBA       = 0;
  406.   {$EXTERNALSYM PFD_TYPE_RGBA}
  407.   PFD_TYPE_COLORINDEX = 1;
  408.   {$EXTERNALSYM PFD_TYPE_COLORINDEX}
  409. // layer types
  410.   PFD_MAIN_PLANE     = 0;
  411.   {$EXTERNALSYM PFD_MAIN_PLANE}
  412.   PFD_OVERLAY_PLANE  = 1;
  413.   {$EXTERNALSYM PFD_OVERLAY_PLANE}
  414.   PFD_UNDERLAY_PLANE = DWORD(-1);
  415.   {$EXTERNALSYM PFD_UNDERLAY_PLANE}
  416. // PIXELFORMATDESCRIPTOR flags
  417.   PFD_DOUBLEBUFFER        = $00000001;
  418.   {$EXTERNALSYM PFD_DOUBLEBUFFER}
  419.   PFD_STEREO              = $00000002;
  420.   {$EXTERNALSYM PFD_STEREO}
  421.   PFD_DRAW_TO_WINDOW      = $00000004;
  422.   {$EXTERNALSYM PFD_DRAW_TO_WINDOW}
  423.   PFD_DRAW_TO_BITMAP      = $00000008;
  424.   {$EXTERNALSYM PFD_DRAW_TO_BITMAP}
  425.   PFD_SUPPORT_GDI         = $00000010;
  426.   {$EXTERNALSYM PFD_SUPPORT_GDI}
  427.   PFD_SUPPORT_OPENGL      = $00000020;
  428.   {$EXTERNALSYM PFD_SUPPORT_OPENGL}
  429.   PFD_GENERIC_FORMAT      = $00000040;
  430.   {$EXTERNALSYM PFD_GENERIC_FORMAT}
  431.   PFD_NEED_PALETTE        = $00000080;
  432.   {$EXTERNALSYM PFD_NEED_PALETTE}
  433.   PFD_NEED_SYSTEM_PALETTE = $00000100;
  434.   {$EXTERNALSYM PFD_NEED_SYSTEM_PALETTE}
  435.   PFD_SWAP_EXCHANGE       = $00000200;
  436.   {$EXTERNALSYM PFD_SWAP_EXCHANGE}
  437.   PFD_SWAP_COPY           = $00000400;
  438.   {$EXTERNALSYM PFD_SWAP_COPY}
  439.   PFD_SWAP_LAYER_BUFFERS  = $00000800;
  440.   {$EXTERNALSYM PFD_SWAP_LAYER_BUFFERS}
  441.   PFD_GENERIC_ACCELERATED = $00001000;
  442.   {$EXTERNALSYM PFD_GENERIC_ACCELERATED}
  443.   PFD_SUPPORT_DIRECTDRAW  = $00002000;
  444.   {$EXTERNALSYM PFD_SUPPORT_DIRECTDRAW}
  445. // PIXELFORMATDESCRIPTOR flags for use in ChoosePixelFormat only
  446.   PFD_DEPTH_DONTCARE        = DWORD($20000000);
  447.   {$EXTERNALSYM PFD_DEPTH_DONTCARE}
  448.   PFD_DOUBLEBUFFER_DONTCARE = DWORD($40000000);
  449.   {$EXTERNALSYM PFD_DOUBLEBUFFER_DONTCARE}
  450.   PFD_STEREO_DONTCARE       = DWORD($80000000);
  451.   {$EXTERNALSYM PFD_STEREO_DONTCARE}
  452. type
  453.   OLDFONTENUMPROCA = function (lpelf: LPLOGFONTA; lpntm: LPTEXTMETRICA; FontType: DWORD; lParam: LPARAM): Integer; stdcall;
  454.   {$EXTERNALSYM OLDFONTENUMPROCA}
  455.   OLDFONTENUMPROCW = function (lpelf: LPLOGFONTW; lpntm: LPTEXTMETRICW; FontType: DWORD; lParam: LPARAM): Integer; stdcall;
  456.   {$EXTERNALSYM OLDFONTENUMPROCW}
  457.   {$IFDEF UNICODE}
  458.   OLDFONTENUMPROC = function (lpelf: LPLOGFONTW; lpntm: LPTEXTMETRICW; FontType: DWORD; lParam: LPARAM): Integer; stdcall;
  459.   {$EXTERNALSYM OLDFONTENUMPROC}
  460.   {$ELSE}
  461.   OLDFONTENUMPROC = function (lpelf: LPLOGFONTA; lpntm: LPTEXTMETRICA; FontType: DWORD; lParam: LPARAM): Integer; stdcall;
  462.   {$EXTERNALSYM OLDFONTENUMPROC}
  463.   {$ENDIF}
  464.   FONTENUMPROCA = OLDFONTENUMPROCA;
  465.   {$EXTERNALSYM FONTENUMPROCA}
  466.   FONTENUMPROCW = OLDFONTENUMPROCW;
  467.   {$EXTERNALSYM FONTENUMPROCW}
  468.   {$IFDEF UNICODE}
  469.   FONTENUMPROC = FONTENUMPROCW;
  470.   {$EXTERNALSYM FONTENUMPROC}
  471.   {$ELSE}
  472.   FONTENUMPROC = FONTENUMPROCA;
  473.   {$EXTERNALSYM FONTENUMPROC}
  474.   {$ENDIF}
  475.   GOBJENUMPROC = function(lpLogObject: LPVOID; lpData: LPARAM): Integer; stdcall;
  476.   {$EXTERNALSYM GOBJENUMPROC}
  477.   LINEDDAPROC = procedure (X, Y: Integer; lpData: LPARAM); stdcall;
  478.   {$EXTERNALSYM LINEDDAPROC}
  479. function AddFontResourceA(lpszFileName: LPCSTR): Integer; stdcall;
  480. {$EXTERNALSYM AddFontResourceA}
  481. function AddFontResourceW(lpszFileName: LPCWSTR): Integer; stdcall;
  482. {$EXTERNALSYM AddFontResourceW}
  483. {$IFDEF UNICODE}
  484. function AddFontResource(lpszFileName: LPCWSTR): Integer; stdcall;
  485. {$EXTERNALSYM AddFontResource}
  486. {$ELSE}
  487. function AddFontResource(lpszFileName: LPCSTR): Integer; stdcall;
  488. {$EXTERNALSYM AddFontResource}
  489. {$ENDIF}
  490. function AnimatePalette(hPal: HPALETTE; iStartIndex: UINT; cEntries: UINT; ppe: PPALETTEENTRY): BOOL; stdcall;
  491. {$EXTERNALSYM AnimatePalette}
  492. function Arc(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nxStartArc, nyStartArc, nXEndArc, nYEndArc: Integer): BOOL; stdcall;
  493. {$EXTERNALSYM Arc}
  494. function BitBlt(hdcDEst: HDC; nXDest, nYDest, nWidth, nHeight: Integer; hdcSrc: HDC; nXSrc, nYSrc: Integer; dwRop: DWORD): BOOL; stdcall;
  495. {$EXTERNALSYM BitBlt}
  496. function CancelDC(hdc: HDC): BOOL; stdcall;
  497. {$EXTERNALSYM CancelDC}
  498. function Chord(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2: Integer): BOOL; stdcall;
  499. {$EXTERNALSYM Chord}
  500. function ChoosePixelFormat(hdc: HDC; const ppfd: PIXELFORMATDESCRIPTOR): Integer; stdcall;
  501. {$EXTERNALSYM ChoosePixelFormat}
  502. function CloseMetaFile(hdc: HDC): HMETAFILE; stdcall;
  503. {$EXTERNALSYM CloseMetaFile}
  504. function CombineRgn(hrgnDest, hrgnSrc1, hrgnSrc2: HRGN; fnCombineMode: Integer): Integer; stdcall;
  505. {$EXTERNALSYM CombineRgn}
  506. function CopyMetaFileA(hmfSrc: HMETAFILE; lpszFile: LPCSTR): HMETAFILE; stdcall;
  507. {$EXTERNALSYM CopyMetaFileA}
  508. function CopyMetaFileW(hmfSrc: HMETAFILE; lpszFile: LPCWSTR): HMETAFILE; stdcall;
  509. {$EXTERNALSYM CopyMetaFileW}
  510. {$IFDEF UNICODE}
  511. function CopyMetaFile(hmfSrc: HMETAFILE; lpszFile: LPCWSTR): HMETAFILE; stdcall;
  512. {$EXTERNALSYM CopyMetaFile}
  513. {$ELSE}
  514. function CopyMetaFile(hmfSrc: HMETAFILE; lpszFile: LPCSTR): HMETAFILE; stdcall;
  515. {$EXTERNALSYM CopyMetaFile}
  516. {$ENDIF}
  517. function CreateBitmap(nWidth, nHeight: Integer; Cplanes, cBitsPerPel: UINT; lpvBits: PVOID): HBITMAP; stdcall;
  518. {$EXTERNALSYM CreateBitmap}
  519. function CreateBitmapIndirect(const lpbm: BITMAP): HBITMAP; stdcall;
  520. {$EXTERNALSYM CreateBitmapIndirect}
  521. function CreateBrushIndirect(const lplb: LOGBRUSH): HBRUSH; stdcall;
  522. {$EXTERNALSYM CreateBrushIndirect}
  523. function CreateCompatibleBitmap(hdc: HDC; nWidth, nHeight: Integer): HBITMAP; stdcall;
  524. {$EXTERNALSYM CreateCompatibleBitmap}
  525. function CreateDiscardableBitmap(hdc: HDC; nWidth, nHeight: Integer): HBITMAP; stdcall;
  526. {$EXTERNALSYM CreateDiscardableBitmap}
  527. function CreateCompatibleDC(hdc: HDC): HDC; stdcall;
  528. {$EXTERNALSYM CreateCompatibleDC}
  529. function CreateDCA(lpszDriver, lpszDevice, lpszOutput: LPCSTR; lpInitData: LPDEVMODEA): HDC; stdcall;
  530. {$EXTERNALSYM CreateDCA}
  531. function CreateDCW(lpszDriver, lpszDevice, lpszOutput: LPCWSTR; lpInitData: LPDEVMODEW): HDC; stdcall;
  532. {$EXTERNALSYM CreateDCW}
  533. {$IFDEF UNICODE}
  534. function CreateDC(lpszDriver, lpszDevice, lpszOutput: LPCWSTR; lpInitData: LPDEVMODEW): HDC; stdcall;
  535. {$EXTERNALSYM CreateDC}
  536. {$ELSE}
  537. function CreateDC(lpszDriver, lpszDevice, lpszOutput: LPCSTR; lpInitData: LPDEVMODEA): HDC; stdcall;
  538. {$EXTERNALSYM CreateDC}
  539. {$ENDIF}
  540. function CreateDIBitmap(hdc: HDC; const lpbmih: BITMAPINFOHEADER; fdwInit: DWORD; lpbInit: PVOID; const lpbmi: BITMAPINFO; fuUsage: UINT): HBITMAP; stdcall;
  541. {$EXTERNALSYM CreateDIBitmap}
  542. function CreateDIBPatternBrush(hglbDIBPacked: HGLOBAL; fuColorSpec: UINT): HBRUSH; stdcall;
  543. {$EXTERNALSYM CreateDIBPatternBrush}
  544. function CreateDIBPatternBrushPt(lpPackedDIB: PVOID; iUsage: UINT): HBRUSH; stdcall;
  545. {$EXTERNALSYM CreateDIBPatternBrushPt}
  546. function CreateEllipticRgn(nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): HRGN; stdcall;
  547. {$EXTERNALSYM CreateEllipticRgn}
  548. function CreateEllipticRgnIndirect(const lprc: RECT): HRGN; stdcall;
  549. {$EXTERNALSYM CreateEllipticRgnIndirect}
  550. function CreateFontIndirectA(const lplf: LOGFONTA): HFONT; stdcall;
  551. {$EXTERNALSYM CreateFontIndirectA}
  552. function CreateFontIndirectW(const lplf: LOGFONTW): HFONT; stdcall;
  553. {$EXTERNALSYM CreateFontIndirectW}
  554. {$IFDEF UNICODE}
  555. function CreateFontIndirect(const lplf: LOGFONTW): HFONT; stdcall;
  556. {$EXTERNALSYM CreateFontIndirect}
  557. {$ELSE}
  558. function CreateFontIndirect(const lplf: LOGFONTA): HFONT; stdcall;
  559. {$EXTERNALSYM CreateFontIndirect}
  560. {$ENDIF}
  561. function CreateFontA(nHeight, nWidth, nEscapement, nOrientation, fnWeight: Integer; fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily: DWORD; lpszFace: LPCSTR): HFONT; stdcall;
  562. {$EXTERNALSYM CreateFontA}
  563. function CreateFontW(nHeight, nWidth, nEscapement, nOrientation, fnWeight: Integer; fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily: DWORD; lpszFace: LPCWSTR): HFONT; stdcall;
  564. {$EXTERNALSYM CreateFontW}
  565. {$IFDEF UNICODE}
  566. function CreateFont(nHeight, nWidth, nEscapement, nOrientation, fnWeight: Integer; fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily: DWORD; lpszFace: LPCWSTR): HFONT; stdcall;
  567. {$EXTERNALSYM CreateFont}
  568. {$ELSE}
  569. function CreateFont(nHeight, nWidth, nEscapement, nOrientation, fnWeight: Integer; fdwItalic, fdwUnderline, fdwStrikeOut, fdwCharSet, fdwOutputPrecision, fdwClipPrecision, fdwQuality, fdwPitchAndFamily: DWORD; lpszFace: LPCSTR): HFONT; stdcall;
  570. {$EXTERNALSYM CreateFont}
  571. {$ENDIF}
  572. function CreateHatchBrush(fnStyle: Integer; clrref: COLORREF): HBRUSH; stdcall;
  573. {$EXTERNALSYM CreateHatchBrush}
  574. function CreateICA(lpszDriver, lpszDevice, lpszOutput: LPCSTR; lpdvmInit: LPDEVMODEA): HDC; stdcall;
  575. {$EXTERNALSYM CreateICA}
  576. function CreateICW(lpszDriver, lpszDevice, lpszOutput: LPCWSTR; lpdvmInit: LPDEVMODEW): HDC; stdcall;
  577. {$EXTERNALSYM CreateICW}
  578. {$IFDEF UNICODE}
  579. function CreateIC(lpszDriver, lpszDevice, lpszOutput: LPCWSTR; lpdvmInit: LPDEVMODEW): HDC; stdcall;
  580. {$EXTERNALSYM CreateIC}
  581. {$ELSE}
  582. function CreateIC(lpszDriver, lpszDevice, lpszOutput: LPCSTR; lpdvmInit: LPDEVMODEA): HDC; stdcall;
  583. {$EXTERNALSYM CreateIC}
  584. {$ENDIF}
  585. function CreateMetaFileA(lpszFile: LPCSTR): HDC; stdcall;
  586. {$EXTERNALSYM CreateMetaFileA}
  587. function CreateMetaFileW(lpszFile: LPCWSTR): HDC; stdcall;
  588. {$EXTERNALSYM CreateMetaFileW}
  589. {$IFDEF UNICODE}
  590. function CreateMetaFile(lpszFile: LPCWSTR): HDC; stdcall;
  591. {$EXTERNALSYM CreateMetaFile}
  592. {$ELSE}
  593. function CreateMetaFile(lpszFile: LPCSTR): HDC; stdcall;
  594. {$EXTERNALSYM CreateMetaFile}
  595. {$ENDIF}
  596. function CreatePalette(const lplgpl: LOGPALETTE): HPALETTE; stdcall;
  597. {$EXTERNALSYM CreatePalette}
  598. function CreatePen(fnPenStyle, nWidth: Integer; crColor: COLORREF): HPEN; stdcall;
  599. {$EXTERNALSYM CreatePen}
  600. function CreatePenIndirect(const lplgpn: LOGPEN): HPEN; stdcall;
  601. {$EXTERNALSYM CreatePenIndirect}
  602. function CreatePolyPolygonRgn(lppt: LPPOINT; lpPolyCounts: LPINT; nCount, fnPolyFillMode: Integer): HRGN; stdcall;
  603. {$EXTERNALSYM CreatePolyPolygonRgn}
  604. function CreatePatternBrush(hbmp: HBITMAP): HBRUSH; stdcall;
  605. {$EXTERNALSYM CreatePatternBrush}
  606. function CreateRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): HRGN; stdcall;
  607. {$EXTERNALSYM CreateRectRgn}
  608. function CreateRectRgnIndirect(const lprc: RECT): HRGN; stdcall;
  609. {$EXTERNALSYM CreateRectRgnIndirect}
  610. function CreateRoundRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse: Integer): HRGN; stdcall;
  611. {$EXTERNALSYM CreateRoundRectRgn}
  612. function CreateScalableFontResourceA(fdwHidden: DWORD; lpszFontRes, lpszFontFile, lpszCurrentPath: LPCSTR): BOOL; stdcall;
  613. {$EXTERNALSYM CreateScalableFontResourceA}
  614. function CreateScalableFontResourceW(fdwHidden: DWORD; lpszFontRes, lpszFontFile, lpszCurrentPath: LPCWSTR): BOOL; stdcall;
  615. {$EXTERNALSYM CreateScalableFontResourceW}
  616. {$IFDEF UNICODE}
  617. function CreateScalableFontResource(fdwHidden: DWORD; lpszFontRes, lpszFontFile, lpszCurrentPath: LPCWSTR): BOOL; stdcall;
  618. {$EXTERNALSYM CreateScalableFontResource}
  619. {$ELSE}
  620. function CreateScalableFontResource(fdwHidden: DWORD; lpszFontRes, lpszFontFile, lpszCurrentPath: LPCSTR): BOOL; stdcall;
  621. {$EXTERNALSYM CreateScalableFontResource}
  622. {$ENDIF}
  623. function CreateSolidBrush(crColor: COLORREF): HBRUSH; stdcall;
  624. {$EXTERNALSYM CreateSolidBrush}
  625. function DeleteDC(hdc: HDC): BOOL; stdcall;
  626. {$EXTERNALSYM DeleteDC}
  627. function DeleteMetaFile(hmf: HMETAFILE): BOOL; stdcall;
  628. {$EXTERNALSYM DeleteMetaFile}
  629. function DeleteObject(hObject: HGDIOBJ): BOOL; stdcall;
  630. {$EXTERNALSYM DeleteObject}
  631. function DescribePixelFormat(hdc: HDC; iPixelFormat: Integer; nBytes: UINT; ppfd: LPPIXELFORMATDESCRIPTOR): Integer; stdcall;
  632. {$EXTERNALSYM DescribePixelFormat}
  633. // mode selections for the device mode function
  634. const
  635.   DM_UPDATE = 1;
  636.   {$EXTERNALSYM DM_UPDATE}
  637.   DM_COPY   = 2;
  638.   {$EXTERNALSYM DM_COPY}
  639.   DM_PROMPT = 4;
  640.   {$EXTERNALSYM DM_PROMPT}
  641.   DM_MODIFY = 8;
  642.   {$EXTERNALSYM DM_MODIFY}
  643.   DM_IN_BUFFER   = DM_MODIFY;
  644.   {$EXTERNALSYM DM_IN_BUFFER}
  645.   DM_IN_PROMPT   = DM_PROMPT;
  646.   {$EXTERNALSYM DM_IN_PROMPT}
  647.   DM_OUT_BUFFER  = DM_COPY;
  648.   {$EXTERNALSYM DM_OUT_BUFFER}
  649.   DM_OUT_DEFAULT = DM_UPDATE;
  650.   {$EXTERNALSYM DM_OUT_DEFAULT}
  651. // device capabilities indices
  652.   DC_FIELDS            = 1;
  653.   {$EXTERNALSYM DC_FIELDS}
  654.   DC_PAPERS            = 2;
  655.   {$EXTERNALSYM DC_PAPERS}
  656.   DC_PAPERSIZE         = 3;
  657.   {$EXTERNALSYM DC_PAPERSIZE}
  658.   DC_MINEXTENT         = 4;
  659.   {$EXTERNALSYM DC_MINEXTENT}
  660.   DC_MAXEXTENT         = 5;
  661.   {$EXTERNALSYM DC_MAXEXTENT}
  662.   DC_BINS              = 6;
  663.   {$EXTERNALSYM DC_BINS}
  664.   DC_DUPLEX            = 7;
  665.   {$EXTERNALSYM DC_DUPLEX}
  666.   DC_SIZE              = 8;
  667.   {$EXTERNALSYM DC_SIZE}
  668.   DC_EXTRA             = 9;
  669.   {$EXTERNALSYM DC_EXTRA}
  670.   DC_VERSION           = 10;
  671.   {$EXTERNALSYM DC_VERSION}
  672.   DC_DRIVER            = 11;
  673.   {$EXTERNALSYM DC_DRIVER}
  674.   DC_BINNAMES          = 12;
  675.   {$EXTERNALSYM DC_BINNAMES}
  676.   DC_ENUMRESOLUTIONS   = 13;
  677.   {$EXTERNALSYM DC_ENUMRESOLUTIONS}
  678.   DC_FILEDEPENDENCIES  = 14;
  679.   {$EXTERNALSYM DC_FILEDEPENDENCIES}
  680.   DC_TRUETYPE          = 15;
  681.   {$EXTERNALSYM DC_TRUETYPE}
  682.   DC_PAPERNAMES        = 16;
  683.   {$EXTERNALSYM DC_PAPERNAMES}
  684.   DC_ORIENTATION       = 17;
  685.   {$EXTERNALSYM DC_ORIENTATION}
  686.   DC_COPIES            = 18;
  687.   {$EXTERNALSYM DC_COPIES}
  688.   DC_BINADJUST         = 19;
  689.   {$EXTERNALSYM DC_BINADJUST}
  690.   DC_EMF_COMPLIANT     = 20;
  691.   {$EXTERNALSYM DC_EMF_COMPLIANT}
  692.   DC_DATATYPE_PRODUCED = 21;
  693.   {$EXTERNALSYM DC_DATATYPE_PRODUCED}
  694.   DC_COLLATE           = 22;
  695.   {$EXTERNALSYM DC_COLLATE}
  696.   DC_MANUFACTURER      = 23;
  697.   {$EXTERNALSYM DC_MANUFACTURER}
  698.   DC_MODEL             = 24;
  699.   {$EXTERNALSYM DC_MODEL}
  700.   DC_PERSONALITY    = 25;
  701.   {$EXTERNALSYM DC_PERSONALITY}
  702.   DC_PRINTRATE      = 26;
  703.   {$EXTERNALSYM DC_PRINTRATE}
  704.   DC_PRINTRATEUNIT  = 27;
  705.   {$EXTERNALSYM DC_PRINTRATEUNIT}
  706.   PRINTRATEUNIT_PPM = 1;
  707.   {$EXTERNALSYM PRINTRATEUNIT_PPM}
  708.   PRINTRATEUNIT_CPS = 2;
  709.   {$EXTERNALSYM PRINTRATEUNIT_CPS}
  710.   PRINTRATEUNIT_LPM = 3;
  711.   {$EXTERNALSYM PRINTRATEUNIT_LPM}
  712.   PRINTRATEUNIT_IPM = 4;
  713.   {$EXTERNALSYM PRINTRATEUNIT_IPM}
  714.   DC_PRINTERMEM     = 28;
  715.   {$EXTERNALSYM DC_PRINTERMEM}
  716.   DC_MEDIAREADY     = 29;
  717.   {$EXTERNALSYM DC_MEDIAREADY}
  718.   DC_STAPLE         = 30;
  719.   {$EXTERNALSYM DC_STAPLE}
  720.   DC_PRINTRATEPPM   = 31;
  721.   {$EXTERNALSYM DC_PRINTRATEPPM}
  722.   DC_COLORDEVICE    = 32;
  723.   {$EXTERNALSYM DC_COLORDEVICE}
  724.   DC_NUP            = 33;
  725.   {$EXTERNALSYM DC_NUP}
  726.   DC_MEDIATYPENAMES = 34;
  727.   {$EXTERNALSYM DC_MEDIATYPENAMES}
  728.   DC_MEDIATYPES     = 35;
  729.   {$EXTERNALSYM DC_MEDIATYPES}
  730. // bit fields of the return value (DWORD) for DC_TRUETYPE
  731.   DCTT_BITMAP           = $0000001;
  732.   {$EXTERNALSYM DCTT_BITMAP}
  733.   DCTT_DOWNLOAD         = $0000002;
  734.   {$EXTERNALSYM DCTT_DOWNLOAD}
  735.   DCTT_SUBDEV           = $0000004;
  736.   {$EXTERNALSYM DCTT_SUBDEV}
  737.   DCTT_DOWNLOAD_OUTLINE = $0000008;
  738.   {$EXTERNALSYM DCTT_DOWNLOAD_OUTLINE}
  739. // return values for DC_BINADJUST
  740.   DCBA_FACEUPNONE     = $0000;
  741.   {$EXTERNALSYM DCBA_FACEUPNONE}
  742.   DCBA_FACEUPCENTER   = $0001;
  743.   {$EXTERNALSYM DCBA_FACEUPCENTER}
  744.   DCBA_FACEUPLEFT     = $0002;
  745.   {$EXTERNALSYM DCBA_FACEUPLEFT}
  746.   DCBA_FACEUPRIGHT    = $0003;
  747.   {$EXTERNALSYM DCBA_FACEUPRIGHT}
  748.   DCBA_FACEDOWNNONE   = $0100;
  749.   {$EXTERNALSYM DCBA_FACEDOWNNONE}
  750.   DCBA_FACEDOWNCENTER = $0101;
  751.   {$EXTERNALSYM DCBA_FACEDOWNCENTER}
  752.   DCBA_FACEDOWNLEFT   = $0102;
  753.   {$EXTERNALSYM DCBA_FACEDOWNLEFT}
  754.   DCBA_FACEDOWNRIGHT  = $0103;
  755.   {$EXTERNALSYM DCBA_FACEDOWNRIGHT}
  756. function DeviceCapabilitiesA(pDevice, pPort: LPCSTR; fwCapability: WORD; pOutput: LPSTR; pDevMode: LPDEVMODEA): Integer; stdcall;
  757. {$EXTERNALSYM DeviceCapabilitiesA}
  758. function DeviceCapabilitiesW(pDevice, pPort: LPCWSTR; fwCapability: WORD; pOutput: LPWSTR; pDevMode: LPDEVMODEW): Integer; stdcall;
  759. {$EXTERNALSYM DeviceCapabilitiesW}
  760. {$IFDEF UNICODE}
  761. function DeviceCapabilities(pDevice, pPort: LPCWSTR; fwCapability: WORD; pOutput: LPWSTR; pDevMode: LPDEVMODEW): Integer; stdcall;
  762. {$EXTERNALSYM DeviceCapabilities}
  763. {$ELSE}
  764. function DeviceCapabilities(pDevice, pPort: LPCSTR; fwCapability: WORD; pOutput: LPSTR; pDevMode: LPDEVMODEA): Integer; stdcall;
  765. {$EXTERNALSYM DeviceCapabilities}
  766. {$ENDIF}
  767. function DrawEscape(hdc: HDC; nEscape, cbInput: Integer; lpszInData: LPCSTR): Integer; stdcall;
  768. {$EXTERNALSYM DrawEscape}
  769. function Ellipse(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): BOOL; stdcall;
  770. {$EXTERNALSYM Ellipse}
  771. function EnumFontFamiliesExA(hdc: HDC; lpLogFont: LPLOGFONTA; lpEnumFontFamExProc: FONTENUMPROCA; lParam: LPARAM; dwFlags: DWORD): Integer; stdcall;
  772. {$EXTERNALSYM EnumFontFamiliesExA}
  773. function EnumFontFamiliesExW(hdc: HDC; lpLogFont: LPLOGFONTW; lpEnumFontFamExProc: FONTENUMPROCW; lParam: LPARAM; dwFlags: DWORD): Integer; stdcall;
  774. {$EXTERNALSYM EnumFontFamiliesExW}
  775. {$IFDEF UNICODE}
  776. function EnumFontFamiliesEx(hdc: HDC; lpLogFont: LPLOGFONTW; lpEnumFontFamExProc: FONTENUMPROCW; lParam: LPARAM; dwFlags: DWORD): Integer; stdcall;
  777. {$EXTERNALSYM EnumFontFamiliesEx}
  778. {$ELSE}
  779. function EnumFontFamiliesEx(hdc: HDC; lpLogFont: LPLOGFONTA; lpEnumFontFamExProc: FONTENUMPROCA; lParam: LPARAM; dwFlags: DWORD): Integer; stdcall;
  780. {$EXTERNALSYM EnumFontFamiliesEx}
  781. {$ENDIF}
  782. function EnumFontFamiliesA(hdc: HDC; lpszFamily: LPCSTR; lpEnumFontFamProc: FONTENUMPROCA; lParam: LPARAM): Integer; stdcall;
  783. {$EXTERNALSYM EnumFontFamiliesA}
  784. function EnumFontFamiliesW(hdc: HDC; lpszFamily: LPCWSTR; lpEnumFontFamProc: FONTENUMPROCW; lParam: LPARAM): Integer; stdcall;
  785. {$EXTERNALSYM EnumFontFamiliesW}
  786. {$IFDEF UNICODE}
  787. function EnumFontFamilies(hdc: HDC; lpszFamily: LPCWSTR; lpEnumFontFamProc: FONTENUMPROCW; lParam: LPARAM): Integer; stdcall;
  788. {$EXTERNALSYM EnumFontFamilies}
  789. {$ELSE}
  790. function EnumFontFamilies(hdc: HDC; lpszFamily: LPCSTR; lpEnumFontFamProc: FONTENUMPROCA; lParam: LPARAM): Integer; stdcall;
  791. {$EXTERNALSYM EnumFontFamilies}
  792. {$ENDIF}
  793. function EnumFontsA(hdc: HDC; lpFaceName: LPCSTR; lpFontFunc: FONTENUMPROCA; lParam: LPARAM): Integer; stdcall;
  794. {$EXTERNALSYM EnumFontsA}
  795. function EnumFontsW(hdc: HDC; lpFaceName: LPCWSTR; lpFontFunc: FONTENUMPROCW; lParam: LPARAM): Integer; stdcall;
  796. {$EXTERNALSYM EnumFontsW}
  797. {$IFDEF UNICODE}
  798. function EnumFonts(hdc: HDC; lpFaceName: LPCWSTR; lpFontFunc: FONTENUMPROCW; lParam: LPARAM): Integer; stdcall;
  799. {$EXTERNALSYM EnumFonts}
  800. {$ELSE}
  801. function EnumFonts(hdc: HDC; lpFaceName: LPCSTR; lpFontFunc: FONTENUMPROCA; lParam: LPARAM): Integer; stdcall;
  802. {$EXTERNALSYM EnumFonts}
  803. {$ENDIF}
  804. function EnumObjects(hdc: HDC; mObjectType: Integer; lpObjectFunc: GOBJENUMPROC; lParam: LPARAM): Integer; stdcall;
  805. {$EXTERNALSYM EnumObjects}
  806. function EqualRgn(hSrcRgn1, hSrcRgn2: HRGN): BOOL; stdcall;
  807. {$EXTERNALSYM EqualRgn}
  808. function Escape(hdc: HDC; nEscape, cbInput: Integer; lpvInData: LPCSTR; lpvOutData: LPVOID): Integer; stdcall;
  809. {$EXTERNALSYM Escape}
  810. function ExtEscape(hdc: HDC; nEscape, cbInput: Integer; lpszInData: LPCSTR; cbOutput: Integer; lpszOutData: LPSTR): Integer; stdcall;
  811. {$EXTERNALSYM ExtEscape}
  812. function ExcludeClipRect(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): Integer; stdcall;
  813. {$EXTERNALSYM ExcludeClipRect}
  814. function ExtCreateRegion(lpXForm: LPXFORM; nCount: DWORD; lpRgnData: LPRGNDATA): HRGN; stdcall;
  815. {$EXTERNALSYM ExtCreateRegion}
  816. function ExtFloodFill(hdc: HDC; nXStart, nYStart: Integer; crColor: COLORREF; fuFillType: UINT): BOOL; stdcall;
  817. {$EXTERNALSYM ExtFloodFill}
  818. function FillRgn(hdc: HDC; hrgn: HRGN; hbr: HBRUSH): BOOL; stdcall;
  819. {$EXTERNALSYM FillRgn}
  820. function FloodFill(hdc: HDC; nXStart, nYStart: Integer; crFill: COLORREF): BOOL; stdcall;
  821. {$EXTERNALSYM FloodFill}
  822. function FrameRgn(hdc: HDC; hrgn: HRGN; hbr: HBRUSH; nWidth, nHeight: Integer): BOOL; stdcall;
  823. {$EXTERNALSYM FrameRgn}
  824. function GetROP2(hdc: HDC): Integer; stdcall;
  825. {$EXTERNALSYM GetROP2}
  826. function GetAspectRatioFilterEx(hdc: HDC; var lpAspectRatio: TSize): BOOL; stdcall;
  827. {$EXTERNALSYM GetAspectRatioFilterEx}
  828. function GetBkColor(hdc: HDC): COLORREF; stdcall;
  829. {$EXTERNALSYM GetBkColor}
  830. function GetDCBrushColor(hdc: HDC): COLORREF; stdcall;
  831. {$EXTERNALSYM GetDCBrushColor}
  832. function GetDCPenColor(hdc: HDC): COLORREF; stdcall;
  833. {$EXTERNALSYM GetDCPenColor}
  834. function GetBkMode(hdc: HDC): Integer; stdcall;
  835. {$EXTERNALSYM GetBkMode}
  836. function GetBitmapBits(hbmp: HBITMAP; cbBuffer: LONG; lpvBits: LPVOID): LONG; stdcall;
  837. {$EXTERNALSYM GetBitmapBits}
  838. function GetBitmapDimensionEx(hBitmap: HBITMAP; var lpDimension: TSize): BOOL; stdcall;
  839. {$EXTERNALSYM GetBitmapDimensionEx}
  840. function GetBoundsRect(hdc: HDC; var lprcBounds: RECT; flags: UINT): UINT; stdcall;
  841. {$EXTERNALSYM GetBoundsRect}
  842. function GetBrushOrgEx(hdc: HDC; var lppt: POINT): BOOL; stdcall;
  843. {$EXTERNALSYM GetBrushOrgEx}
  844. function GetCharWidthA(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
  845. {$EXTERNALSYM GetCharWidthA}
  846. function GetCharWidthW(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
  847. {$EXTERNALSYM GetCharWidthW}
  848. {$IFDEF UNICODE}
  849. function GetCharWidth(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
  850. {$EXTERNALSYM GetCharWidth}
  851. {$ELSE}
  852. function GetCharWidth(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
  853. {$EXTERNALSYM GetCharWidth}
  854. {$ENDIF}
  855. function GetCharWidth32A(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
  856. {$EXTERNALSYM GetCharWidth32A}
  857. function GetCharWidth32W(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
  858. {$EXTERNALSYM GetCharWidth32W}
  859. {$IFDEF UNICODE}
  860. function GetCharWidth32(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
  861. {$EXTERNALSYM GetCharWidth32}
  862. {$ELSE}
  863. function GetCharWidth32(hdc: HDC; iFirstChar, iLastChar: UINT; lpBuffer: LPINT): BOOL; stdcall;
  864. {$EXTERNALSYM GetCharWidth32}
  865. {$ENDIF}
  866. function GetCharWidthFloatA(hdc: HDC; iFirstChar, iLastChar: UINT; pxBuffer: PFLOAT): BOOL; stdcall;
  867. {$EXTERNALSYM GetCharWidthFloatA}
  868. function GetCharWidthFloatW(hdc: HDC; iFirstChar, iLastChar: UINT; pxBuffer: PFLOAT): BOOL; stdcall;
  869. {$EXTERNALSYM GetCharWidthFloatW}
  870. {$IFDEF UNICODE}
  871. function GetCharWidthFloat(hdc: HDC; iFirstChar, iLastChar: UINT; pxBuffer: PFLOAT): BOOL; stdcall;
  872. {$EXTERNALSYM GetCharWidthFloat}
  873. {$ELSE}
  874. function GetCharWidthFloat(hdc: HDC; iFirstChar, iLastChar: UINT; pxBuffer: PFLOAT): BOOL; stdcall;
  875. {$EXTERNALSYM GetCharWidthFloat}
  876. {$ENDIF}
  877. function GetCharABCWidthsA(hdc: HDC; uFirstChar, uLastChar: UINT; lpAbc: LPABC): BOOL; stdcall;
  878. {$EXTERNALSYM GetCharABCWidthsA}
  879. function GetCharABCWidthsW(hdc: HDC; uFirstChar, uLastChar: UINT; lpAbc: LPABC): BOOL; stdcall;
  880. {$EXTERNALSYM GetCharABCWidthsW}
  881. {$IFDEF UNICODE}
  882. function GetCharABCWidths(hdc: HDC; uFirstChar, uLastChar: UINT; lpAbc: LPABC): BOOL; stdcall;
  883. {$EXTERNALSYM GetCharABCWidths}
  884. {$ELSE}
  885. function GetCharABCWidths(hdc: HDC; uFirstChar, uLastChar: UINT; lpAbc: LPABC): BOOL; stdcall;
  886. {$EXTERNALSYM GetCharABCWidths}
  887. {$ENDIF}
  888. function GetCharABCWidthsFloatA(hdc: HDC; iFirstChar, iLastChar: UINT; lpAbcF: LPABCFLOAT): BOOL; stdcall;
  889. {$EXTERNALSYM GetCharABCWidthsFloatA}
  890. function GetCharABCWidthsFloatW(hdc: HDC; iFirstChar, iLastChar: UINT; lpAbcF: LPABCFLOAT): BOOL; stdcall;
  891. {$EXTERNALSYM GetCharABCWidthsFloatW}
  892. {$IFDEF UNICODE}
  893. function GetCharABCWidthsFloat(hdc: HDC; iFirstChar, iLastChar: UINT; lpAbcF: LPABCFLOAT): BOOL; stdcall;
  894. {$EXTERNALSYM GetCharABCWidthsFloat}
  895. {$ELSE}
  896. function GetCharABCWidthsFloat(hdc: HDC; iFirstChar, iLastChar: UINT; lpAbcF: LPABCFLOAT): BOOL; stdcall;
  897. {$EXTERNALSYM GetCharABCWidthsFloat}
  898. {$ENDIF}
  899. function GetClipBox(hdc: HDC; var lprc: RECT): Integer; stdcall;
  900. {$EXTERNALSYM GetClipBox}
  901. function GetClipRgn(hdc: HDC; hrgn: HRGN): Integer; stdcall;
  902. {$EXTERNALSYM GetClipRgn}
  903. function GetMetaRgn(hdc: HDC; hrgn: HRGN): Integer; stdcall;
  904. {$EXTERNALSYM GetMetaRgn}
  905. function GetCurrentObject(hdc: HDC; uObjectType: UINT): HGDIOBJ; stdcall;
  906. {$EXTERNALSYM GetCurrentObject}
  907. function GetCurrentPositionEx(hdc: HDC; var lpPoint: POINT): BOOL; stdcall;
  908. {$EXTERNALSYM GetCurrentPositionEx}
  909. function GetDeviceCaps(hdc: HDC; nIndex: Integer): Integer; stdcall;
  910. {$EXTERNALSYM GetDeviceCaps}
  911. function GetDIBits(hdc: HDC; hbmp: HBITMAP; uStartScan, cScanLines: UINT; lpvBits: LPVOID; var lpbi: BITMAPINFO; uUsage: UINT): Integer; stdcall;
  912. {$EXTERNALSYM GetDIBits}
  913. function GetFontData(hdc: HDC; dwTable, dwOffset: DWORD; lpvBuffer: LPVOID; cbData: DWORD): DWORD; stdcall;
  914. {$EXTERNALSYM GetFontData}
  915. function GetGlyphOutlineA(hdc: HDC; uChar, uFormat: UINT; var lpgm: GLYPHMETRICS; cbBuffer: DWORD; lpvBuffer: LPVOID; const lpMat2: MAT2): DWORD; stdcall;
  916. {$EXTERNALSYM GetGlyphOutlineA}
  917. function GetGlyphOutlineW(hdc: HDC; uChar, uFormat: UINT; var lpgm: GLYPHMETRICS; cbBuffer: DWORD; lpvBuffer: LPVOID; const lpMat2: MAT2): DWORD; stdcall;
  918. {$EXTERNALSYM GetGlyphOutlineW}
  919. {$IFDEF UNICODE}
  920. function GetGlyphOutline(hdc: HDC; uChar, uFormat: UINT; var lpgm: GLYPHMETRICS; cbBuffer: DWORD; lpvBuffer: LPVOID; const lpMat2: MAT2): DWORD; stdcall;
  921. {$EXTERNALSYM GetGlyphOutline}
  922. {$ELSE}
  923. function GetGlyphOutline(hdc: HDC; uChar, uFormat: UINT; var lpgm: GLYPHMETRICS; cbBuffer: DWORD; lpvBuffer: LPVOID; const lpMat2: MAT2): DWORD; stdcall;
  924. {$EXTERNALSYM GetGlyphOutline}
  925. {$ENDIF}
  926. function GetGraphicsMode(hdc: HDC): Integer; stdcall;
  927. {$EXTERNALSYM GetGraphicsMode}
  928. function GetMapMode(hdc: HDC): Integer; stdcall;
  929. {$EXTERNALSYM GetMapMode}
  930. function GetMetaFileBitsEx(hmf: HMETAFILE; nSize: UINT; lpvData: LPVOID): UINT; stdcall;
  931. {$EXTERNALSYM GetMetaFileBitsEx}
  932. function GetMetaFileA(lpszMetaFile: LPCSTR): HMETAFILE; stdcall;
  933. {$EXTERNALSYM GetMetaFileA}
  934. function GetMetaFileW(lpszMetaFile: LPCWSTR): HMETAFILE; stdcall;
  935. {$EXTERNALSYM GetMetaFileW}
  936. {$IFDEF UNICODE}
  937. function GetMetaFile(lpszMetaFile: LPCWSTR): HMETAFILE; stdcall;
  938. {$EXTERNALSYM GetMetaFile}
  939. {$ELSE}
  940. function GetMetaFile(lpszMetaFile: LPCSTR): HMETAFILE; stdcall;
  941. {$EXTERNALSYM GetMetaFile}
  942. {$ENDIF}
  943. function GetNearestColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
  944. {$EXTERNALSYM GetNearestColor}
  945. function GetNearestPaletteIndex(hPal: HPALETTE; crColor: COLORREF): UINT; stdcall;
  946. {$EXTERNALSYM GetNearestPaletteIndex}
  947. function GetObjectType(h: HGDIOBJ): DWORD; stdcall;
  948. {$EXTERNALSYM GetObjectType}
  949. function GetOutlineTextMetricsA(hdc: HDC; cbData: UINT; lpOTM: LPOUTLINETEXTMETRICA): UINT; stdcall;
  950. {$EXTERNALSYM GetOutlineTextMetricsA}
  951. function GetOutlineTextMetricsW(hdc: HDC; cbData: UINT; lpOTM: LPOUTLINETEXTMETRICW): UINT; stdcall;
  952. {$EXTERNALSYM GetOutlineTextMetricsW}
  953. {$IFDEF UNICODE}
  954. function GetOutlineTextMetrics(hdc: HDC; cbData: UINT; lpOTM: LPOUTLINETEXTMETRICW): UINT; stdcall;
  955. {$EXTERNALSYM GetOutlineTextMetrics}
  956. {$ELSE}
  957. function GetOutlineTextMetrics(hdc: HDC; cbData: UINT; lpOTM: LPOUTLINETEXTMETRICA): UINT; stdcall;
  958. {$EXTERNALSYM GetOutlineTextMetrics}
  959. {$ENDIF}
  960. function GetPaletteEntries(hPal: HPALETTE; iStartIndex, nEntries: UINT; lppe: LPPALETTEENTRY): UINT; stdcall;
  961. {$EXTERNALSYM GetPaletteEntries}
  962. function GetPixel(hdc: HDC; nXPos, nYPos: Integer): COLORREF; stdcall;
  963. {$EXTERNALSYM GetPixel}
  964. function GetPixelFormat(hdc: HDC): Integer; stdcall;
  965. {$EXTERNALSYM GetPixelFormat}
  966. function GetPolyFillMode(hdc: HDC): Integer; stdcall;
  967. {$EXTERNALSYM GetPolyFillMode}
  968. function GetRasterizerCaps(var lprs: RASTERIZER_STATUS; cb: UINT): BOOL; stdcall;
  969. {$EXTERNALSYM GetRasterizerCaps}
  970. function GetRandomRgn(hdc: HDC; hrgn: HRGN; iNum: Integer): Integer; stdcall;
  971. {$EXTERNALSYM GetRandomRgn}
  972. function GetRegionData(hrgn: HRGN; dwCount: DWORD; lpRgnData: LPRGNDATA): DWORD; stdcall;
  973. {$EXTERNALSYM GetRegionData}
  974. function GetRgnBox(hrgn: HRGN; var lprc: RECT): Integer; stdcall;
  975. {$EXTERNALSYM GetRgnBox}
  976. function GetStockObject(fnObject: Integer): HGDIOBJ; stdcall;
  977. {$EXTERNALSYM GetStockObject}
  978. function GetStretchBltMode(hdc: HDC): Integer; stdcall;
  979. {$EXTERNALSYM GetStretchBltMode}
  980. function GetSystemPaletteEntries(hdc: HDC; iStartIndex, nEntries: UINT; lppe: LPPALETTEENTRY): UINT; stdcall;
  981. {$EXTERNALSYM GetSystemPaletteEntries}
  982. function GetSystemPaletteUse(hdc: HDC): UINT; stdcall;
  983. {$EXTERNALSYM GetSystemPaletteUse}
  984. function GetTextCharacterExtra(hdc: HDC): Integer; stdcall;
  985. {$EXTERNALSYM GetTextCharacterExtra}
  986. function GetTextAlign(hdc: HDC): UINT; stdcall;
  987. {$EXTERNALSYM GetTextAlign}
  988. function GetTextColor(hdc: HDC): COLORREF; stdcall;
  989. {$EXTERNALSYM GetTextColor}
  990. function GetTextExtentPointA(hdc: HDC; lpString: LPCSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
  991. {$EXTERNALSYM GetTextExtentPointA}
  992. function GetTextExtentPointW(hdc: HDC; lpString: LPCWSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
  993. {$EXTERNALSYM GetTextExtentPointW}
  994. {$IFDEF UNICODE}
  995. function GetTextExtentPoint(hdc: HDC; lpString: LPCWSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
  996. {$EXTERNALSYM GetTextExtentPoint}
  997. {$ELSE}
  998. function GetTextExtentPoint(hdc: HDC; lpString: LPCSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
  999. {$EXTERNALSYM GetTextExtentPoint}
  1000. {$ENDIF}
  1001. function GetTextExtentPoint32A(hdc: HDC; lpString: LPCSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
  1002. {$EXTERNALSYM GetTextExtentPoint32A}
  1003. function GetTextExtentPoint32W(hdc: HDC; lpString: LPCWSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
  1004. {$EXTERNALSYM GetTextExtentPoint32W}
  1005. {$IFDEF UNICODE}
  1006. function GetTextExtentPoint32(hdc: HDC; lpString: LPCWSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
  1007. {$EXTERNALSYM GetTextExtentPoint32}
  1008. {$ELSE}
  1009. function GetTextExtentPoint32(hdc: HDC; lpString: LPCSTR; cbString: Integer; var Size: TSize): BOOL; stdcall;
  1010. {$EXTERNALSYM GetTextExtentPoint32}
  1011. {$ENDIF}
  1012. function GetTextExtentExPointA(hdc: HDC; lpszStr: LPCSTR; cchString, nMaxExtend: Integer; lpnFit, alpDx: LPINT; var lpSize: TSize): BOOL; stdcall;
  1013. {$EXTERNALSYM GetTextExtentExPointA}
  1014. function GetTextExtentExPointW(hdc: HDC; lpszStr: LPCWSTR; cchString, nMaxExtend: Integer; lpnFit, alpDx: LPINT; var lpSize: TSize): BOOL; stdcall;
  1015. {$EXTERNALSYM GetTextExtentExPointW}
  1016. {$IFDEF UNICODE}
  1017. function GetTextExtentExPoint(hdc: HDC; lpszStr: LPCWSTR; cchString, nMaxExtend: Integer; lpnFit, alpDx: LPINT; var lpSize: TSize): BOOL; stdcall;
  1018. {$EXTERNALSYM GetTextExtentExPoint}
  1019. {$ELSE}
  1020. function GetTextExtentExPoint(hdc: HDC; lpszStr: LPCSTR; cchString, nMaxExtend: Integer; lpnFit, alpDx: LPINT; var lpSize: TSize): BOOL; stdcall;
  1021. {$EXTERNALSYM GetTextExtentExPoint}
  1022. {$ENDIF}
  1023. function GetTextCharset(hdc: HDC): Integer; stdcall;
  1024. {$EXTERNALSYM GetTextCharset}
  1025. function GetTextCharsetInfo(hdc: HDC; lpSig: LPFONTSIGNATURE; dwFlags: DWORD): Integer; stdcall;
  1026. {$EXTERNALSYM GetTextCharsetInfo}
  1027. function TranslateCharsetInfo(lpSrc: LPDWORD; lpCs: LPCHARSETINFO; dwFlags: DWORD): BOOL; stdcall;
  1028. {$EXTERNALSYM TranslateCharsetInfo}
  1029. function GetFontLanguageInfo(hdc: HDC): DWORD; stdcall;
  1030. {$EXTERNALSYM GetFontLanguageInfo}
  1031. function GetCharacterPlacementA(hdc: HDC; lpString: LPCSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSA; dwFlags: DWORD): DWORD; stdcall;
  1032. {$EXTERNALSYM GetCharacterPlacementA}
  1033. function GetCharacterPlacementW(hdc: HDC; lpString: LPCWSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSW; dwFlags: DWORD): DWORD; stdcall;
  1034. {$EXTERNALSYM GetCharacterPlacementW}
  1035. {$IFDEF UNICODE}
  1036. function GetCharacterPlacement(hdc: HDC; lpString: LPCWSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSW; dwFlags: DWORD): DWORD; stdcall;
  1037. {$EXTERNALSYM GetCharacterPlacement}
  1038. {$ELSE}
  1039. function GetCharacterPlacement(hdc: HDC; lpString: LPCSTR; nCount, nMaxExtend: Integer; var lpResults: GCP_RESULTSA; dwFlags: DWORD): DWORD; stdcall;
  1040. {$EXTERNALSYM GetCharacterPlacement}
  1041. {$ENDIF}
  1042. type
  1043.   PWcRange = ^TWcRange;
  1044.   tagWCRANGE = record
  1045.     wcLow: WCHAR;
  1046.     cGlyphs: USHORT;
  1047.   end;
  1048.   {$EXTERNALSYM tagWCRANGE}
  1049.   WCRANGE = tagWCRANGE;
  1050.   {$EXTERNALSYM WCRANGE}
  1051.   LPWCRANGE = ^WCRANGE;
  1052.   {$EXTERNALSYM LPWCRANGE}
  1053.   TWcRange = WCRANGE;
  1054.   PGlyphSet = ^TGlyphSet;
  1055.   tagGLYPHSET = record
  1056.     cbThis: DWORD;
  1057.     flAccel: DWORD;
  1058.     cGlyphsSupported: DWORD;
  1059.     cRanges: DWORD;
  1060.     ranges: array [0..0] of WCRANGE;
  1061.   end;
  1062.   {$EXTERNALSYM tagGLYPHSET}
  1063.   GLYPHSET = tagGLYPHSET;
  1064.   {$EXTERNALSYM GLYPHSET}
  1065.   LPGLYPHSET = ^GLYPHSET;
  1066.   {$EXTERNALSYM LPGLYPHSET}
  1067.   TGlyphSet = GLYPHSET;
  1068. // flAccel flags for the GLYPHSET structure above
  1069. const
  1070.   GS_8BIT_INDICES = $00000001;
  1071.   {$EXTERNALSYM GS_8BIT_INDICES}
  1072. // flags for GetGlyphIndices
  1073.   GGI_MARK_NONEXISTING_GLYPHS = $0001;
  1074.   {$EXTERNALSYM GGI_MARK_NONEXISTING_GLYPHS}
  1075. function GetFontUnicodeRanges(hdc: HDC; lpgs: LPGLYPHSET): DWORD; stdcall;
  1076. {$EXTERNALSYM GetFontUnicodeRanges}
  1077. function GetGlyphIndicesA(hdc: HDC; lpstr: LPCSTR; c: Integer; pgi: LPWORD; fl: DWORD): DWORD; stdcall;
  1078. {$EXTERNALSYM GetGlyphIndicesA}
  1079. function GetGlyphIndicesW(hdc: HDC; lpstr: LPCWSTR; c: Integer; pgi: LPWORD; fl: DWORD): DWORD; stdcall;
  1080. {$EXTERNALSYM GetGlyphIndicesW}
  1081. {$IFDEF UNICODE}
  1082. function GetGlyphIndices(hdc: HDC; lpstr: LPCWSTR; c: Integer; pgi: LPWORD; fl: DWORD): DWORD; stdcall;
  1083. {$EXTERNALSYM GetGlyphIndices}
  1084. {$ELSE}
  1085. function GetGlyphIndices(hdc: HDC; lpstr: LPCSTR; c: Integer; pgi: LPWORD; fl: DWORD): DWORD; stdcall;
  1086. {$EXTERNALSYM GetGlyphIndices}
  1087. {$ENDIF}
  1088. function GetTextExtentPointI(hdc: HDC; pgiIn: LPWORD; cgi: Integer; lpSize: LPSIZE): BOOL; stdcall;
  1089. {$EXTERNALSYM GetTextExtentPointI}
  1090. function GetTextExtentExPointI(hdc: HDC; pgiIn: LPWORD; cgi, nMaxExtend: Integer;
  1091.   lpnFit, alpDx: LPINT; lpSize: LPSIZE): BOOL; stdcall;
  1092. {$EXTERNALSYM GetTextExtentExPointI}
  1093. function GetCharWidthI(hdc: HDC; giFirst, cgi: UINT; pgi: LPWORD; lpBuffer: LPINT): BOOL; stdcall;
  1094. {$EXTERNALSYM GetCharWidthI}
  1095. function GetCharABCWidthsI(hdc: HDC; giFirst, cgi: UINT; pgi: LPWORD; lpAbc: LPABC): BOOL; stdcall;
  1096. {$EXTERNALSYM GetCharABCWidthsI}
  1097. const
  1098.   STAMP_DESIGNVECTOR = ($8000000 + Ord('d') + (Ord('v') shl 8));
  1099.   {$EXTERNALSYM STAMP_DESIGNVECTOR}
  1100.   STAMP_AXESLIST     = ($8000000 + Ord('a') + (Ord('l') shl 8));
  1101.   {$EXTERNALSYM STAMP_AXESLIST}
  1102.   MM_MAX_NUMAXES     = 16;
  1103.   {$EXTERNALSYM MM_MAX_NUMAXES}
  1104. type
  1105.   PDesignVector = ^TDesignVector;
  1106.   tagDESIGNVECTOR = record
  1107.     dvReserved: DWORD;
  1108.     dvNumAxes: DWORD;
  1109.     dvValues: array [0..MM_MAX_NUMAXES - 1] of LONG;
  1110.   end;
  1111.   {$EXTERNALSYM tagDESIGNVECTOR}
  1112.   DESIGNVECTOR = tagDESIGNVECTOR;
  1113.   {$EXTERNALSYM DESIGNVECTOR}
  1114.   LPDESIGNVECTOR = ^DESIGNVECTOR;
  1115.   {$EXTERNALSYM LPDESIGNVECTOR}
  1116.   TDesignVector = DESIGNVECTOR;
  1117. function AddFontResourceExA(lpszFilename: LPCSTR; fl: DWORD; pdv: PVOID): Integer; stdcall;
  1118. {$EXTERNALSYM AddFontResourceExA}
  1119. function AddFontResourceExW(lpszFilename: LPCWSTR; fl: DWORD; pdv: PVOID): Integer; stdcall;
  1120. {$EXTERNALSYM AddFontResourceExW}
  1121. {$IFDEF UNICODE}
  1122. function AddFontResourceEx(lpszFilename: LPCWSTR; fl: DWORD; pdv: PVOID): Integer; stdcall;
  1123. {$EXTERNALSYM AddFontResourceEx}
  1124. {$ELSE}
  1125. function AddFontResourceEx(lpszFilename: LPCSTR; fl: DWORD; pdv: PVOID): Integer; stdcall;
  1126. {$EXTERNALSYM AddFontResourceEx}
  1127. {$ENDIF}
  1128. function RemoveFontResourceExA(lpFilename: LPCSTR; fl: DWORD; pdv: PVOID): BOOL; stdcall;
  1129. {$EXTERNALSYM RemoveFontResourceExA}
  1130. function RemoveFontResourceExW(lpFilename: LPCWSTR; fl: DWORD; pdv: PVOID): BOOL; stdcall;
  1131. {$EXTERNALSYM RemoveFontResourceExW}
  1132. {$IFDEF UNICODE}
  1133. function RemoveFontResourceEx(lpFilename: LPCWSTR; fl: DWORD; pdv: PVOID): BOOL; stdcall;
  1134. {$EXTERNALSYM RemoveFontResourceEx}
  1135. {$ELSE}
  1136. function RemoveFontResourceEx(lpFilename: LPCSTR; fl: DWORD; pdv: PVOID): BOOL; stdcall;
  1137. {$EXTERNALSYM RemoveFontResourceEx}
  1138. {$ENDIF}
  1139. function AddFontMemResourceEx(pbFont: PVOID; cbFont: DWORD; pdv: PVOID; pcFonts: LPDWORD): HANDLE; stdcall;
  1140. {$EXTERNALSYM AddFontMemResourceEx}
  1141. function RemoveFontMemResourceEx(fh: HANDLE): BOOL; stdcall;
  1142. {$EXTERNALSYM RemoveFontMemResourceEx}
  1143. const
  1144.   FR_PRIVATE    = $10;
  1145.   {$EXTERNALSYM FR_PRIVATE}
  1146.   FR_NOT_ENUM   = $20;
  1147.   {$EXTERNALSYM FR_NOT_ENUM}
  1148. // The actual size of the DESIGNVECTOR and ENUMLOGFONTEXDV structures
  1149. // is determined by dvNumAxes,
  1150. // MM_MAX_NUMAXES only detemines the maximal size allowed
  1151. const
  1152.   MM_MAX_AXES_NAMELEN = 16;
  1153.   {$EXTERNALSYM MM_MAX_AXES_NAMELEN}
  1154. type
  1155.   PAxisInfoA = ^TAxisInfoA;
  1156.   tagAXISINFOA = record
  1157.     axMinValue: LONG;
  1158.     axMaxValue: LONG;
  1159.     axAxisName: array [0..MM_MAX_AXES_NAMELEN - 1] of BYTE;
  1160.   end;
  1161.   {$EXTERNALSYM tagAXISINFOA}
  1162.   AXISINFOA = tagAXISINFOA;
  1163.   {$EXTERNALSYM AXISINFOA}
  1164.   LPAXISINFOA = ^AXISINFOA;
  1165.   {$EXTERNALSYM LPAXISINFOA}
  1166.   TAxisInfoA = AXISINFOA;
  1167.   PAxisInfoW = ^TAxisInfoW;
  1168.   tagAXISINFOW = record
  1169.     axMinValue: LONG;
  1170.     axMaxValue: LONG;
  1171.     axAxisName: array [0..MM_MAX_AXES_NAMELEN - 1] of WCHAR;
  1172.   end;
  1173.   {$EXTERNALSYM tagAXISINFOW}
  1174.   AXISINFOW = tagAXISINFOW;
  1175.   {$EXTERNALSYM AXISINFOW}
  1176.   LPAXISINFOW = ^AXISINFOW;
  1177.   {$EXTERNALSYM LPAXISINFOW}
  1178.   TAxisInfoW = AXISINFOW;
  1179. {$IFDEF UNICODE}
  1180.   AXISINFO = AXISINFOW;
  1181.   {$EXTERNALSYM AXISINFO}
  1182.   PAXISINFO = PAXISINFOW;
  1183.   {$EXTERNALSYM PAXISINFO}
  1184.   LPAXISINFO = LPAXISINFOW;
  1185.   {$EXTERNALSYM LPAXISINFO}
  1186.   TAxisInfo = TAxisInfoW;
  1187. {$ELSE}
  1188.   AXISINFO = AXISINFOA;
  1189.   {$EXTERNALSYM AXISINFO}
  1190.   PAXISINFO = PAXISINFOA;
  1191.   {$EXTERNALSYM PAXISINFO}
  1192.   LPAXISINFO = LPAXISINFOA;
  1193.   {$EXTERNALSYM LPAXISINFO}
  1194.   TAxisInfo = TAxisInfoA;
  1195. {$ENDIF}
  1196.   PAxesListA = ^TAxesListA;
  1197.   tagAXESLISTA = record
  1198.     axlReserved: DWORD;
  1199.     axlNumAxes: DWORD;
  1200.     axlAxisInfo: array [0..MM_MAX_NUMAXES - 1] of AXISINFOA;
  1201.   end;
  1202.   {$EXTERNALSYM tagAXESLISTA}
  1203.   AXESLISTA = tagAXESLISTA;
  1204.   {$EXTERNALSYM AXESLISTA}
  1205.   LPAXESLISTA = ^AXESLISTA;
  1206.   {$EXTERNALSYM LPAXESLISTA}
  1207.   TAxesListA = tagAXESLISTA;
  1208.   PAxesListW = ^TAxesListW;
  1209.   tagAXESLISTW = record
  1210.     axlReserved: DWORD;
  1211.     axlNumAxes: DWORD;
  1212.     axlAxisInfo: array [0..MM_MAX_NUMAXES - 1] of AXISINFOW;
  1213.   end;
  1214.   {$EXTERNALSYM tagAXESLISTW}
  1215.   AXESLISTW = tagAXESLISTW;
  1216.   {$EXTERNALSYM AXESLISTW}
  1217.   LPAXESLISTW = ^AXESLISTW;
  1218.   {$EXTERNALSYM LPAXESLISTW}
  1219.   TAxesListW = tagAXESLISTW;
  1220. {$IFDEF UNICODE}
  1221.   AXESLIST = AXESLISTW;
  1222.   {$EXTERNALSYM AXESLIST}
  1223.   PAXESLIST = PAXESLISTW;
  1224.   {$EXTERNALSYM PAXESLIST}
  1225.   LPAXESLIST = LPAXESLISTW;
  1226.   {$EXTERNALSYM LPAXESLIST}
  1227.   TAxesList = TAxesListW;
  1228. {$ELSE}
  1229.   AXESLIST = AXESLISTA;
  1230.   {$EXTERNALSYM AXESLIST}
  1231.   PAXESLIST = PAXESLISTA;
  1232.   {$EXTERNALSYM PAXESLIST}
  1233.   LPAXESLIST = LPAXESLISTA;
  1234.   {$EXTERNALSYM LPAXESLIST}
  1235.   TAxesList = TAxesListA;
  1236. {$ENDIF}
  1237. // The actual size of the AXESLIST and ENUMTEXTMETRIC structure is
  1238. // determined by axlNumAxes,
  1239. // MM_MAX_NUMAXES only detemines the maximal size allowed
  1240.   PEnumLogFontExDVA = ^TEnumLogFontExDVA;
  1241.   tagENUMLOGFONTEXDVA = record
  1242.     elfEnumLogfontEx: ENUMLOGFONTEXA;
  1243.     elfDesignVector: DESIGNVECTOR;
  1244.   end;
  1245.   {$EXTERNALSYM tagENUMLOGFONTEXDVA}
  1246.   ENUMLOGFONTEXDVA = tagENUMLOGFONTEXDVA;
  1247.   {$EXTERNALSYM ENUMLOGFONTEXDVA}
  1248.   LPENUMLOGFONTEXDVA = ^ENUMLOGFONTEXDVA;
  1249.   {$EXTERNALSYM LPENUMLOGFONTEXDVA}
  1250.   TEnumLogFontExDVA = tagENUMLOGFONTEXDVA;
  1251.   PEnumLogFontExDVW = ^TEnumLogFontExDVW;
  1252.   tagENUMLOGFONTEXDVW = record
  1253.     elfEnumLogfontEx: ENUMLOGFONTEXW;
  1254.     elfDesignVector: DESIGNVECTOR;
  1255.   end;
  1256.   {$EXTERNALSYM tagENUMLOGFONTEXDVw}
  1257.   ENUMLOGFONTEXDVW = tagENUMLOGFONTEXDVW;
  1258.   {$EXTERNALSYM ENUMLOGFONTEXDVW}
  1259.   LPENUMLOGFONTEXDVW = ^ENUMLOGFONTEXDVW;
  1260.   {$EXTERNALSYM LPENUMLOGFONTEXDVW}
  1261.   TEnumLogFontExDVW = tagENUMLOGFONTEXDVW;
  1262. {$IFDEF UNICODE}
  1263.   ENUMLOGFONTEXDV = ENUMLOGFONTEXDVW;
  1264.   {$EXTERNALSYM ENUMLOGFONTEXDV}
  1265.   PENUMLOGFONTEXDV = PENUMLOGFONTEXDVW;
  1266.   {$EXTERNALSYM PENUMLOGFONTEXDV}
  1267.   LPENUMLOGFONTEXDV = LPENUMLOGFONTEXDVW;
  1268.   {$EXTERNALSYM LPENUMLOGFONTEXDV}
  1269.   TEnumLogFontExDV = TEnumLogFontExDVW;
  1270. {$ELSE}
  1271.   ENUMLOGFONTEXDV = ENUMLOGFONTEXDVA;
  1272.   {$EXTERNALSYM ENUMLOGFONTEXDV}
  1273.   PENUMLOGFONTEXDV = PENUMLOGFONTEXDVA;
  1274.   {$EXTERNALSYM PENUMLOGFONTEXDV}
  1275.   LPENUMLOGFONTEXDV = LPENUMLOGFONTEXDVA;
  1276.   {$EXTERNALSYM LPENUMLOGFONTEXDV}
  1277.   TEnumLogFontExDV = TEnumLogFontExDVA;
  1278. {$ENDIF}
  1279. function CreateFontIndirectExA(penumlfex: LPENUMLOGFONTEXDVA): HFONT; stdcall;
  1280. {$EXTERNALSYM CreateFontIndirectExA}
  1281. function CreateFontIndirectExW(penumlfex: LPENUMLOGFONTEXDVW): HFONT; stdcall;
  1282. {$EXTERNALSYM CreateFontIndirectExW}
  1283. {$IFDEF UNICODE}
  1284. function CreateFontIndirectEx(penumlfex: LPENUMLOGFONTEXDVW): HFONT; stdcall;
  1285. {$EXTERNALSYM CreateFontIndirectEx}
  1286. {$ELSE}
  1287. function CreateFontIndirectEx(penumlfex: LPENUMLOGFONTEXDVA): HFONT; stdcall;
  1288. {$EXTERNALSYM CreateFontIndirectEx}
  1289. {$ENDIF}
  1290. type
  1291.   PEnumTextMetricA = ^TEnumTextMetricA;
  1292.   tagENUMTEXTMETRICA = record
  1293.     etmNewTextMetricEx: NEWTEXTMETRICEXA;
  1294.     etmAxesList: AXESLISTA;
  1295.   end;
  1296.   {$EXTERNALSYM tagENUMTEXTMETRICA}
  1297.   ENUMTEXTMETRICA = tagENUMTEXTMETRICA;
  1298.   {$EXTERNALSYM ENUMTEXTMETRICA}
  1299.   LPENUMTEXTMETRICA = ^ENUMTEXTMETRICA;
  1300.   {$EXTERNALSYM LPENUMTEXTMETRICA}
  1301.   TEnumTextMetricA = tagENUMTEXTMETRICA;
  1302.   PEnumTextMetricW = ^TEnumTextMetricW;
  1303.   tagENUMTEXTMETRICW = record
  1304.     etmNewTextMetricEx: NEWTEXTMETRICEXW;
  1305.     etmAxesList: AXESLISTW;
  1306.   end;
  1307.   {$EXTERNALSYM tagENUMTEXTMETRICW}
  1308.   ENUMTEXTMETRICW = tagENUMTEXTMETRICW;
  1309.   {$EXTERNALSYM ENUMTEXTMETRICW}
  1310.   LPENUMTEXTMETRICW = ^ENUMTEXTMETRICW;
  1311.   {$EXTERNALSYM LPENUMTEXTMETRICW}
  1312.   TEnumTextMetricW = tagENUMTEXTMETRICW;
  1313. {$IFDEF UNICODE}
  1314.   ENUMTEXTMETRIC = ENUMTEXTMETRICW;
  1315.   {$EXTERNALSYM ENUMTEXTMETRIC}
  1316.   PENUMTEXTMETRIC = PENUMTEXTMETRICW;
  1317.   {$EXTERNALSYM PENUMTEXTMETRIC}
  1318.   LPENUMTEXTMETRIC = LPENUMTEXTMETRICW;
  1319.   {$EXTERNALSYM LPENUMTEXTMETRIC}
  1320.   TEnumTextMetric = TEnumTextMetricW;
  1321. {$ELSE}
  1322.   ENUMTEXTMETRIC = ENUMTEXTMETRICA;
  1323.   {$EXTERNALSYM ENUMTEXTMETRIC}
  1324.   PENUMTEXTMETRIC = PENUMTEXTMETRICA;
  1325.   {$EXTERNALSYM PENUMTEXTMETRIC}
  1326.   LPENUMTEXTMETRIC = LPENUMTEXTMETRICA;
  1327.   {$EXTERNALSYM LPENUMTEXTMETRIC}
  1328.   TEnumTextMetric = TEnumTextMetricA;
  1329. {$ENDIF}
  1330. function GetViewportExtEx(hdc: HDC; var lpSize: TSize): BOOL; stdcall;
  1331. {$EXTERNALSYM GetViewportExtEx}
  1332. function GetViewportOrgEx(hdc: HDC; var lpPoint: POINT): BOOL; stdcall;
  1333. {$EXTERNALSYM GetViewportOrgEx}
  1334. function GetWindowExtEx(hdc: HDC; var lpSize: TSize): BOOL; stdcall;
  1335. {$EXTERNALSYM GetWindowExtEx}
  1336. function GetWindowOrgEx(hdc: HDC; var lpPoint: POINT): BOOL; stdcall;
  1337. {$EXTERNALSYM GetWindowOrgEx}
  1338. function IntersectClipRect(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): Integer; stdcall;
  1339. {$EXTERNALSYM IntersectClipRect}
  1340. function InvertRgn(hdc: HDC; hrgn: HRGN): BOOL; stdcall;
  1341. {$EXTERNALSYM InvertRgn}
  1342. function LineDDA(nXStart, nYStart, nXEnd, nYEnd: Integer; lpLineFunc: LINEDDAPROC; lpData: LPARAM): BOOL; stdcall;
  1343. {$EXTERNALSYM LineDDA}
  1344. function LineTo(hdc: HDC; nXEnd, nYEnd: Integer): BOOL; stdcall;
  1345. {$EXTERNALSYM LineTo}
  1346. function MaskBlt(hdc: HDC; nXDest, nYDest, nWidth, nHeight: Integer; hdcSrc: HDC; nXSrc, nYSrc: Integer; hbmMask: HBITMAP; xMask, yMask: Integer; dwRop: DWORD): BOOL; stdcall;
  1347. {$EXTERNALSYM MaskBlt}
  1348. function PlgBlt(hdc: HDC; lpPoint: LPPOINT; hdcSrc: HDC; nXSrc, nYSrc, nWidth, nHeight: Integer; hbmMask: HBITMAP; xMask, yMask: Integer): BOOL; stdcall;
  1349. {$EXTERNALSYM PlgBlt}
  1350. function OffsetClipRgn(hdc: HDC; nXOffset, nYOffset: Integer): Integer; stdcall;
  1351. {$EXTERNALSYM OffsetClipRgn}
  1352. function OffsetRgn(hrgn: HRGN; nXOffset, nYOffset: Integer): Integer; stdcall;
  1353. {$EXTERNALSYM OffsetRgn}
  1354. function PatBlt(hdc: HDC; nXLeft, nYLeft, nWidth, nHeight: Integer; dwRop: DWORD): BOOL; stdcall;
  1355. {$EXTERNALSYM PatBlt}
  1356. function Pie(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2: Integer): BOOL; stdcall;
  1357. {$EXTERNALSYM Pie}
  1358. function PlayMetaFile(hdc: HDC; hmf: HMETAFILE): BOOL; stdcall;
  1359. {$EXTERNALSYM PlayMetaFile}
  1360. function PaintRgn(hdc: HDC; hrgn: HRGN): BOOL; stdcall;
  1361. {$EXTERNALSYM PaintRgn}
  1362. function PolyPolygon(hdc: HDC; lpPoints: LPPOINT; lpPolyCounts: LPINT; nCount: Integer): BOOL; stdcall;
  1363. {$EXTERNALSYM PolyPolygon}
  1364. function PtInRegion(hrgn: HRGN; X, Y: Integer): BOOL; stdcall;
  1365. {$EXTERNALSYM PtInRegion}
  1366. function PtVisible(hdc: HDC; X, Y: Integer): BOOL; stdcall;
  1367. {$EXTERNALSYM PtVisible}
  1368. function RectInRegion(hrgn: HRGN; const lprc: RECT): BOOL; stdcall;
  1369. {$EXTERNALSYM RectInRegion}
  1370. function RectVisible(hdc: HDC; const lprc: RECT): BOOL; stdcall;
  1371. {$EXTERNALSYM RectVisible}
  1372. function Rectangle(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): BOOL; stdcall;
  1373. {$EXTERNALSYM Rectangle}
  1374. function RestoreDC(hdc: HDC; nSavedDc: Integer): BOOL; stdcall;
  1375. {$EXTERNALSYM RestoreDC}
  1376. function ResetDCA(hdc: HDC; const lpInitData: DEVMODEA): HDC; stdcall;
  1377. {$EXTERNALSYM ResetDCA}
  1378. function ResetDCW(hdc: HDC; const lpInitData: DEVMODEW): HDC; stdcall;
  1379. {$EXTERNALSYM ResetDCW}
  1380. {$IFDEF UNICODE}
  1381. function ResetDC(hdc: HDC; const lpInitData: DEVMODEW): HDC; stdcall;
  1382. {$EXTERNALSYM ResetDC}
  1383. {$ELSE}
  1384. function ResetDC(hdc: HDC; const lpInitData: DEVMODEA): HDC; stdcall;
  1385. {$EXTERNALSYM ResetDC}
  1386. {$ENDIF}
  1387. function RealizePalette(hdc: HDC): UINT; stdcall;
  1388. {$EXTERNALSYM RealizePalette}
  1389. function RemoveFontResourceA(lpFileName: LPCSTR): BOOL; stdcall;
  1390. {$EXTERNALSYM RemoveFontResourceA}
  1391. function RemoveFontResourceW(lpFileName: LPCWSTR): BOOL; stdcall;
  1392. {$EXTERNALSYM RemoveFontResourceW}
  1393. {$IFDEF UNICODE}
  1394. function RemoveFontResource(lpFileName: LPCWSTR): BOOL; stdcall;
  1395. {$EXTERNALSYM RemoveFontResource}
  1396. {$ELSE}
  1397. function RemoveFontResource(lpFileName: LPCSTR): BOOL; stdcall;
  1398. {$EXTERNALSYM RemoveFontResource}
  1399. {$ENDIF}
  1400. function RoundRect(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nWidth, nHeight: Integer): BOOL; stdcall;
  1401. {$EXTERNALSYM RoundRect}
  1402. function ResizePalette(hPal: HPALETTE; nEntries: UINT): BOOL; stdcall;
  1403. {$EXTERNALSYM ResizePalette}
  1404. function SaveDC(hdc: HDC): Integer; stdcall;
  1405. {$EXTERNALSYM SaveDC}
  1406. function SelectClipRgn(hdc: HDC; hrgn: HRGN): Integer; stdcall;
  1407. {$EXTERNALSYM SelectClipRgn}
  1408. function ExtSelectClipRgn(hdc: HDC; hrgn: HRGN; fnMode: Integer): Integer; stdcall;
  1409. {$EXTERNALSYM ExtSelectClipRgn}
  1410. function SetMetaRgn(hdc: HDC): Integer; stdcall;
  1411. {$EXTERNALSYM SetMetaRgn}
  1412. function SelectObject(hdc: HDC; hgdiobj: HGDIOBJ): HGDIOBJ; stdcall;
  1413. {$EXTERNALSYM SelectObject}
  1414. function SelectPalette(hdc: HDC; hpal: HPALETTE; nForceBackground: BOOL): HPALETTE; stdcall;
  1415. {$EXTERNALSYM SelectPalette}
  1416. function SetBkColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
  1417. {$EXTERNALSYM SetBkColor}
  1418. function SetDCBrushColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
  1419. {$EXTERNALSYM SetDCBrushColor}
  1420. function SetDCPenColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
  1421. {$EXTERNALSYM SetDCPenColor}
  1422. function SetBkMode(hdc: HDC; iBlMode: Integer): Integer; stdcall;
  1423. {$EXTERNALSYM SetBkMode}
  1424. function SetBitmapBits(hbmp: HBITMAP; cBytes: DWORD; lpBits: LPVOID): LONG; stdcall;
  1425. {$EXTERNALSYM SetBitmapBits}
  1426. function SetBoundsRect(hdc: HDC; lprcBounds: LPRECT; flags: UINT): UINT; stdcall;
  1427. {$EXTERNALSYM SetBoundsRect}
  1428. function SetDIBits(hdc: HDC; hbmp: HBITMAP; uStartScan, cScanLines: UINT; lpvBits: LPVOID; const lpbmi: BITMAPINFO; fuColorUse: UINT): Integer; stdcall;
  1429. {$EXTERNALSYM SetDIBits}
  1430. function SetDIBitsToDevice(hdc: HDC; xDest, yDest: Integer; dwWidth, dwHeight: DWORD; XSrc, YSrc: Integer; uStartScan, cScanLines: UINT; lpvBits: LPVOID; const lpbmi: BITMAPINFO; fuColorUse: UINT): Integer; stdcall;
  1431. {$EXTERNALSYM SetDIBitsToDevice}
  1432. function SetMapperFlags(hdc: HDC; dwFlag: DWORD): DWORD; stdcall;
  1433. {$EXTERNALSYM SetMapperFlags}
  1434. function SetGraphicsMode(hdc: HDC; iMode: Integer): Integer; stdcall;
  1435. {$EXTERNALSYM SetGraphicsMode}
  1436. function SetMapMode(hdc: HDC; fnMapMode: Integer): Integer; stdcall;
  1437. {$EXTERNALSYM SetMapMode}
  1438. function SetLayout(hdc: HDC; dwLayOut: DWORD): DWORD; stdcall;
  1439. {$EXTERNALSYM SetLayout}
  1440. function GetLayout(hdc: HDC): DWORD; stdcall;
  1441. {$EXTERNALSYM GetLayout}
  1442. function SetMetaFileBitsEx(nSize: UINT; lpData: LPBYTE): HMETAFILE; stdcall;
  1443. {$EXTERNALSYM SetMetaFileBitsEx}
  1444. function SetPaletteEntries(hPal: HPALETTE; cStart, nEntries: UINT; lppe: LPPALETTEENTRY): UINT; stdcall;
  1445. {$EXTERNALSYM SetPaletteEntries}
  1446. function SetPixel(hdc: HDC; X, Y: Integer; crColor: COLORREF): COLORREF; stdcall;
  1447. {$EXTERNALSYM SetPixel}
  1448. function SetPixelV(hdc: HDC; X, Y: Integer; crColor: COLORREF): BOOL; stdcall;
  1449. {$EXTERNALSYM SetPixelV}
  1450. function SetPixelFormat(hdc: HDC; iPixelFormat: Integer; const ppfd: PIXELFORMATDESCRIPTOR): BOOL; stdcall;
  1451. {$EXTERNALSYM SetPixelFormat}
  1452. function SetPolyFillMode(hdc: HDC; iPolyFillMode: Integer): Integer; stdcall;
  1453. {$EXTERNALSYM SetPolyFillMode}
  1454. function StretchBlt(hdc: HDC; nXOriginDest, nYOriginDest, nWidthDest, nHeightDest: Integer; hdcSrc: HDC; nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc: Integer; dwRop: DWORD): BOOL; stdcall;
  1455. {$EXTERNALSYM StretchBlt}
  1456. function SetRectRgn(hrgn: HRGN; nLeftRect, nTopRect, nRightRect, nBottomRect: Integer): BOOL; stdcall;
  1457. {$EXTERNALSYM SetRectRgn}
  1458. function StretchDIBits(hdc: HDC; XDest, YDest, nDestWidth, nYDestHeight, XSrc, YSrc, nSrcWidth, nSrcHeight: Integer; lpBits: LPVOID; const lpBitsInfo: BITMAPINFO; iUsage: UINT; dwRop: DWORD): Integer; stdcall;
  1459. {$EXTERNALSYM StretchDIBits}
  1460. function SetROP2(hdc: HDC; fnDrawMode: Integer): Integer; stdcall;
  1461. {$EXTERNALSYM SetROP2}
  1462. function SetStretchBltMode(hdc: HDC; iStretchMode: Integer): Integer; stdcall;
  1463. {$EXTERNALSYM SetStretchBltMode}
  1464. function SetSystemPaletteUse(hdc: HDC; uUsage: UINT): UINT; stdcall;
  1465. {$EXTERNALSYM SetSystemPaletteUse}
  1466. function SetTextCharacterExtra(hdc: HDC; nCharExtra: Integer): Integer; stdcall;
  1467. {$EXTERNALSYM SetTextCharacterExtra}
  1468. function SetTextColor(hdc: HDC; crColor: COLORREF): COLORREF; stdcall;
  1469. {$EXTERNALSYM SetTextColor}
  1470. function SetTextAlign(hdc: HDC; fMode: UINT): UINT; stdcall;
  1471. {$EXTERNALSYM SetTextAlign}
  1472. function SetTextJustification(hdc: HDC; nBreakExtra, nBreakCount: Integer): BOOL; stdcall;
  1473. {$EXTERNALSYM SetTextJustification}
  1474. function UpdateColors(hdc: HDC): BOOL; stdcall;
  1475. {$EXTERNALSYM UpdateColors}
  1476. //
  1477. // image blt
  1478. //
  1479. type
  1480.   COLOR16 = USHORT;
  1481.   {$EXTERNALSYM COLOR16}
  1482.   PTriVertex = ^TTriVertex;
  1483.   _TRIVERTEX = record
  1484.     x: LONG;
  1485.     y: LONG;
  1486.     Red: COLOR16;
  1487.     Green: COLOR16;
  1488.     Blue: COLOR16;
  1489.     Alpha: COLOR16;
  1490.   end;
  1491.   {$EXTERNALSYM _TRIVERTEX}
  1492.   TRIVERTEX = _TRIVERTEX;
  1493.   {$EXTERNALSYM TRIVERTEX}
  1494.   LPTRIVERTEX = ^TRIVERTEX;
  1495.   {$EXTERNALSYM LPTRIVERTEX}
  1496.   TTriVertex = _TRIVERTEX;
  1497.   PGradientTriangle = ^TGradientTriangle;
  1498.   _GRADIENT_TRIANGLE = record
  1499.     Vertex1: ULONG;
  1500.     Vertex2: ULONG;
  1501.     Vertex3: ULONG;
  1502.   end;
  1503.   {$EXTERNALSYM _GRADIENT_TRIANGLE}
  1504.   GRADIENT_TRIANGLE = _GRADIENT_TRIANGLE;
  1505.   {$EXTERNALSYM GRADIENT_TRIANGLE}
  1506.   LPGRADIENT_TRIANGLE = ^GRADIENT_TRIANGLE;
  1507.   {$EXTERNALSYM LPGRADIENT_TRIANGLE}
  1508.   PGRADIENT_TRIANGLE = ^GRADIENT_TRIANGLE;
  1509.   {$EXTERNALSYM PGRADIENT_TRIANGLE}
  1510.   TGradientTriangle = _GRADIENT_TRIANGLE;
  1511.   PGradientRect = ^TGradientRect;
  1512.   _GRADIENT_RECT = record
  1513.     UpperLeft: ULONG;
  1514.     LowerRight: ULONG;
  1515.   end;
  1516.   {$EXTERNALSYM _GRADIENT_RECT}
  1517.   GRADIENT_RECT = _GRADIENT_RECT;
  1518.   {$EXTERNALSYM GRADIENT_RECT}
  1519.   LPGRADIENT_RECT = ^GRADIENT_RECT;
  1520.   {$EXTERNALSYM LPGRADIENT_RECT}
  1521.   PGRADIENT_RECT = ^GRADIENT_RECT;
  1522.   {$EXTERNALSYM PGRADIENT_RECT}
  1523.   TGradientRect = _GRADIENT_RECT;
  1524.   PBlendFunction = ^TBlendFunction;
  1525.   _BLENDFUNCTION = record
  1526.     BlendOp: BYTE;
  1527.     BlendFlags: BYTE;
  1528.     SourceConstantAlpha: BYTE;
  1529.     AlphaFormat: BYTE;
  1530.   end;
  1531.   {$EXTERNALSYM _BLENDFUNCTION}
  1532.   BLENDFUNCTION = _BLENDFUNCTION;
  1533.   {$EXTERNALSYM BLENDFUNCTION}
  1534.   LPBLENDFUNCTION = ^BLENDFUNCTION;
  1535.   {$EXTERNALSYM LPBLENDFUNCTION}
  1536.   TBlendFunction = _BLENDFUNCTION;
  1537. //
  1538. // currentlly defined blend function
  1539. //
  1540. const
  1541.   AC_SRC_OVER = $00;
  1542.   {$EXTERNALSYM AC_SRC_OVER}
  1543. //
  1544. // alpha format flags
  1545. //
  1546.   AC_SRC_ALPHA = $01;
  1547.   {$EXTERNALSYM AC_SRC_ALPHA}
  1548. function AlphaBlend(hdcDest: HDC; nXOriginDest, nYOriginDest, nWidthDest,
  1549.   nHeightDest: Integer; hdcSrc: HDC; nXOriginSrc, nYOriginSrc, nWidthSrc,
  1550.   nHeightSrc: Integer; blendFunction: BLENDFUNCTION): BOOL; stdcall;
  1551. {$EXTERNALSYM AlphaBlend}
  1552. function TransparentBlt(hdcSrc: HDC; nXOriginSrc, nYOriginSrc, nWidthSrc,
  1553.   nHeightSrc: Integer; hdcDest: HDC; nXOriginDest, nYOriginDest, nWidthDest,
  1554.   nHeightDest: Integer; blendFunction: BLENDFUNCTION): BOOL; stdcall;
  1555. {$EXTERNALSYM TransparentBlt}
  1556. //
  1557. // gradient drawing modes
  1558. //
  1559. const
  1560.   GRADIENT_FILL_RECT_H   = $00000000;
  1561.   {$EXTERNALSYM GRADIENT_FILL_RECT_H}
  1562.   GRADIENT_FILL_RECT_V   = $00000001;
  1563.   {$EXTERNALSYM GRADIENT_FILL_RECT_V}
  1564.   GRADIENT_FILL_TRIANGLE = $00000002;
  1565.   {$EXTERNALSYM GRADIENT_FILL_TRIANGLE}
  1566.   GRADIENT_FILL_OP_FLAG  = $000000ff;
  1567.   {$EXTERNALSYM GRADIENT_FILL_OP_FLAG}
  1568. function GradientFill(hdc: HDC; pVertex: PTRIVERTEX; dwNumVertex: ULONG; pMesh: PVOID; dwNumMesh, dwMode: ULONG): BOOL; stdcall;
  1569. {$EXTERNALSYM GradientFill}
  1570. function PlayMetaFileRecord(hdc: HDC; lpHandleTable: LPHANDLETABLE; lpMetaRecord: LPMETARECORD; nHandles: UINT): BOOL; stdcall;
  1571. {$EXTERNALSYM PlayMetaFileRecord}
  1572. type
  1573.   MFENUMPROC = function (hdc: HDC; lpHTable: LPHANDLETABLE; lpMFR: LPMETARECORD; nObj: Integer; lpClientData: LPARAM): Integer; stdcall;
  1574.   {$EXTERNALSYM MFENUMPROC}
  1575. function EnumMetaFile(hdc: HDC; hemf: HMETAFILE; lpMetaFunc: MFENUMPROC; lParam: LPARAM): BOOL; stdcall;
  1576. {$EXTERNALSYM EnumMetaFile}
  1577. type
  1578.   ENHMFENUMPROC = function (hdc: HDC; lpHTable: LPHANDLETABLE; lpEMFR: LPENHMETARECORD; nObj: Integer; lpData: LPARAM): Integer; stdcall;
  1579.   {$EXTERNALSYM ENHMFENUMPROC}
  1580. // Enhanced Metafile Function Declarations
  1581. function CloseEnhMetaFile(hdc: HDC): HENHMETAFILE; stdcall;
  1582. {$EXTERNALSYM CloseEnhMetaFile}
  1583. function CopyEnhMetaFileA(hemfSrc: HENHMETAFILE; lpszFile: LPCSTR): HENHMETAFILE; stdcall;
  1584. {$EXTERNALSYM CopyEnhMetaFileA}
  1585. function CopyEnhMetaFileW(hemfSrc: HENHMETAFILE; lpszFile: LPCWSTR): HENHMETAFILE; stdcall;
  1586. {$EXTERNALSYM CopyEnhMetaFileW}
  1587. {$IFDEF UNICODE}
  1588. function CopyEnhMetaFile(hemfSrc: HENHMETAFILE; lpszFile: LPCWSTR): HENHMETAFILE; stdcall;
  1589. {$EXTERNALSYM CopyEnhMetaFile}
  1590. {$ELSE}
  1591. function CopyEnhMetaFile(hemfSrc: HENHMETAFILE; lpszFile: LPCSTR): HENHMETAFILE; stdcall;
  1592. {$EXTERNALSYM CopyEnhMetaFile}
  1593. {$ENDIF}
  1594. function CreateEnhMetaFileA(hdcRef: HDC; lpFileName: LPCSTR; const lpRect: RECT; lpDescription: LPCSTR): HDC; stdcall;
  1595. {$EXTERNALSYM CreateEnhMetaFileA}
  1596. function CreateEnhMetaFileW(hdcRef: HDC; lpFileName: LPCWSTR; const lpRect: RECT; lpDescription: LPCWSTR): HDC; stdcall;
  1597. {$EXTERNALSYM CreateEnhMetaFileW}
  1598. {$IFDEF UNICODE}
  1599. function CreateEnhMetaFile(hdcRef: HDC; lpFileName: LPCWSTR; const lpRect: RECT; lpDescription: LPCWSTR): HDC; stdcall;
  1600. {$EXTERNALSYM CreateEnhMetaFile}
  1601. {$ELSE}
  1602. function CreateEnhMetaFile(hdcRef: HDC; lpFileName: LPCSTR; const lpRect: RECT; lpDescription: LPCSTR): HDC; stdcall;
  1603. {$EXTERNALSYM CreateEnhMetaFile}
  1604. {$ENDIF}
  1605. function DeleteEnhMetaFile(hemf: HENHMETAFILE): BOOL; stdcall;
  1606. {$EXTERNALSYM DeleteEnhMetaFile}
  1607. function EnumEnhMetaFile(hdc: HDC; hemf: HENHMETAFILE; lpEnhMetaFunc: ENHMFENUMPROC; lpData: LPVOID; const lpRect: RECT): BOOL; stdcall;
  1608. {$EXTERNALSYM EnumEnhMetaFile}
  1609. function GetEnhMetaFileA(lpszMetaFile: LPCSTR): HENHMETAFILE; stdcall;
  1610. {$EXTERNALSYM GetEnhMetaFileA}
  1611. function GetEnhMetaFileW(lpszMetaFile: LPCWSTR): HENHMETAFILE; stdcall;
  1612. {$EXTERNALSYM GetEnhMetaFileW}
  1613. {$IFDEF UNICODE}
  1614. function GetEnhMetaFile(lpszMetaFile: LPCWSTR): HENHMETAFILE; stdcall;
  1615. {$EXTERNALSYM GetEnhMetaFile}
  1616. {$ELSE}
  1617. function GetEnhMetaFile(lpszMetaFile: LPCSTR): HENHMETAFILE; stdcall;
  1618. {$EXTERNALSYM GetEnhMetaFile}
  1619. {$ENDIF}
  1620. function GetEnhMetaFileBits(hemf: HENHMETAFILE; cbBuffer: UINT; lpBuffer: LPBYTE): UINT; stdcall;
  1621. {$EXTERNALSYM GetEnhMetaFileBits}
  1622. function GetEnhMetaFileDescriptionA(hemf: HENHMETAFILE; cchBuffer: UINT; lpszDescription: LPSTR): UINT; stdcall;
  1623. {$EXTERNALSYM GetEnhMetaFileDescriptionA}
  1624. function GetEnhMetaFileDescriptionW(hemf: HENHMETAFILE; cchBuffer: UINT; lpszDescription: LPWSTR): UINT; stdcall;
  1625. {$EXTERNALSYM GetEnhMetaFileDescriptionW}
  1626. {$IFDEF UNICODE}
  1627. function GetEnhMetaFileDescription(hemf: HENHMETAFILE; cchBuffer: UINT; lpszDescription: LPWSTR): UINT; stdcall;
  1628. {$EXTERNALSYM GetEnhMetaFileDescription}
  1629. {$ELSE}
  1630. function GetEnhMetaFileDescription(hemf: HENHMETAFILE; cchBuffer: UINT; lpszDescription: LPSTR): UINT; stdcall;
  1631. {$EXTERNALSYM GetEnhMetaFileDescription}
  1632. {$ENDIF}
  1633. function GetEnhMetaFileHeader(hemf: HENHMETAFILE; cbBuffer: UINT; lpemh: LPENHMETAHEADER ): UINT; stdcall;
  1634. {$EXTERNALSYM GetEnhMetaFileHeader}
  1635. function GetEnhMetaFilePaletteEntries(hemf: HENHMETAFILE; cEntries: UINT; lppe: LPPALETTEENTRY ): UINT; stdcall;
  1636. {$EXTERNALSYM GetEnhMetaFilePaletteEntries}
  1637. function GetEnhMetaFilePixelFormat(hemf: HENHMETAFILE; cbBuffer: UINT; var ppfd: PIXELFORMATDESCRIPTOR): UINT; stdcall;
  1638. {$EXTERNALSYM GetEnhMetaFilePixelFormat}
  1639. function GetWinMetaFileBits(hemf: HENHMETAFILE; cbBuffer: UINT; lpbBuffer: LPBYTE; fnMapMode: Integer; hdcRef: HDC): UINT; stdcall;
  1640. {$EXTERNALSYM GetWinMetaFileBits}
  1641. function PlayEnhMetaFile(hdc: HDC; hemf: HENHMETAFILE; const lpRect: RECT): BOOL; stdcall;
  1642. {$EXTERNALSYM PlayEnhMetaFile}
  1643. function PlayEnhMetaFileRecord(hdc: HDC; lpHandleTable: LPHANDLETABLE; lpEnhMetaRecord: LPENHMETARECORD; nHandles: UINT): BOOL; stdcall;
  1644. {$EXTERNALSYM PlayEnhMetaFileRecord}
  1645. function SetEnhMetaFileBits(cbBuffer: UINT; lpData: LPBYTE): HENHMETAFILE; stdcall;
  1646. {$EXTERNALSYM SetEnhMetaFileBits}
  1647. function SetWinMetaFileBits(cbBuffer: UINT; lpbBuffer: LPBYTE; hdcRef: HDC; const lpmfp: METAFILEPICT): HENHMETAFILE; stdcall;
  1648. {$EXTERNALSYM SetWinMetaFileBits}
  1649. function GdiComment(hdc: HDC; cbSize: UINT; lpData: LPBYTE): BOOL; stdcall;
  1650. {$EXTERNALSYM GdiComment}
  1651. function GetTextMetricsA(hdc: HDC; var lptm: TEXTMETRICA): BOOL; stdcall;
  1652. {$EXTERNALSYM GetTextMetricsA}
  1653. function GetTextMetricsW(hdc: HDC; var lptm: TEXTMETRICW): BOOL; stdcall;
  1654. {$EXTERNALSYM GetTextMetricsW}
  1655. {$IFDEF UNICODE}
  1656. function GetTextMetrics(hdc: HDC; var lptm: TEXTMETRICW): BOOL; stdcall;
  1657. {$EXTERNALSYM GetTextMetrics}
  1658. {$ELSE}
  1659. function GetTextMetrics(hdc: HDC; var lptm: TEXTMETRICA): BOOL; stdcall;
  1660. {$EXTERNALSYM GetTextMetrics}
  1661. {$ENDIF}
  1662. // new GDI
  1663. type
  1664.   PDibSection = ^TDibSection;
  1665.   tagDIBSECTION = record
  1666.     dsBm: BITMAP;
  1667.     dsBmih: BITMAPINFOHEADER;
  1668.     dsBitfields: array [0..2] of DWORD;
  1669.     dshSection: HANDLE;
  1670.     dsOffset: DWORD;
  1671.   end;
  1672.   {$EXTERNALSYM tagDIBSECTION}
  1673.   DIBSECTION = tagDIBSECTION;
  1674.   {$EXTERNALSYM DIBSECTION}
  1675.   LPDIBSECTION = ^DIBSECTION;
  1676.   {$EXTERNALSYM LPDIBSECTION}
  1677.   TDibSection = DIBSECTION;
  1678. function AngleArc(hdc: HDC; X, Y: Integer; dwRadius: DWORD; eStartAngle, eSweepAngle: FLOAT): BOOL; stdcall;
  1679. {$EXTERNALSYM AngleArc}
  1680. function PolyPolyline(hdc: HDC; lppt: LPPOINT; lpdwPolyPoints: LPDWORD; cCount: DWORD): BOOL; stdcall;
  1681. {$EXTERNALSYM PolyPolyline}
  1682. function GetWorldTransform(hdc: HDC; lpXform: LPXFORM): BOOL; stdcall;
  1683. {$EXTERNALSYM GetWorldTransform}
  1684. function SetWorldTransform(hdc: HDC; lpXform: LPXFORM): BOOL; stdcall;
  1685. {$EXTERNALSYM SetWorldTransform}
  1686. function ModifyWorldTransform(hdc: HDC; lpXform: LPXFORM; iMode: DWORD): BOOL; stdcall;
  1687. {$EXTERNALSYM ModifyWorldTransform}
  1688. function CombineTransform(lpxformResult, lpXform1, lpXform2: LPXFORM): BOOL; stdcall;
  1689. {$EXTERNALSYM CombineTransform}
  1690. function CreateDIBSection(hdc: HDC; pbmi: LPBITMAPINFO; iUsage: UINT;
  1691.   ppvBits: PPVOID; hSection: HANDLE; dwOffset: DWORD): HBITMAP; stdcall;
  1692. {$EXTERNALSYM CreateDIBSection}
  1693. function GetDIBColorTable(hdc: HDC; uStartIndex, cEntries: UINT; pColors: PRGBQUAD): UINT; stdcall;
  1694. {$EXTERNALSYM GetDIBColorTable}
  1695. function SetDIBColorTable(hdc: HDC; uStartIndex, cEntries: UINT; pColors: PRGBQUAD): UINT; stdcall;
  1696. {$EXTERNALSYM SetDIBColorTable}
  1697. // Flags value for COLORADJUSTMENT
  1698. const
  1699.   CA_NEGATIVE   = $0001;
  1700.   {$EXTERNALSYM CA_NEGATIVE}
  1701.   CA_LOG_FILTER = $0002;
  1702.   {$EXTERNALSYM CA_LOG_FILTER}
  1703. // IlluminantIndex values
  1704.   ILLUMINANT_DEVICE_DEFAULT = 0;
  1705.   {$EXTERNALSYM ILLUMINANT_DEVICE_DEFAULT}
  1706.   ILLUMINANT_A              = 1;
  1707.   {$EXTERNALSYM ILLUMINANT_A}
  1708.   ILLUMINANT_B              = 2;
  1709.   {$EXTERNALSYM ILLUMINANT_B}
  1710.   ILLUMINANT_C              = 3;
  1711.   {$EXTERNALSYM ILLUMINANT_C}
  1712.   ILLUMINANT_D50            = 4;
  1713.   {$EXTERNALSYM ILLUMINANT_D50}
  1714.   ILLUMINANT_D55            = 5;
  1715.   {$EXTERNALSYM ILLUMINANT_D55}
  1716.   ILLUMINANT_D65            = 6;
  1717.   {$EXTERNALSYM ILLUMINANT_D65}
  1718.   ILLUMINANT_D75            = 7;
  1719.   {$EXTERNALSYM ILLUMINANT_D75}
  1720.   ILLUMINANT_F2             = 8;
  1721.   {$EXTERNALSYM ILLUMINANT_F2}
  1722.   ILLUMINANT_MAX_INDEX      = ILLUMINANT_F2;
  1723.   {$EXTERNALSYM ILLUMINANT_MAX_INDEX}
  1724.   ILLUMINANT_TUNGSTEN    = ILLUMINANT_A;
  1725.   {$EXTERNALSYM ILLUMINANT_TUNGSTEN}
  1726.   ILLUMINANT_DAYLIGHT    = ILLUMINANT_C;
  1727.   {$EXTERNALSYM ILLUMINANT_DAYLIGHT}
  1728.   ILLUMINANT_FLUORESCENT = ILLUMINANT_F2;
  1729.   {$EXTERNALSYM ILLUMINANT_FLUORESCENT}
  1730.   ILLUMINANT_NTSC        = ILLUMINANT_C;
  1731.   {$EXTERNALSYM ILLUMINANT_NTSC}
  1732. // Min and max for RedGamma, GreenGamma, BlueGamma
  1733.   RGB_GAMMA_MIN = WORD(02500);
  1734.   {$EXTERNALSYM RGB_GAMMA_MIN}
  1735.   RGB_GAMMA_MAX = WORD(65000);
  1736.   {$EXTERNALSYM RGB_GAMMA_MAX}
  1737. // Min and max for ReferenceBlack and ReferenceWhite
  1738.   REFERENCE_WHITE_MIN = WORD(6000);
  1739.   {$EXTERNALSYM REFERENCE_WHITE_MIN}
  1740.   REFERENCE_WHITE_MAX = WORD(10000);
  1741.   {$EXTERNALSYM REFERENCE_WHITE_MAX}
  1742.   REFERENCE_BLACK_MIN = WORD(0);
  1743.   {$EXTERNALSYM REFERENCE_BLACK_MIN}
  1744.   REFERENCE_BLACK_MAX = WORD(4000);
  1745.   {$EXTERNALSYM REFERENCE_BLACK_MAX}
  1746. // Min and max for Contrast, Brightness, Colorfulness, RedGreenTint
  1747.   COLOR_ADJ_MIN = SHORT(-100);
  1748.   {$EXTERNALSYM COLOR_ADJ_MIN}
  1749.   COLOR_ADJ_MAX = SHORT(100);
  1750.   {$EXTERNALSYM COLOR_ADJ_MAX}
  1751. type
  1752.   PColorAdjustment = ^TColorAdjustment;
  1753.   tagCOLORADJUSTMENT = record
  1754.     caSize: WORD;
  1755.     caFlags: WORD;
  1756.     caIlluminantIndex: WORD;
  1757.     caRedGamma: WORD;
  1758.     caGreenGamma: WORD;
  1759.     caBlueGamma: WORD;
  1760.     caReferenceBlack: WORD;
  1761.     caReferenceWhite: WORD;
  1762.     caContrast: SHORT;
  1763.     caBrightness: SHORT;
  1764.     caColorfulness: SHORT;
  1765.     caRedGreenTint: SHORT;
  1766.   end;
  1767.   {$EXTERNALSYM tagCOLORADJUSTMENT}
  1768.   COLORADJUSTMENT = tagCOLORADJUSTMENT;
  1769.   {$EXTERNALSYM COLORADJUSTMENT}
  1770.   LPCOLORADJUSTMENT = ^COLORADJUSTMENT;
  1771.   {$EXTERNALSYM LPCOLORADJUSTMENT}
  1772.   TColorAdjustment = COLORADJUSTMENT;
  1773. function SetColorAdjustment(hdc: HDC; lpca: LPCOLORADJUSTMENT): BOOL; stdcall;
  1774. {$EXTERNALSYM SetColorAdjustment}
  1775. function GetColorAdjustment(hdc: HDC; lpca: LPCOLORADJUSTMENT): BOOL; stdcall;
  1776. {$EXTERNALSYM GetColorAdjustment}
  1777. function CreateHalftonePalette(hdc: HDC): HPALETTE; stdcall;
  1778. {$EXTERNALSYM CreateHalftonePalette}
  1779. type
  1780.   ABORTPROC = function (hdc: HDC; iError: Integer): BOOL; stdcall;
  1781.   {$EXTERNALSYM ABORTPROC}
  1782.   PDocInfoA = ^TDocInfoA;
  1783.   _DOCINFOA = record
  1784.     cbSize: Integer;
  1785.     lpszDocName: LPCSTR;
  1786.     lpszOutput: LPCSTR;
  1787.     {$IFDEF WINVER_0400_GREATER}
  1788.     lpszDatatype: LPCSTR;
  1789.     fwType: DWORD;
  1790.     {$ENDIF}
  1791.   end;
  1792.   {$EXTERNALSYM _DOCINFOA}
  1793.   DOCINFOA = _DOCINFOA;
  1794.   {$EXTERNALSYM DOCINFOA}
  1795.   LPDOCINFOA = ^DOCINFOA;
  1796.   {$EXTERNALSYM LPDOCINFOA}
  1797.   TDocInfoA = _DOCINFOA;
  1798.   PDocInfoW = ^TDocInfoW;
  1799.   _DOCINFOW = record
  1800.     cbSize: Integer;
  1801.     lpszDocName: LPCWSTR;
  1802.     lpszOutput: LPCWSTR;
  1803.     {$IFDEF WINVER_0400_GREATER}
  1804.     lpszDatatype: LPCWSTR;
  1805.     fwType: DWORD;
  1806.     {$ENDIF}
  1807.   end;
  1808.   {$EXTERNALSYM _DOCINFOW}
  1809.   DOCINFOW = _DOCINFOW;
  1810.   {$EXTERNALSYM DOCINFOW}
  1811.   LPDOCINFOW = ^DOCINFOW;
  1812.   {$EXTERNALSYM LPDOCINFOW}
  1813.   TDocInfoW = _DOCINFOW;
  1814. {$IFDEF UNICODE}
  1815.   DOCINFO = DOCINFOW;
  1816.   {$EXTERNALSYM DOCINFO}
  1817.   LPDOCINFO = LPDOCINFOW;
  1818.   {$EXTERNALSYM LPDOCINFO}
  1819.   TDocInfo = TDocInfoW;
  1820.   PDocInfo = PDocInfoW;
  1821. {$ELSE}
  1822.   DOCINFO = DOCINFOA;
  1823.   {$EXTERNALSYM DOCINFO}
  1824.   LPDOCINFO = LPDOCINFOA;
  1825.   {$EXTERNALSYM LPDOCINFO}
  1826.   TDocInfo = TDocInfoA;
  1827.   PDocInfo = PDocInfoA;
  1828. {$ENDIF}
  1829. const
  1830.   DI_APPBANDING            = $00000001;
  1831.   {$EXTERNALSYM DI_APPBANDING}
  1832.   DI_ROPS_READ_DESTINATION = $00000002;
  1833.   {$EXTERNALSYM DI_ROPS_READ_DESTINATION}
  1834. function StartDocA(hdc: HDC; const lpdi: DOCINFOA): Integer; stdcall;
  1835. {$EXTERNALSYM StartDocA}
  1836. function StartDocW(hdc: HDC; const lpdi: DOCINFOW): Integer; stdcall;
  1837. {$EXTERNALSYM StartDocW}
  1838. {$IFDEF UNICODE}
  1839. function StartDoc(hdc: HDC; const lpdi: DOCINFOW): Integer; stdcall;
  1840. {$EXTERNALSYM StartDoc}
  1841. {$ELSE}
  1842. function StartDoc(hdc: HDC; const lpdi: DOCINFOA): Integer; stdcall;
  1843. {$EXTERNALSYM StartDoc}
  1844. {$ENDIF}
  1845. function EndDoc(dc: HDC): Integer; stdcall;
  1846. {$EXTERNALSYM EndDoc}
  1847. function StartPage(dc: HDC): Integer; stdcall;
  1848. {$EXTERNALSYM StartPage}
  1849. function EndPage(dc: HDC): Integer; stdcall;
  1850. {$EXTERNALSYM EndPage}
  1851. function AbortDoc(dc: HDC): Integer; stdcall;
  1852. {$EXTERNALSYM AbortDoc}
  1853. function SetAbortProc(dc: HDC; lpAbortProc: ABORTPROC): Integer; stdcall;
  1854. {$EXTERNALSYM SetAbortProc}
  1855. function AbortPath(hdc: HDC): BOOL; stdcall;
  1856. {$EXTERNALSYM AbortPath}
  1857. function ArcTo(hdc: HDC; nLeftRect, nTopRect, nRightRect, nBottomRect, nXRadial1, nYRadial1, nXRadial2, nYRadial2: Integer): BOOL; stdcall;
  1858. {$EXTERNALSYM ArcTo}
  1859. function BeginPath(hdc: HDC): BOOL; stdcall;
  1860. {$EXTERNALSYM BeginPath}
  1861. function CloseFigure(hdc: HDC): BOOL; stdcall;
  1862. {$EXTERNALSYM CloseFigure}
  1863. function EndPath(hdc: HDC): BOOL; stdcall;
  1864. {$EXTERNALSYM EndPath}
  1865. function FillPath(hdc: HDC): BOOL; stdcall;
  1866. {$EXTERNALSYM FillPath}
  1867. function FlattenPath(hdc: HDC): BOOL; stdcall;
  1868. {$EXTERNALSYM FlattenPath}
  1869. function GetPath(hdc: HDC; lpPoints: LPPOINT; lpTypes: LPBYTE; nSize: Integer): Integer; stdcall;
  1870. {$EXTERNALSYM GetPath}
  1871. function PathToRegion(hdc: HDC): HRGN; stdcall;
  1872. {$EXTERNALSYM PathToRegion}
  1873. function PolyDraw(hdc: HDC; lppt: LPPOINT; lpbTypes: LPBYTE; cCount: Integer): BOOL; stdcall;
  1874. {$EXTERNALSYM PolyDraw}
  1875. function SelectClipPath(hdc: HDC; iMode: Integer): BOOL; stdcall;
  1876. {$EXTERNALSYM SelectClipPath}
  1877. function SetArcDirection(hdc: HDC; ArcDirection: Integer): Integer; stdcall;
  1878. {$EXTERNALSYM SetArcDirection}
  1879. function SetMiterLimit(hdc: HDC; eNewLimit: FLOAT; peOldLimit: PFLOAT): BOOL; stdcall;
  1880. {$EXTERNALSYM SetMiterLimit}
  1881. function StrokeAndFillPath(hdc: HDC): BOOL; stdcall;
  1882. {$EXTERNALSYM StrokeAndFillPath}
  1883. function StrokePath(hdc: HDC): BOOL; stdcall;
  1884. {$EXTERNALSYM StrokePath}
  1885. function WidenPath(hdc: HDC): BOOL; stdcall;
  1886. {$EXTERNALSYM WidenPath}
  1887. function ExtCreatePen(dwPenStyle, dwWidth: DWORD; const lplb: LOGBRUSH; dwStyleCount: DWORD; lpStyle: DWORD): HPEN; stdcall;
  1888. {$EXTERNALSYM ExtCreatePen}
  1889. function GetMiterLimit(hdc: HDC; var peLimit: FLOAT): BOOL; stdcall;
  1890. {$EXTERNALSYM GetMiterLimit}
  1891. function GetArcDirection(hdc: HDC): Integer; stdcall;
  1892. {$EXTERNALSYM GetArcDirection}
  1893. function GetObjectA(hgdiobj: HGDIOBJ; cbBuffer: Integer; lpvObject: LPVOID): Integer; stdcall;
  1894. {$EXTERNALSYM GetObjectA}
  1895. function GetObjectW(hgdiobj: HGDIOBJ; cbBuffer: Integer; lpvObject: LPVOID): Integer; stdcall;
  1896. {$EXTERNALSYM GetObjectW}
  1897. {$IFDEF UNICODE}
  1898. function GetObject(hgdiobj: HGDIOBJ; cbBuffer: Integer; lpvObject: LPVOID): Integer; stdcall;
  1899. {$EXTERNALSYM GetObject}
  1900. {$ELSE}
  1901. function GetObject(hgdiobj: HGDIOBJ; cbBuffer: Integer; lpvObject: LPVOID): Integer; stdcall;
  1902. {$EXTERNALSYM GetObject}
  1903. {$ENDIF}
  1904. function MoveToEx(hdc: HDC; X, Y: Integer; lpPoint: LPPOINT): BOOL; stdcall;
  1905. {$EXTERNALSYM MoveToEx}
  1906. function TextOutA(hdc: HDC; nXStart, nYStart: Integer; lpString: LPCSTR; cbString: Integer): BOOL; stdcall;
  1907. {$EXTERNALSYM TextOutA}
  1908. function TextOutW(hdc: HDC; nXStart, nYStart: Integer; lpString: LPCWSTR; cbString: Integer): BOOL; stdcall;
  1909. {$EXTERNALSYM TextOutW}
  1910. {$IFDEF UNICODE}
  1911. function TextOut(hdc: HDC; nXStart, nYStart: Integer; lpString: LPCWSTR; cbString: Integer): BOOL; stdcall;
  1912. {$EXTERNALSYM TextOut}
  1913. {$ELSE}
  1914. function TextOut(hdc: HDC; nXStart, nYStart: Integer; lpString: LPCSTR; cbString: Integer): BOOL; stdcall;
  1915. {$EXTERNALSYM TextOut}
  1916. {$ENDIF}
  1917. function ExtTextOutA(hdc: HDC; X, Y: Integer; fuOptions: UINT; lprc: LPRECT; lpString: LPCSTR; cbCount: UINT; lpDx: LPINT): BOOL; stdcall;
  1918. {$EXTERNALSYM ExtTextOutA}
  1919. function ExtTextOutW(hdc: HDC; X, Y: Integer; fuOptions: UINT; lprc: LPRECT; lpString: LPCWSTR; cbCount: UINT; lpDx: LPINT): BOOL; stdcall;
  1920. {$EXTERNALSYM ExtTextOutW}
  1921. {$IFDEF UNICODE}
  1922. function ExtTextOut(hdc: HDC; X, Y: Integer; fuOptions: UINT; lprc: LPRECT; lpString: LPCWSTR; cbCount: UINT; lpDx: LPINT): BOOL; stdcall;
  1923. {$EXTERNALSYM ExtTextOut}
  1924. {$ELSE}
  1925. function ExtTextOut(hdc: HDC; X, Y: Integer; fuOptions: UINT; lprc: LPRECT; lpString: LPCSTR; cbCount: UINT; lpDx: LPINT): BOOL; stdcall;
  1926. {$EXTERNALSYM ExtTextOut}
  1927. {$ENDIF}
  1928. function PolyTextOutA(hdc: HDC; pptxt: LPPOLYTEXTA; cStrings: Integer): BOOL; stdcall;
  1929. {$EXTERNALSYM PolyTextOutA}
  1930. function PolyTextOutW(hdc: HDC; pptxt: LPPOLYTEXTW; cStrings: Integer): BOOL; stdcall;
  1931. {$EXTERNALSYM PolyTextOutW}
  1932. {$IFDEF UNICODE}
  1933. function PolyTextOut(hdc: HDC; pptxt: LPPOLYTEXTW; cStrings: Integer): BOOL; stdcall;
  1934. {$EXTERNALSYM PolyTextOut}
  1935. {$ELSE}
  1936. function PolyTextOut(hdc: HDC; pptxt: LPPOLYTEXTA; cStrings: Integer): BOOL; stdcall;
  1937. {$EXTERNALSYM PolyTextOut}
  1938. {$ENDIF}
  1939. function CreatePolygonRgn(lppt: LPPOINT; cPoints, fnPolyFillMode: Integer): HRGN; stdcall;
  1940. {$EXTERNALSYM CreatePolygonRgn}
  1941. function DPtoLP(hdc: HDC; lpPoints: LPPOINT; nCount: Integer): BOOL; stdcall;
  1942. {$EXTERNALSYM DPtoLP}
  1943. function LPtoDP(hdc: HDC; lpPoints: LPPOINT; nCount: Integer): BOOL; stdcall;
  1944. {$EXTERNALSYM LPtoDP}
  1945. function Polygon(hdc: HDC; lpPoints: LPPOINT; nCount: Integer): BOOL; stdcall;
  1946. {$EXTERNALSYM Polygon}
  1947. function Polyline(hdc: HDC; lppt: LPPOINT; nCount: Integer): BOOL; stdcall;
  1948. {$EXTERNALSYM Polyline}
  1949. function PolyBezier(hdc: HDC; lppt: LPPOINT; cPoints: DWORD): BOOL; stdcall;
  1950. {$EXTERNALSYM PolyBezier}
  1951. function PolyBezierTo(hdc: HDC; lppt: LPPOINT; cCount: DWORD): BOOL; stdcall;
  1952. {$EXTERNALSYM PolyBezierTo}
  1953. function PolylineTo(hdc: HDC; lppt: LPPOINT; cCount: DWORD): BOOL; stdcall;
  1954. {$EXTERNALSYM PolylineTo}
  1955. function SetViewportExtEx(hdc: HDC; nXExtend, nYExtend: Integer; lpSize: LPSIZE): BOOL; stdcall;
  1956. {$EXTERNALSYM SetViewportExtEx}
  1957. function SetViewportOrgEx(hdc: HDC; X, Y: Integer; lpPoint: LPPOINT): BOOL; stdcall;
  1958. {$EXTERNALSYM SetViewportOrgEx}
  1959. function SetWindowExtEx(hdc: HDC; nXExtend, nYExtend: Integer; lpSize: LPSIZE): BOOL; stdcall;
  1960. {$EXTERNALSYM SetWindowExtEx}
  1961. function SetWindowOrgEx(hdc: HDC; X, Y: Integer; lpPoint: LPPOINT): BOOL; stdcall;
  1962. {$EXTERNALSYM SetWindowOrgEx}
  1963. function OffsetViewportOrgEx(hdc: HDC; nXOffset, nYOffset: Integer; lpPoint: LPPOINT): BOOL; stdcall;
  1964. {$EXTERNALSYM OffsetViewportOrgEx}
  1965. function OffsetWindowOrgEx(hdc: HDC; nXOffset, nYOffset: Integer; lpPoint: LPPOINT): BOOL; stdcall;
  1966. {$EXTERNALSYM OffsetWindowOrgEx}
  1967. function ScaleViewportExtEx(hdc: HDC; Xnum, Xdenom, Ynum, Ydenom: Integer; lpSize: LPSIZE): BOOL; stdcall;
  1968. {$EXTERNALSYM ScaleViewportExtEx}
  1969. function ScaleWindowExtEx(hdc: HDC; Xnum, Xdenom, Ynum, Ydenom: Integer; lpSize: LPSIZE): BOOL; stdcall;
  1970. {$EXTERNALSYM ScaleWindowExtEx}
  1971. function SetBitmapDimensionEx(hBitmap: HBITMAP; nWidth, nHeight: Integer; lpSize: LPSIZE): BOOL; stdcall;
  1972. {$EXTERNALSYM SetBitmapDimensionEx}
  1973. function SetBrushOrgEx(hdc: HDC; nXOrg, nYOrg: Integer; lppt: LPPOINT): BOOL; stdcall;
  1974. {$EXTERNALSYM SetBrushOrgEx}
  1975. function GetTextFaceA(hdc: HDC; nCount: Integer; lpFaceName: LPSTR): Integer; stdcall;
  1976. {$EXTERNALSYM GetTextFaceA}
  1977. function GetTextFaceW(hdc: HDC; nCount: Integer; lpFaceName: LPWSTR): Integer; stdcall;
  1978. {$EXTERNALSYM GetTextFaceW}
  1979. {$IFDEF UNICODE}
  1980. function GetTextFace(hdc: HDC; nCount: Integer; lpFaceName: LPWSTR): Integer; stdcall;
  1981. {$EXTERNALSYM GetTextFace}
  1982. {$ELSE}
  1983. function GetTextFace(hdc: HDC; nCount: Integer; lpFaceName: LPSTR): Integer; stdcall;
  1984. {$EXTERNALSYM GetTextFace}
  1985. {$ENDIF}
  1986. const
  1987.   FONTMAPPER_MAX = 10;
  1988.   {$EXTERNALSYM FONTMAPPER_MAX}
  1989. type
  1990.   PKerningPair = ^TKerningPair;
  1991.   tagKERNINGPAIR = record
  1992.     wFirst: WORD;
  1993.     wSecond: WORD;
  1994.     iKernAmount: Integer;
  1995.   end;
  1996.   {$EXTERNALSYM tagKERNINGPAIR}
  1997.   KERNINGPAIR = tagKERNINGPAIR;
  1998.   {$EXTERNALSYM KERNINGPAIR}
  1999.   LPKERNINGPAIR = ^KERNINGPAIR;
  2000.   {$EXTERNALSYM LPKERNINGPAIR}
  2001.   TKerningPair = KERNINGPAIR;
  2002. function GetKerningPairsA(hDc: HDC; nNumPairs: DWORD; lpkrnpair: LPKERNINGPAIR): DWORD; stdcall;
  2003. {$EXTERNALSYM GetKerningPairsA}
  2004. function GetKerningPairsW(hDc: HDC; nNumPairs: DWORD; lpkrnpair: LPKERNINGPAIR): DWORD; stdcall;
  2005. {$EXTERNALSYM GetKerningPairsW}
  2006. {$IFDEF UNICODE}
  2007. function GetKerningPairs(hDc: HDC; nNumPairs: DWORD; lpkrnpair: LPKERNINGPAIR): DWORD; stdcall;
  2008. {$EXTERNALSYM GetKerningPairs}
  2009. {$ELSE}
  2010. function GetKerningPairs(hDc: HDC; nNumPairs: DWORD; lpkrnpair: LPKERNINGPAIR): DWORD; stdcall;
  2011. {$EXTERNALSYM GetKerningPairs}
  2012. {$ENDIF}
  2013. function GetDCOrgEx(hdc: HDC; lpPoint: LPPOINT): BOOL; stdcall;
  2014. {$EXTERNALSYM GetDCOrgEx}
  2015. function FixBrushOrgEx(hDc: HDC; I1, I2: Integer; lpPoint: LPPOINT): BOOL; stdcall;
  2016. {$EXTERNALSYM FixBrushOrgEx}
  2017. function UnrealizeObject(hgdiobj: HGDIOBJ): BOOL; stdcall;
  2018. {$EXTERNALSYM UnrealizeObject}
  2019. function GdiFlush: BOOL; stdcall;
  2020. {$EXTERNALSYM GdiFlush}
  2021. function GdiSetBatchLimit(dwLimit: DWORD): DWORD; stdcall;
  2022. {$EXTERNALSYM GdiSetBatchLimit}
  2023. function GdiGetBatchLimit: DWORD; stdcall;
  2024. {$EXTERNALSYM GdiGetBatchLimit}
  2025. const
  2026.   ICM_OFF            = 1;
  2027.   {$EXTERNALSYM ICM_OFF}
  2028.   ICM_ON             = 2;
  2029.   {$EXTERNALSYM ICM_ON}
  2030.   ICM_QUERY          = 3;
  2031.   {$EXTERNALSYM ICM_QUERY}
  2032.   ICM_DONE_OUTSIDEDC = 4;
  2033.   {$EXTERNALSYM ICM_DONE_OUTSIDEDC}
  2034. type
  2035.   ICMENUMPROCA = function (lpszFileName: LPSTR; lParam: LPARAM): Integer; stdcall;
  2036.   {$EXTERNALSYM ICMENUMPROCA}
  2037.   ICMENUMPROCW = function (lpszFileName: LPWSTR; lParam: LPARAM): Integer; stdcall;
  2038.   {$EXTERNALSYM ICMENUMPROCW}
  2039. {$IFDEF UNICODE}
  2040.   ICMENUMPROC = function (lpszFileName: LPWSTR; lParam: LPARAM): Integer; stdcall;
  2041.   {$EXTERNALSYM ICMENUMPROC}
  2042. {$ELSE}
  2043.   ICMENUMPROC = function (lpszFileName: LPSTR; lParam: LPARAM): Integer; stdcall;
  2044.   {$EXTERNALSYM ICMENUMPROC}
  2045. {$ENDIF}
  2046. function SetICMMode(hDc: HDC; iEnableICM: Integer): Integer; stdcall;
  2047. {$EXTERNALSYM SetICMMode}
  2048. function CheckColorsInGamut(hDc: HDC; lpRGBTriples, lpBuffer: LPVOID; nCount: DWORD): BOOL; stdcall;
  2049. {$EXTERNALSYM CheckColorsInGamut}
  2050. function GetColorSpace(hDc: HDC): HCOLORSPACE; stdcall;
  2051. {$EXTERNALSYM GetColorSpace}
  2052. function GetLogColorSpaceA(hColorSpace: HCOLORSPACE; lpBuffer: LPLOGCOLORSPACEA; nSize: DWORD): BOOL; stdcall;
  2053. {$EXTERNALSYM GetLogColorSpaceA}
  2054. function GetLogColorSpaceW(hColorSpace: HCOLORSPACE; lpBuffer: LPLOGCOLORSPACEW; nSize: DWORD): BOOL; stdcall;
  2055. {$EXTERNALSYM GetLogColorSpaceW}
  2056. {$IFDEF UNICODE}
  2057. function GetLogColorSpace(hColorSpace: HCOLORSPACE; lpBuffer: LPLOGCOLORSPACEW; nSize: DWORD): BOOL; stdcall;
  2058. {$EXTERNALSYM GetLogColorSpace}
  2059. {$ELSE}
  2060. function GetLogColorSpace(hColorSpace: HCOLORSPACE; lpBuffer: LPLOGCOLORSPACEA; nSize: DWORD): BOOL; stdcall;
  2061. {$EXTERNALSYM GetLogColorSpace}
  2062. {$ENDIF}
  2063. function CreateColorSpaceA(lpLogColorSpace: LPLOGCOLORSPACEA): HCOLORSPACE; stdcall;
  2064. {$EXTERNALSYM CreateColorSpaceA}
  2065. function CreateColorSpaceW(lpLogColorSpace: LPLOGCOLORSPACEW): HCOLORSPACE; stdcall;
  2066. {$EXTERNALSYM CreateColorSpaceW}
  2067. {$IFDEF UNICODE}
  2068. function CreateColorSpace(lpLogColorSpace: LPLOGCOLORSPACEW): HCOLORSPACE; stdcall;
  2069. {$EXTERNALSYM CreateColorSpace}
  2070. {$ELSE}
  2071. function CreateColorSpace(lpLogColorSpace: LPLOGCOLORSPACEA): HCOLORSPACE; stdcall;
  2072. {$EXTERNALSYM CreateColorSpace}
  2073. {$ENDIF}
  2074. function SetColorSpace(hDc: HDC; hColorSpace: HCOLORSPACE): HCOLORSPACE; stdcall;
  2075. {$EXTERNALSYM SetColorSpace}
  2076. function DeleteColorSpace(hColorSpace: HCOLORSPACE): BOOL; stdcall;
  2077. {$EXTERNALSYM DeleteColorSpace}
  2078. function GetICMProfileA(hDc: HDC; lpcbName: LPDWORD; lpszFilename: LPSTR): BOOL; stdcall;
  2079. {$EXTERNALSYM GetICMProfileA}
  2080. function GetICMProfileW(hDc: HDC; lpcbName: LPDWORD; lpszFilename: LPWSTR): BOOL; stdcall;
  2081. {$EXTERNALSYM GetICMProfileW}
  2082. {$IFDEF UNICODE}
  2083. function GetICMProfile(hDc: HDC; lpcbName: LPDWORD; lpszFilename: LPWSTR): BOOL; stdcall;
  2084. {$EXTERNALSYM GetICMProfile}
  2085. {$ELSE}
  2086. function GetICMProfile(hDc: HDC; lpcbName: LPDWORD; lpszFilename: LPSTR): BOOL; stdcall;
  2087. {$EXTERNALSYM GetICMProfile}
  2088. {$ENDIF}
  2089. function SetICMProfileA(hDc: HDC; lpFileName: LPSTR): BOOL; stdcall;
  2090. {$EXTERNALSYM SetICMProfileA}
  2091. function SetICMProfileW(hDc: HDC; lpFileName: LPWSTR): BOOL; stdcall;
  2092. {$EXTERNALSYM SetICMProfileW}
  2093. {$IFDEF UNICODE}
  2094. function SetICMProfile(hDc: HDC; lpFileName: LPWSTR): BOOL; stdcall;
  2095. {$EXTERNALSYM SetICMProfile}
  2096. {$ELSE}
  2097. function SetICMProfile(hDc: HDC; lpFileName: LPSTR): BOOL; stdcall;
  2098. {$EXTERNALSYM SetICMProfile}
  2099. {$ENDIF}
  2100. function GetDeviceGammaRamp(hDc: HDC; lpRamp: LPVOID): BOOL; stdcall;
  2101. {$EXTERNALSYM GetDeviceGammaRamp}
  2102. function SetDeviceGammaRamp(hDc: HDC; lpRamp: LPVOID): BOOL; stdcall;
  2103. {$EXTERNALSYM SetDeviceGammaRamp}
  2104. function ColorMatchToTarget(hDc, hdcTarget: HDC; uiAction: DWORD): BOOL; stdcall;
  2105. {$EXTERNALSYM ColorMatchToTarget}
  2106. function EnumICMProfilesA(hDc: HDC; lpEnumProc: ICMENUMPROCA; lParam: LPARAM): Integer; stdcall;
  2107. {$EXTERNALSYM EnumICMProfilesA}
  2108. function EnumICMProfilesW(hDc: HDC; lpEnumProc: ICMENUMPROCW; lParam: LPARAM): Integer; stdcall;
  2109. {$EXTERNALSYM EnumICMProfilesW}
  2110. {$IFDEF UNICODE}
  2111. function EnumICMProfiles(hDc: HDC; lpEnumProc: ICMENUMPROCW; lParam: LPARAM): Integer; stdcall;
  2112. {$EXTERNALSYM EnumICMProfiles}
  2113. {$ELSE}
  2114. function EnumICMProfiles(hDc: HDC; lpEnumProc: ICMENUMPROCA; lParam: LPARAM): Integer; stdcall;
  2115. {$EXTERNALSYM EnumICMProfiles}
  2116. {$ENDIF}
  2117. function UpdateICMRegKeyA(dwReserved: DWORD; lpszCMID, lpszFileName: LPSTR; nCommand: UINT): BOOL; stdcall;
  2118. {$EXTERNALSYM UpdateICMRegKeyA}
  2119. function UpdateICMRegKeyW(dwReserved: DWORD; lpszCMID, lpszFileName: LPWSTR; nCommand: UINT): BOOL; stdcall;
  2120. {$EXTERNALSYM UpdateICMRegKeyW}
  2121. {$IFDEF UNICODE}
  2122. function UpdateICMRegKey(dwReserved: DWORD; lpszCMID, lpszFileName: LPWSTR; nCommand: UINT): BOOL; stdcall;
  2123. {$EXTERNALSYM UpdateICMRegKey}
  2124. {$ELSE}
  2125. function UpdateICMRegKey(dwReserved: DWORD; lpszCMID, lpszFileName: LPSTR; nCommand: UINT): BOOL; stdcall;
  2126. {$EXTERNALSYM UpdateICMRegKey}
  2127. {$ENDIF}
  2128. function ColorCorrectPalette(hDc: HDC; hColorPalette: HPALETTE; dwFirstEntry, dwNumOfEntries: DWORD): BOOL; stdcall;
  2129. {$EXTERNALSYM ColorCorrectPalette}
  2130. // Enhanced metafile constants.
  2131. const
  2132.   ENHMETA_SIGNATURE = $464D4520;
  2133.   {$EXTERNALSYM ENHMETA_SIGNATURE}
  2134. // Stock object flag used in the object handle index in the enhanced
  2135. // metafile records.
  2136. // E.g. The object handle index (META_STOCK_OBJECT | BLACK_BRUSH)
  2137. // represents the stock object BLACK_BRUSH.
  2138.   ENHMETA_STOCK_OBJECT = DWORD($80000000);
  2139.   {$EXTERNALSYM ENHMETA_STOCK_OBJECT}
  2140. // Enhanced metafile record types.
  2141.   EMR_HEADER               = 1;
  2142.   {$EXTERNALSYM EMR_HEADER}
  2143.   EMR_POLYBEZIER           = 2;
  2144.   {$EXTERNALSYM EMR_POLYBEZIER}
  2145.   EMR_POLYGON              = 3;
  2146.   {$EXTERNALSYM EMR_POLYGON}
  2147.   EMR_POLYLINE             = 4;
  2148.   {$EXTERNALSYM EMR_POLYLINE}
  2149.   EMR_POLYBEZIERTO         = 5;
  2150.   {$EXTERNALSYM EMR_POLYBEZIERTO}
  2151.   EMR_POLYLINETO           = 6;
  2152.   {$EXTERNALSYM EMR_POLYLINETO}
  2153.   EMR_POLYPOLYLINE         = 7;
  2154.   {$EXTERNALSYM EMR_POLYPOLYLINE}
  2155.   EMR_POLYPOLYGON          = 8;
  2156.   {$EXTERNALSYM EMR_POLYPOLYGON}
  2157.   EMR_SETWINDOWEXTEX       = 9;
  2158.   {$EXTERNALSYM EMR_SETWINDOWEXTEX}
  2159.   EMR_SETWINDOWORGEX       = 10;
  2160.   {$EXTERNALSYM EMR_SETWINDOWORGEX}
  2161.   EMR_SETVIEWPORTEXTEX     = 11;
  2162.   {$EXTERNALSYM EMR_SETVIEWPORTEXTEX}
  2163.   EMR_SETVIEWPORTORGEX     = 12;
  2164.   {$EXTERNALSYM EMR_SETVIEWPORTORGEX}
  2165.   EMR_SETBRUSHORGEX        = 13;
  2166.   {$EXTERNALSYM EMR_SETBRUSHORGEX}
  2167.   EMR_EOF                  = 14;
  2168.   {$EXTERNALSYM EMR_EOF}
  2169.   EMR_SETPIXELV            = 15;
  2170.   {$EXTERNALSYM EMR_SETPIXELV}
  2171.   EMR_SETMAPPERFLAGS       = 16;
  2172.   {$EXTERNALSYM EMR_SETMAPPERFLAGS}
  2173.   EMR_SETMAPMODE           = 17;
  2174.   {$EXTERNALSYM EMR_SETMAPMODE}
  2175.   EMR_SETBKMODE            = 18;
  2176.   {$EXTERNALSYM EMR_SETBKMODE}
  2177.   EMR_SETPOLYFILLMODE      = 19;
  2178.   {$EXTERNALSYM EMR_SETPOLYFILLMODE}
  2179.   EMR_SETROP2              = 20;
  2180.   {$EXTERNALSYM EMR_SETROP2}
  2181.   EMR_SETSTRETCHBLTMODE    = 21;
  2182.   {$EXTERNALSYM EMR_SETSTRETCHBLTMODE}
  2183.   EMR_SETTEXTALIGN         = 22;
  2184.   {$EXTERNALSYM EMR_SETTEXTALIGN}
  2185.   EMR_SETCOLORADJUSTMENT   = 23;
  2186.   {$EXTERNALSYM EMR_SETCOLORADJUSTMENT}
  2187.   EMR_SETTEXTCOLOR         = 24;
  2188.   {$EXTERNALSYM EMR_SETTEXTCOLOR}
  2189.   EMR_SETBKCOLOR           = 25;
  2190.   {$EXTERNALSYM EMR_SETBKCOLOR}
  2191.   EMR_OFFSETCLIPRGN        = 26;
  2192.   {$EXTERNALSYM EMR_OFFSETCLIPRGN}
  2193.   EMR_MOVETOEX             = 27;
  2194.   {$EXTERNALSYM EMR_MOVETOEX}
  2195.   EMR_SETMETARGN           = 28;
  2196.   {$EXTERNALSYM EMR_SETMETARGN}
  2197.   EMR_EXCLUDECLIPRECT      = 29;
  2198.   {$EXTERNALSYM EMR_EXCLUDECLIPRECT}
  2199.   EMR_INTERSECTCLIPRECT    = 30;
  2200.   {$EXTERNALSYM EMR_INTERSECTCLIPRECT}
  2201.   EMR_SCALEVIEWPORTEXTEX   = 31;
  2202.   {$EXTERNALSYM EMR_SCALEVIEWPORTEXTEX}
  2203.   EMR_SCALEWINDOWEXTEX     = 32;
  2204.   {$EXTERNALSYM EMR_SCALEWINDOWEXTEX}
  2205.   EMR_SAVEDC               = 33;
  2206.   {$EXTERNALSYM EMR_SAVEDC}
  2207.   EMR_RESTOREDC            = 34;
  2208.   {$EXTERNALSYM EMR_RESTOREDC}
  2209.   EMR_SETWORLDTRANSFORM    = 35;
  2210.   {$EXTERNALSYM EMR_SETWORLDTRANSFORM}
  2211.   EMR_MODIFYWORLDTRANSFORM = 36;
  2212.   {$EXTERNALSYM EMR_MODIFYWORLDTRANSFORM}
  2213.   EMR_SELECTOBJECT         = 37;
  2214.   {$EXTERNALSYM EMR_SELECTOBJECT}
  2215.   EMR_CREATEPEN            = 38;
  2216.   {$EXTERNALSYM EMR_CREATEPEN}
  2217.   EMR_CREATEBRUSHINDIRECT  = 39;
  2218.   {$EXTERNALSYM EMR_CREATEBRUSHINDIRECT}
  2219.   EMR_DELETEOBJECT         = 40;
  2220.   {$EXTERNALSYM EMR_DELETEOBJECT}
  2221.   EMR_ANGLEARC             = 41;
  2222.   {$EXTERNALSYM EMR_ANGLEARC}
  2223.   EMR_ELLIPSE              = 42;
  2224.   {$EXTERNALSYM EMR_ELLIPSE}
  2225.   EMR_RECTANGLE            = 43;
  2226.   {$EXTERNALSYM EMR_RECTANGLE}
  2227.   EMR_ROUNDRECT            = 44;
  2228.   {$EXTERNALSYM EMR_ROUNDRECT}
  2229.   EMR_ARC                  = 45;
  2230.   {$EXTERNALSYM EMR_ARC}
  2231.   EMR_CHORD                = 46;
  2232.   {$EXTERNALSYM EMR_CHORD}
  2233.   EMR_PIE                  = 47;
  2234.   {$EXTERNALSYM EMR_PIE}
  2235.   EMR_SELECTPALETTE        = 48;
  2236.   {$EXTERNALSYM EMR_SELECTPALETTE}
  2237.   EMR_CREATEPALETTE        = 49;
  2238.   {$EXTERNALSYM EMR_CREATEPALETTE}
  2239.   EMR_SETPALETTEENTRIES    = 50;
  2240.   {$EXTERNALSYM EMR_SETPALETTEENTRIES}
  2241.   EMR_RESIZEPALETTE        = 51;
  2242.   {$EXTERNALSYM EMR_RESIZEPALETTE}
  2243.   EMR_REALIZEPALETTE       = 52;
  2244.   {$EXTERNALSYM EMR_REALIZEPALETTE}
  2245.   EMR_EXTFLOODFILL         = 53;
  2246.   {$EXTERNALSYM EMR_EXTFLOODFILL}
  2247.   EMR_LINETO               = 54;
  2248.   {$EXTERNALSYM EMR_LINETO}
  2249.   EMR_ARCTO                = 55;
  2250.   {$EXTERNALSYM EMR_ARCTO}
  2251.   EMR_POLYDRAW             = 56;
  2252.   {$EXTERNALSYM EMR_POLYDRAW}
  2253.   EMR_SETARCDIRECTION      = 57;
  2254.   {$EXTERNALSYM EMR_SETARCDIRECTION}
  2255.   EMR_SETMITERLIMIT        = 58;
  2256.   {$EXTERNALSYM EMR_SETMITERLIMIT}
  2257.   EMR_BEGINPATH            = 59;
  2258.   {$EXTERNALSYM EMR_BEGINPATH}
  2259.   EMR_ENDPATH              = 60;
  2260.   {$EXTERNALSYM EMR_ENDPATH}
  2261.   EMR_CLOSEFIGURE          = 61;
  2262.   {$EXTERNALSYM EMR_CLOSEFIGURE}
  2263.   EMR_FILLPATH             = 62;
  2264.   {$EXTERNALSYM EMR_FILLPATH}
  2265.   EMR_STROKEANDFILLPATH    = 63;
  2266.   {$EXTERNALSYM EMR_STROKEANDFILLPATH}
  2267.   EMR_STROKEPATH           = 64;
  2268.   {$EXTERNALSYM EMR_STROKEPATH}
  2269.   EMR_FLATTENPATH          = 65;
  2270.   {$EXTERNALSYM EMR_FLATTENPATH}
  2271.   EMR_WIDENPATH            = 66;
  2272.   {$EXTERNALSYM EMR_WIDENPATH}
  2273.   EMR_SELECTCLIPPATH       = 67;
  2274.   {$EXTERNALSYM EMR_SELECTCLIPPATH}
  2275.   EMR_ABORTPATH            = 68;
  2276.   {$EXTERNALSYM EMR_ABORTPATH}
  2277.   EMR_GDICOMMENT              = 70;
  2278.   {$EXTERNALSYM EMR_GDICOMMENT}
  2279.   EMR_FILLRGN                 = 71;
  2280.   {$EXTERNALSYM EMR_FILLRGN}
  2281.   EMR_FRAMERGN                = 72;
  2282.   {$EXTERNALSYM EMR_FRAMERGN}
  2283.   EMR_INVERTRGN               = 73;
  2284.   {$EXTERNALSYM EMR_INVERTRGN}
  2285.   EMR_PAINTRGN                = 74;
  2286.   {$EXTERNALSYM EMR_PAINTRGN}
  2287.   EMR_EXTSELECTCLIPRGN        = 75;
  2288.   {$EXTERNALSYM EMR_EXTSELECTCLIPRGN}
  2289.   EMR_BITBLT                  = 76;
  2290.   {$EXTERNALSYM EMR_BITBLT}
  2291.   EMR_STRETCHBLT              = 77;
  2292.   {$EXTERNALSYM EMR_STRETCHBLT}
  2293.   EMR_MASKBLT                 = 78;
  2294.   {$EXTERNALSYM EMR_MASKBLT}
  2295.   EMR_PLGBLT                  = 79;
  2296.   {$EXTERNALSYM EMR_PLGBLT}
  2297.   EMR_SETDIBITSTODEVICE       = 80;
  2298.   {$EXTERNALSYM EMR_SETDIBITSTODEVICE}
  2299.   EMR_STRETCHDIBITS           = 81;
  2300.   {$EXTERNALSYM EMR_STRETCHDIBITS}
  2301.   EMR_EXTCREATEFONTINDIRECTW  = 82;
  2302.   {$EXTERNALSYM EMR_EXTCREATEFONTINDIRECTW}
  2303.   EMR_EXTTEXTOUTA             = 83;
  2304.   {$EXTERNALSYM EMR_EXTTEXTOUTA}
  2305.   EMR_EXTTEXTOUTW             = 84;
  2306.   {$EXTERNALSYM EMR_EXTTEXTOUTW}
  2307.   EMR_POLYBEZIER16            = 85;
  2308.   {$EXTERNALSYM EMR_POLYBEZIER16}
  2309.   EMR_POLYGON16               = 86;
  2310.   {$EXTERNALSYM EMR_POLYGON16}
  2311.   EMR_POLYLINE16              = 87;
  2312.   {$EXTERNALSYM EMR_POLYLINE16}
  2313.   EMR_POLYBEZIERTO16          = 88;
  2314.   {$EXTERNALSYM EMR_POLYBEZIERTO16}
  2315.   EMR_POLYLINETO16            = 89;
  2316.   {$EXTERNALSYM EMR_POLYLINETO16}
  2317.   EMR_POLYPOLYLINE16          = 90;
  2318.   {$EXTERNALSYM EMR_POLYPOLYLINE16}
  2319.   EMR_POLYPOLYGON16           = 91;
  2320.   {$EXTERNALSYM EMR_POLYPOLYGON16}
  2321.   EMR_POLYDRAW16              = 92;
  2322.   {$EXTERNALSYM EMR_POLYDRAW16}
  2323.   EMR_CREATEMONOBRUSH         = 93;
  2324.   {$EXTERNALSYM EMR_CREATEMONOBRUSH}
  2325.   EMR_CREATEDIBPATTERNBRUSHPT = 94;
  2326.   {$EXTERNALSYM EMR_CREATEDIBPATTERNBRUSHPT}
  2327.   EMR_EXTCREATEPEN            = 95;
  2328.   {$EXTERNALSYM EMR_EXTCREATEPEN}
  2329.   EMR_POLYTEXTOUTA            = 96;
  2330.   {$EXTERNALSYM EMR_POLYTEXTOUTA}
  2331.   EMR_POLYTEXTOUTW            = 97;
  2332.   {$EXTERNALSYM EMR_POLYTEXTOUTW}
  2333.   EMR_SETICMMODE       = 98;
  2334.   {$EXTERNALSYM EMR_SETICMMODE}
  2335.   EMR_CREATECOLORSPACE = 99;
  2336.   {$EXTERNALSYM EMR_CREATECOLORSPACE}
  2337.   EMR_SETCOLORSPACE    = 100;
  2338.   {$EXTERNALSYM EMR_SETCOLORSPACE}
  2339.   EMR_DELETECOLORSPACE = 101;
  2340.   {$EXTERNALSYM EMR_DELETECOLORSPACE}
  2341.   EMR_GLSRECORD        = 102;
  2342.   {$EXTERNALSYM EMR_GLSRECORD}
  2343.   EMR_GLSBOUNDEDRECORD = 103;
  2344.   {$EXTERNALSYM EMR_GLSBOUNDEDRECORD}
  2345.   EMR_PIXELFORMAT      = 104;
  2346.   {$EXTERNALSYM EMR_PIXELFORMAT}
  2347.   EMR_RESERVED_105        = 105;
  2348.   {$EXTERNALSYM EMR_RESERVED_105}
  2349.   EMR_RESERVED_106        = 106;
  2350.   {$EXTERNALSYM EMR_RESERVED_106}
  2351.   EMR_RESERVED_107        = 107;
  2352.   {$EXTERNALSYM EMR_RESERVED_107}
  2353.   EMR_RESERVED_108        = 108;
  2354.   {$EXTERNALSYM EMR_RESERVED_108}
  2355.   EMR_RESERVED_109        = 109;
  2356.   {$EXTERNALSYM EMR_RESERVED_109}
  2357.   EMR_RESERVED_110        = 110;
  2358.   {$EXTERNALSYM EMR_RESERVED_110}
  2359.   EMR_COLORCORRECTPALETTE = 111;
  2360.   {$EXTERNALSYM EMR_COLORCORRECTPALETTE}
  2361.   EMR_SETICMPROFILEA      = 112;
  2362.   {$EXTERNALSYM EMR_SETICMPROFILEA}
  2363.   EMR_SETICMPROFILEW      = 113;
  2364.   {$EXTERNALSYM EMR_SETICMPROFILEW}
  2365.   EMR_ALPHABLEND          = 114;
  2366.   {$EXTERNALSYM EMR_ALPHABLEND}
  2367.   EMR_SETLAYOUT           = 115;
  2368.   {$EXTERNALSYM EMR_SETLAYOUT}
  2369.   EMR_TRANSPARENTBLT      = 116;
  2370.   {$EXTERNALSYM EMR_TRANSPARENTBLT}
  2371.   EMR_RESERVED_117        = 117;
  2372.   {$EXTERNALSYM EMR_RESERVED_117}
  2373.   EMR_GRADIENTFILL        = 118;
  2374.   {$EXTERNALSYM EMR_GRADIENTFILL}
  2375.   EMR_RESERVED_119        = 119;
  2376.   {$EXTERNALSYM EMR_RESERVED_119}
  2377.   EMR_RESERVED_120        = 120;
  2378.   {$EXTERNALSYM EMR_RESERVED_120}
  2379.   EMR_COLORMATCHTOTARGETW = 121;
  2380.   {$EXTERNALSYM EMR_COLORMATCHTOTARGETW}
  2381.   EMR_CREATECOLORSPACEW   = 122;
  2382.   {$EXTERNALSYM EMR_CREATECOLORSPACEW}
  2383.   EMR_MIN = 1;
  2384.   {$EXTERNALSYM EMR_MIN}
  2385. {$IFDEF WINVER_0500_GREATER}
  2386.   EMR_MAX = 122;
  2387.   {$EXTERNALSYM EMR_MAX}
  2388. {$ELSE}
  2389. {$IFDEF WINVER_0400_GREATER}
  2390.   EMR_MAX = 104;
  2391.   {$EXTERNALSYM EMR_MAX}
  2392. {$ELSE}
  2393.   EMR_MAX = 97;
  2394.   {$EXTERNALSYM EMR_MAX}
  2395. {$ENDIF}
  2396. {$ENDIF}
  2397. // Base record type for the enhanced metafile.
  2398. type
  2399.   PEmr = ^TEmr;
  2400.   tagEMR = record
  2401.     iType: DWORD; // Enhanced metafile record type
  2402.     nSize: DWORD; // Length of the record in bytes.
  2403.                   // This must be a multiple of 4.
  2404.   end;
  2405.   {$EXTERNALSYM tagEMR}
  2406.   EMR = tagEMR;
  2407.   {$EXTERNALSYM EMR}
  2408.   TEmr = EMR;
  2409. // Base text record type for the enhanced metafile.
  2410.   PEmrText = ^TEmrText;
  2411.   tagEMRTEXT = record
  2412.     ptlReference: POINTL;
  2413.     nChars: DWORD;
  2414.     offString: DWORD; // Offset to the string
  2415.     fOptions: DWORD;
  2416.     rcl: RECTL;
  2417.     offDx: DWORD; // Offset to the inter-character spacing array.
  2418.     // This is always given.
  2419.   end;
  2420.   {$EXTERNALSYM tagEMRTEXT}
  2421.   EMRTEXT = tagEMRTEXT;
  2422.   {$EXTERNALSYM EMRTEXT}
  2423.   TEmrText = EMRTEXT;
  2424. // Record structures for the enhanced metafile.
  2425.   PAbortPath = ^TAbortPath;
  2426.   tagABORTPATH = record
  2427.     emr: EMR;
  2428.   end;
  2429.   {$EXTERNALSYM tagABORTPATH}
  2430.   TAbortPath = tagABORTPATH;
  2431.   EMRABORTPATH = tagABORTPATH;
  2432.   {$EXTERNALSYM EMRABORTPATH}
  2433.   PEMRABORTPATH = ^EMRABORTPATH;
  2434.   {$EXTERNALSYM PEMRABORTPATH}
  2435.   EMRBEGINPATH = tagABORTPATH;
  2436.   {$EXTERNALSYM EMRBEGINPATH}
  2437.   PEMRBEGINPATH = ^EMRBEGINPATH;
  2438.   {$EXTERNALSYM PEMRBEGINPATH}
  2439.   EMRENDPATH = tagABORTPATH;
  2440.   {$EXTERNALSYM EMRENDPATH}
  2441.   PEMRENDPATH = ^EMRENDPATH;
  2442.   {$EXTERNALSYM PEMRENDPATH}
  2443.   EMRCLOSEFIGURE = tagABORTPATH;
  2444.   {$EXTERNALSYM EMRCLOSEFIGURE}
  2445.   PEMRCLOSEFIGURE = ^EMRCLOSEFIGURE;
  2446.   {$EXTERNALSYM PEMRCLOSEFIGURE}
  2447.   EMRFLATTENPATH = tagABORTPATH;
  2448.   {$EXTERNALSYM EMRFLATTENPATH}
  2449.   PEMRFLATTENPATH = ^EMRFLATTENPATH;
  2450.   {$EXTERNALSYM PEMRFLATTENPATH}
  2451.   EMRWIDENPATH = tagABORTPATH;
  2452.   {$EXTERNALSYM EMRWIDENPATH}
  2453.   PEMRWIDENPATH = ^EMRWIDENPATH;
  2454.   {$EXTERNALSYM PEMRWIDENPATH}
  2455.   EMRSETMETARGN = tagABORTPATH;
  2456.   {$EXTERNALSYM EMRSETMETARGN}
  2457.   PEMRSETMETARGN = ^EMRSETMETARGN;
  2458.   {$EXTERNALSYM PEMRSETMETARGN}
  2459.   EMRSAVEDC = tagABORTPATH;
  2460.   {$EXTERNALSYM EMRSAVEDC}
  2461.   PEMRSAVEDC = ^EMRSAVEDC;
  2462.   {$EXTERNALSYM PEMRSAVEDC}
  2463.   EMRREALIZEPALETTE = tagABORTPATH;
  2464.   {$EXTERNALSYM EMRREALIZEPALETTE}
  2465.   PEMRREALIZEPALETTE = ^EMRREALIZEPALETTE;
  2466.   {$EXTERNALSYM PEMRREALIZEPALETTE}
  2467.   PEmrSelectClipPath = ^TEmrSelectClipPath;
  2468.   tagEMRSELECTCLIPPATH = record
  2469.     emr: EMR;
  2470.     iMode: DWORD;
  2471.   end;
  2472.   {$EXTERNALSYM tagEMRSELECTCLIPPATH}
  2473.   EMRSELECTCLIPPATH = tagEMRSELECTCLIPPATH;
  2474.   {$EXTERNALSYM EMRSELECTCLIPPATH}
  2475.   LPEMRSELECTCLIPPATH = ^EMRSELECTCLIPPATH;
  2476.   {$EXTERNALSYM LPEMRSELECTCLIPPATH}
  2477.   TEmrSelectClipPath = EMRSELECTCLIPPATH;
  2478.   EMRSETBKMODE = tagEMRSELECTCLIPPATH;
  2479.   {$EXTERNALSYM EMRSETBKMODE}
  2480.   PEMRSETBKMODE = ^EMRSETBKMODE;
  2481.   {$EXTERNALSYM PEMRSETBKMODE}
  2482.   EMRSETMAPMODE = tagEMRSELECTCLIPPATH;
  2483.   {$EXTERNALSYM EMRSETMAPMODE}
  2484.   PEMRSETMAPMODE = ^EMRSETMAPMODE;
  2485.   {$EXTERNALSYM PEMRSETMAPMODE}
  2486.   EMRSETLAYOUT = tagEMRSELECTCLIPPATH;
  2487.   {$EXTERNALSYM EMRSETLAYOUT}
  2488.   PEMRSETLAYOUT = ^EMRSETLAYOUT;
  2489.   {$EXTERNALSYM PEMRSETLAYOUT}
  2490.   EMRSETPOLYFILLMODE = tagEMRSELECTCLIPPATH;
  2491.   {$EXTERNALSYM EMRSETPOLYFILLMODE}
  2492.   PEMRSETPOLYFILLMODE = EMRSETPOLYFILLMODE;
  2493.   {$EXTERNALSYM PEMRSETPOLYFILLMODE}
  2494.   EMRSETROP2 = tagEMRSELECTCLIPPATH;
  2495.   {$EXTERNALSYM EMRSETROP2}
  2496.   PEMRSETROP2 = ^EMRSETROP2;
  2497.   {$EXTERNALSYM PEMRSETROP2}
  2498.   EMRSETSTRETCHBLTMODE = tagEMRSELECTCLIPPATH;
  2499.   {$EXTERNALSYM EMRSETSTRETCHBLTMODE}
  2500.   PEMRSETSTRETCHBLTMODE = ^EMRSETSTRETCHBLTMODE;
  2501.   {$EXTERNALSYM PEMRSETSTRETCHBLTMODE}
  2502.   EMRSETICMMODE = tagEMRSELECTCLIPPATH;
  2503.   {$EXTERNALSYM EMRSETICMMODE}
  2504.   PEMRSETICMMODE = ^EMRSETICMMODE;
  2505.   {$EXTERNALSYM PEMRSETICMMODE}
  2506.   EMRSETTEXTALIGN = tagEMRSELECTCLIPPATH;
  2507.   {$EXTERNALSYM EMRSETTEXTALIGN}
  2508.   PEMRSETTEXTALIGN = ^EMRSETTEXTALIGN;
  2509.   {$EXTERNALSYM PEMRSETTEXTALIGN}
  2510.   PEmrSetMiterLimit = ^TEmrSetMiterLimit;
  2511.   tagEMRSETMITERLIMIT = record
  2512.     emr: EMR;
  2513.     eMiterLimit: FLOAT;
  2514.   end;
  2515.   {$EXTERNALSYM tagEMRSETMITERLIMIT}
  2516.   EMRSETMITERLIMIT = tagEMRSETMITERLIMIT;
  2517.   {$EXTERNALSYM EMRSETMITERLIMIT}
  2518.   TEmrSetMiterLimit = EMRSETMITERLIMIT;
  2519.   PEmrRestoreDc = ^TEmrRestoreDc;
  2520.   tagEMRRESTOREDC = record
  2521.     emr: EMR;
  2522.     iRelative: LONG; // Specifies a relative instance
  2523.   end;
  2524.   {$EXTERNALSYM tagEMRRESTOREDC}
  2525.   EMRRESTOREDC = tagEMRRESTOREDC;
  2526.   {$EXTERNALSYM EMRRESTOREDC}
  2527.   TEmrRestoreDc = EMRRESTOREDC;
  2528.   PEmrSetArcDirection = ^TEmrSetArcDirection;
  2529.   tagEMRSETARCDIRECTION = record
  2530.     emr: EMR;
  2531.     iArcDirection: DWORD; // Specifies the arc direction in the
  2532.     // advanced graphics mode.
  2533.   end;
  2534.   {$EXTERNALSYM tagEMRSETARCDIRECTION}
  2535.   EMRSETARCDIRECTION = tagEMRSETARCDIRECTION;
  2536.   {$EXTERNALSYM EMRSETARCDIRECTION}
  2537.   TEmrSetArcDirection = EMRSETARCDIRECTION;
  2538.   PEmrSetMapperFlags = ^TEmrSetMapperFlags;
  2539.   tagEMRSETMAPPERFLAGS = record
  2540.     emr: EMR;
  2541.     dwFlags: DWORD;
  2542.   end;
  2543.   {$EXTERNALSYM tagEMRSETMAPPERFLAGS}
  2544.   EMRSETMAPPERFLAGS = tagEMRSETMAPPERFLAGS;
  2545.   {$EXTERNALSYM EMRSETMAPPERFLAGS}
  2546.   TEmrSetMapperFlags = EMRSETMAPPERFLAGS;
  2547.   PEmrSetTextColor = ^TEmrSetTextColor;
  2548.   tagEMRSETTEXTCOLOR = record
  2549.     emr: EMR;
  2550.     crColor: COLORREF;
  2551.   end;
  2552.   {$EXTERNALSYM tagEMRSETTEXTCOLOR}
  2553.   EMRSETTEXTCOLOR = tagEMRSETTEXTCOLOR;
  2554.   {$EXTERNALSYM EMRSETTEXTCOLOR}
  2555.   EMRSETBKCOLOR = tagEMRSETTEXTCOLOR;
  2556.   {$EXTERNALSYM EMRSETBKCOLOR}
  2557.   PEMRSETBKCOLOR = ^EMRSETTEXTCOLOR;
  2558.   {$EXTERNALSYM PEMRSETBKCOLOR}
  2559.   TEmrSetTextColor = EMRSETTEXTCOLOR;
  2560.   PEmrSelectObject = ^TEmrSelectObject;
  2561.   tagEMRSELECTOBJECT = record
  2562.     emr: EMR;
  2563.     ihObject: DWORD; // Object handle index
  2564.   end;
  2565.   {$EXTERNALSYM tagEMRSELECTOBJECT}
  2566.   EMRSELECTOBJECT = tagEMRSELECTOBJECT;
  2567.   {$EXTERNALSYM EMRSELECTOBJECT}
  2568.   EMRDELETEOBJECT = tagEMRSELECTOBJECT;
  2569.   {$EXTERNALSYM EMRDELETEOBJECT}
  2570.   PEMRDELETEOBJECT = ^EMRDELETEOBJECT;
  2571.   {$EXTERNALSYM PEMRDELETEOBJECT}
  2572.   TEmrSelectObject = EMRSELECTOBJECT;
  2573.   PEmrSelectPalette = ^TEmrSelectPalette;
  2574.   tagEMRSELECTPALETTE = record
  2575.     emr: EMR;
  2576.     ihPal: DWORD; // Palette handle index, background mode only
  2577.   end;
  2578.   {$EXTERNALSYM tagEMRSELECTPALETTE}
  2579.   EMRSELECTPALETTE = tagEMRSELECTPALETTE;
  2580.   {$EXTERNALSYM EMRSELECTPALETTE}
  2581.   TEmrSelectPalette = EMRSELECTPALETTE;
  2582.   PEmrResizePalette = ^TEmrResizePalette;
  2583.   tagEMRRESIZEPALETTE = record
  2584.     emr: EMR;
  2585.     ihPal: DWORD; // Palette handle index
  2586.     cEntries: DWORD;
  2587.   end;
  2588.   {$EXTERNALSYM tagEMRRESIZEPALETTE}
  2589.   EMRRESIZEPALETTE = tagEMRRESIZEPALETTE;
  2590.   {$EXTERNALSYM EMRRESIZEPALETTE}
  2591.   TEmrResizePalette = EMRRESIZEPALETTE;
  2592.   PEmrSetPaletteEntries = ^TEmrSetPaletteEntries;
  2593.   tagEMRSETPALETTEENTRIES = record
  2594.     emr: EMR;
  2595.     ihPal: DWORD; // Palette handle index
  2596.     iStart: DWORD;
  2597.     cEntries: DWORD;
  2598.     aPalEntries: array [0..0] of PALETTEENTRY; // The peFlags fields do not contain any flags
  2599.   end;
  2600.   {$EXTERNALSYM tagEMRSETPALETTEENTRIES}
  2601.   EMRSETPALETTEENTRIES = tagEMRSETPALETTEENTRIES;
  2602.   {$EXTERNALSYM EMRSETPALETTEENTRIES}
  2603.   TEmrSetPaletteEntries = EMRSETPALETTEENTRIES;
  2604.   PEmrSetColorAdjustment = ^TEmrSetColorAdjustment;
  2605.   tagEMRSETCOLORADJUSTMENT = record
  2606.     emr: EMR;
  2607.     ColorAdjustment: COLORADJUSTMENT;
  2608.   end;
  2609.   {$EXTERNALSYM tagEMRSETCOLORADJUSTMENT}
  2610.   EMRSETCOLORADJUSTMENT = tagEMRSETCOLORADJUSTMENT;
  2611.   {$EXTERNALSYM EMRSETCOLORADJUSTMENT}
  2612.   TEmrSetColorAdjustment = EMRSETCOLORADJUSTMENT;
  2613.   PEmrGdiComment = ^TEmrGdiComment;
  2614.   tagEMRGDICOMMENT = record
  2615.     emr: EMR;
  2616.     cbData: DWORD; // Size of data in bytes
  2617.     Data: array [0..0] of BYTE;
  2618.   end;
  2619.   {$EXTERNALSYM tagEMRGDICOMMENT}
  2620.   EMRGDICOMMENT = tagEMRGDICOMMENT;
  2621.   {$EXTERNALSYM EMRGDICOMMENT}
  2622.   TEmrGdiComment = EMRGDICOMMENT;
  2623.   PEmrEof = ^TEmrEof;
  2624.   tagEMREOF = record
  2625.     emr: EMR;
  2626.     nPalEntries: DWORD; // Number of palette entries
  2627.     offPalEntries: DWORD; // Offset to the palette entries
  2628.     nSizeLast: DWORD; // Same as nSize and must be the last DWORD
  2629.     // of the record.  The palette entries,
  2630.     // if exist, precede this field.
  2631.   end;
  2632.   {$EXTERNALSYM tagEMREOF}
  2633.   EMREOF = tagEMREOF;
  2634.   {$EXTERNALSYM EMREOF}
  2635.   TEmrEof = EMREOF;
  2636.   PEmrLineTo = ^TEmrLineTo;
  2637.   tagEMRLINETO = record
  2638.     emr: EMR;
  2639.     ptl: POINTL;
  2640.   end;
  2641.   {$EXTERNALSYM tagEMRLINETO}
  2642.   EMRLINETO = tagEMRLINETO;
  2643.   {$EXTERNALSYM EMRLINETO}
  2644.   EMRMOVETOEX = tagEMRLINETO;
  2645.   {$EXTERNALSYM EMRMOVETOEX}
  2646.   PEMRMOVETOEX = ^EMRMOVETOEX;
  2647.   {$EXTERNALSYM PEMRMOVETOEX}
  2648.   TEmrLineTo = EMRLINETO;
  2649.   PEmrOffsetClipRgn = ^TEmrOffsetClipRgn;
  2650.   tagEMROFFSETCLIPRGN = record
  2651.     emr: EMR;
  2652.     ptlOffset: POINTL;
  2653.   end;
  2654.   {$EXTERNALSYM tagEMROFFSETCLIPRGN}
  2655.   EMROFFSETCLIPRGN = tagEMROFFSETCLIPRGN;
  2656.   {$EXTERNALSYM EMROFFSETCLIPRGN}
  2657.   TEmrOffsetClipRgn = EMROFFSETCLIPRGN;
  2658.   PEmrFillPath = ^TEmrFillPath;
  2659.   tagEMRFILLPATH = record
  2660.     emr: EMR;
  2661.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  2662.   end;
  2663.   {$EXTERNALSYM tagEMRFILLPATH}
  2664.   EMRFILLPATH = tagEMRFILLPATH;
  2665.   {$EXTERNALSYM EMRFILLPATH}
  2666.   EMRSTROKEANDFILLPATH = tagEMRFILLPATH;
  2667.   {$EXTERNALSYM EMRSTROKEANDFILLPATH}
  2668.   PEMRSTROKEANDFILLPATH = ^EMRSTROKEANDFILLPATH;
  2669.   {$EXTERNALSYM PEMRSTROKEANDFILLPATH}
  2670.   EMRSTROKEPATH = tagEMRFILLPATH;
  2671.   {$EXTERNALSYM EMRSTROKEPATH}
  2672.   PEMRSTROKEPATH = ^EMRSTROKEPATH;
  2673.   {$EXTERNALSYM PEMRSTROKEPATH}
  2674.   TEmrFillPath = EMRFILLPATH;
  2675.   PEmrExcludeClipRect = ^TEmrExcludeClipRect;
  2676.   tagEMREXCLUDECLIPRECT = record
  2677.     emr: EMR;
  2678.     rclClip: RECTL;
  2679.   end;
  2680.   {$EXTERNALSYM tagEMREXCLUDECLIPRECT}
  2681.   EMREXCLUDECLIPRECT = tagEMREXCLUDECLIPRECT;
  2682.   {$EXTERNALSYM EMREXCLUDECLIPRECT}
  2683.   EMRINTERSECTCLIPRECT = tagEMREXCLUDECLIPRECT;
  2684.   {$EXTERNALSYM EMRINTERSECTCLIPRECT}
  2685.   PEMRINTERSECTCLIPRECT = ^EMRINTERSECTCLIPRECT;
  2686.   {$EXTERNALSYM PEMRINTERSECTCLIPRECT}
  2687.   TEmrExcludeClipRect = EMREXCLUDECLIPRECT;
  2688.   PEmrSetViewPortOrgEx = ^TEmrSetViewPortOrgEx;
  2689.   tagEMRSETVIEWPORTORGEX = record
  2690.     emr: EMR;
  2691.     ptlOrigin: POINTL;
  2692.   end;
  2693.   {$EXTERNALSYM tagEMRSETVIEWPORTORGEX}
  2694.   EMRSETVIEWPORTORGEX = tagEMRSETVIEWPORTORGEX;
  2695.   {$EXTERNALSYM EMRSETVIEWPORTORGEX}
  2696.   EMRSETWINDOWORGEX = tagEMRSETVIEWPORTORGEX;
  2697.   {$EXTERNALSYM EMRSETWINDOWORGEX}
  2698.   PEMRSETWINDOWORGEX = ^EMRSETWINDOWORGEX;
  2699.   {$EXTERNALSYM PEMRSETWINDOWORGEX}
  2700.   EMRSETBRUSHORGEX = tagEMRSETVIEWPORTORGEX;
  2701.   {$EXTERNALSYM EMRSETBRUSHORGEX}
  2702.   PEMRSETBRUSHORGEX = ^EMRSETBRUSHORGEX;
  2703.   {$EXTERNALSYM PEMRSETBRUSHORGEX}
  2704.   TEmrSetViewPortOrgEx = EMRSETVIEWPORTORGEX;
  2705.   PEmrSetViewPortExtEx = ^TEmrSetViewPortExtEx;
  2706.   tagEMRSETVIEWPORTEXTEX = record
  2707.     emr: EMR;
  2708.     szlExtent: SIZEL;
  2709.   end;
  2710.   {$EXTERNALSYM tagEMRSETVIEWPORTEXTEX}
  2711.   EMRSETVIEWPORTEXTEX = tagEMRSETVIEWPORTEXTEX;
  2712.   {$EXTERNALSYM EMRSETVIEWPORTEXTEX}
  2713.   EMRSETWINDOWEXTEX = tagEMRSETVIEWPORTEXTEX;
  2714.   {$EXTERNALSYM EMRSETWINDOWEXTEX}
  2715.   TEmrSetViewPortExtEx = EMRSETVIEWPORTEXTEX;
  2716.   PEmrScaleViewPortExtEx = ^TEmrScaleViewPortExtEx;
  2717.   tagEMRSCALEVIEWPORTEXTEX = record
  2718.     emr: EMR;
  2719.     xNum: LONG;
  2720.     xDenom: LONG;
  2721.     yNum: LONG;
  2722.     yDenom: LONG;
  2723.   end;
  2724.   {$EXTERNALSYM tagEMRSCALEVIEWPORTEXTEX}
  2725.   EMRSCALEVIEWPORTEXTEX = tagEMRSCALEVIEWPORTEXTEX;
  2726.   {$EXTERNALSYM EMRSCALEVIEWPORTEXTEX}
  2727.   EMRSCALEWINDOWEXTEX = tagEMRSCALEVIEWPORTEXTEX;
  2728.   {$EXTERNALSYM EMRSCALEWINDOWEXTEX}
  2729.   PEMRSCALEWINDOWEXTEX = ^EMRSCALEWINDOWEXTEX;
  2730.   {$EXTERNALSYM PEMRSCALEWINDOWEXTEX}
  2731.   TEmrScaleViewPortExtEx = EMRSCALEVIEWPORTEXTEX;
  2732.   PEmrSetWorldTransform = ^TEmrSetWorldTransform;
  2733.   tagEMRSETWORLDTRANSFORM = record
  2734.     emr: EMR;
  2735.     xform: XFORM;
  2736.   end;
  2737.   {$EXTERNALSYM tagEMRSETWORLDTRANSFORM}
  2738.   EMRSETWORLDTRANSFORM = tagEMRSETWORLDTRANSFORM;
  2739.   {$EXTERNALSYM EMRSETWORLDTRANSFORM}
  2740.   TEmrSetWorldTransform = EMRSETWORLDTRANSFORM;
  2741.   PEmrModifyWorldTransform = ^TEmrModifyWorldTransform;
  2742.   tagEMRMODIFYWORLDTRANSFORM = record
  2743.     emr: EMR;
  2744.     xform: XFORM;
  2745.     iMode: DWORD;
  2746.   end;
  2747.   {$EXTERNALSYM tagEMRMODIFYWORLDTRANSFORM}
  2748.   EMRMODIFYWORLDTRANSFORM = tagEMRMODIFYWORLDTRANSFORM;
  2749.   {$EXTERNALSYM EMRMODIFYWORLDTRANSFORM}
  2750.   TEmrModifyWorldTransform = EMRMODIFYWORLDTRANSFORM;
  2751.   PEmrSetPixelV = ^TEmrSetPixelV;
  2752.   tagEMRSETPIXELV = record
  2753.     emr: EMR;
  2754.     ptlPixel: POINTL;
  2755.     crColor: COLORREF;
  2756.   end;
  2757.   {$EXTERNALSYM tagEMRSETPIXELV}
  2758.   EMRSETPIXELV = tagEMRSETPIXELV;
  2759.   {$EXTERNALSYM EMRSETPIXELV}
  2760.   TEmrSetPixelV = EMRSETPIXELV;
  2761.   PEmrExtFloodFill = ^TEmrExtFloodFill;
  2762.   tagEMREXTFLOODFILL = record
  2763.     emr: EMR;
  2764.     ptlStart: POINTL;
  2765.     crColor: COLORREF;
  2766.     iMode: DWORD;
  2767.   end;
  2768.   {$EXTERNALSYM tagEMREXTFLOODFILL}
  2769.   EMREXTFLOODFILL = tagEMREXTFLOODFILL;
  2770.   {$EXTERNALSYM EMREXTFLOODFILL}
  2771.   TEmrExtFloodFill = EMREXTFLOODFILL;
  2772.   PEmrEllipse = ^TEmrEllipse;
  2773.   tagEMRELLIPSE = record
  2774.     emr: EMR;
  2775.     rclBox: RECTL; // Inclusive-inclusive bounding rectangle
  2776.   end;
  2777.   {$EXTERNALSYM tagEMRELLIPSE}
  2778.   EMRELLIPSE = tagEMRELLIPSE;
  2779.   {$EXTERNALSYM EMRELLIPSE}
  2780.   EMRRECTANGLE = tagEMRELLIPSE;
  2781.   {$EXTERNALSYM EMRRECTANGLE}
  2782.   PEMRRECTANGLE = ^EMRRECTANGLE;
  2783.   {$EXTERNALSYM PEMRRECTANGLE}
  2784.   TEmrEllipse = EMRELLIPSE;
  2785.   PEmrRoundRect = ^TEmrRoundRect;
  2786.   tagEMRROUNDRECT = record
  2787.     emr: EMR;
  2788.     rclBox: RECTL; // Inclusive-inclusive bounding rectangle
  2789.     szlCorner: SIZEL;
  2790.   end;
  2791.   {$EXTERNALSYM tagEMRROUNDRECT}
  2792.   EMRROUNDRECT = tagEMRROUNDRECT;
  2793.   {$EXTERNALSYM EMRROUNDRECT}
  2794.   TEmrRoundRect = EMRROUNDRECT;
  2795.   PEmrArc = ^TEmrArc;
  2796.   tagEMRARC = record
  2797.     emr: EMR;
  2798.     rclBox: RECTL; // Inclusive-inclusive bounding rectangle
  2799.     ptlStart: POINTL;
  2800.     ptlEnd: POINTL;
  2801.   end;
  2802.   {$EXTERNALSYM tagEMRARC}
  2803.   EMRARC = tagEMRARC;
  2804.   {$EXTERNALSYM EMRARC}
  2805.   EMRARCTO = tagEMRARC;
  2806.   {$EXTERNALSYM EMRARCTO}
  2807.   PEMRARCTO = ^EMRARCTO;
  2808.   {$EXTERNALSYM PEMRARCTO}
  2809.   EMRCHORD = tagEMRARC;
  2810.   {$EXTERNALSYM EMRCHORD}
  2811.   PEMRCHORD = ^EMRCHORD;
  2812.   {$EXTERNALSYM PEMRCHORD}
  2813.   EMRPIE = tagEMRARC;
  2814.   {$EXTERNALSYM EMRPIE}
  2815.   PEMRPIE = ^EMRPIE;
  2816.   {$EXTERNALSYM PEMRPIE}
  2817.   TEmrArc = EMRARC;
  2818.   PEmrAngleArc = ^TEmrAngleArc;
  2819.   tagEMRANGLEARC = record
  2820.     emr: EMR;
  2821.     ptlCenter: POINTL;
  2822.     nRadius: DWORD;
  2823.     eStartAngle: FLOAT;
  2824.     eSweepAngle: FLOAT;
  2825.   end;
  2826.   {$EXTERNALSYM tagEMRANGLEARC}
  2827.   EMRANGLEARC = tagEMRANGLEARC;
  2828.   {$EXTERNALSYM EMRANGLEARC}
  2829.   TEmrAngleArc = EMRANGLEARC;
  2830.   PEmrPolyline = ^TEmrPolyline;
  2831.   tagEMRPOLYLINE = record
  2832.     emr: EMR;
  2833.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  2834.     cptl: DWORD;
  2835.     aptl: array [0..0] of POINTL;
  2836.   end;
  2837.   {$EXTERNALSYM tagEMRPOLYLINE}
  2838.   EMRPOLYLINE = tagEMRPOLYLINE;
  2839.   {$EXTERNALSYM EMRPOLYLINE}
  2840.   EMRPOLYBEZIER = tagEMRPOLYLINE;
  2841.   {$EXTERNALSYM EMRPOLYBEZIER}
  2842.   PEMRPOLYBEZIER = ^EMRPOLYBEZIER;
  2843.   {$EXTERNALSYM PEMRPOLYBEZIER}
  2844.   EMRPOLYGON = tagEMRPOLYLINE;
  2845.   {$EXTERNALSYM EMRPOLYGON}
  2846.   PEMRPOLYGON = ^EMRPOLYGON;
  2847.   {$EXTERNALSYM PEMRPOLYGON}
  2848.   EMRPOLYBEZIERTO = tagEMRPOLYLINE;
  2849.   {$EXTERNALSYM EMRPOLYBEZIERTO}
  2850.   PEMRPOLYBEZIERTO = ^EMRPOLYBEZIERTO;
  2851.   {$EXTERNALSYM PEMRPOLYBEZIERTO}
  2852.   EMRPOLYLINETO = tagEMRPOLYLINE;
  2853.   {$EXTERNALSYM EMRPOLYLINETO}
  2854.   PEMRPOLYLINETO = ^EMRPOLYLINETO;
  2855.   {$EXTERNALSYM PEMRPOLYLINETO}
  2856.   TEmrPolyline = EMRPOLYLINE;
  2857.   PEmrPolyline16 = ^TEmrPolyline16;
  2858.   tagEMRPOLYLINE16 = record
  2859.     emr: EMR;
  2860.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  2861.     cpts: DWORD;
  2862.     apts: array [0..0] of POINTS;
  2863.   end;
  2864.   {$EXTERNALSYM tagEMRPOLYLINE16}
  2865.   EMRPOLYLINE16 = tagEMRPOLYLINE16;
  2866.   {$EXTERNALSYM EMRPOLYLINE16}
  2867.   EMRPOLYBEZIER16 = tagEMRPOLYLINE16;
  2868.   {$EXTERNALSYM EMRPOLYBEZIER16}
  2869.   PEMRPOLYBEZIER16 = ^EMRPOLYBEZIER16;
  2870.   {$EXTERNALSYM PEMRPOLYBEZIER16}
  2871.   EMRPOLYGON16 = tagEMRPOLYLINE16;
  2872.   {$EXTERNALSYM EMRPOLYGON16}
  2873.   PEMRPOLYGON16 = ^EMRPOLYGON16;
  2874.   {$EXTERNALSYM PEMRPOLYGON16}
  2875.   EMRPOLYBEZIERTO16 = tagEMRPOLYLINE16;
  2876.   {$EXTERNALSYM EMRPOLYBEZIERTO16}
  2877.   PEMRPOLYBEZIERTO16 = ^EMRPOLYBEZIERTO16;
  2878.   {$EXTERNALSYM PEMRPOLYBEZIERTO16}
  2879.   EMRPOLYLINETO16 = tagEMRPOLYLINE16;
  2880.   {$EXTERNALSYM EMRPOLYLINETO16}
  2881.   PEMRPOLYLINETO16 = ^EMRPOLYLINETO16;
  2882.   {$EXTERNALSYM PEMRPOLYLINETO16}
  2883.   TEmrPolyline16 = EMRPOLYLINE16;
  2884.   PEmrPolyDraw = ^TEmrPolyDraw;
  2885.   tagEMRPOLYDRAW = record
  2886.     emr: EMR;
  2887.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  2888.     cptl: DWORD; // Number of points
  2889.     aptl: array [0..0] of POINTL; // Array of points
  2890.     abTypes: array [0..0] of BYTE; // Array of point types
  2891.   end;
  2892.   {$EXTERNALSYM tagEMRPOLYDRAW}
  2893.   EMRPOLYDRAW = tagEMRPOLYDRAW;
  2894.   {$EXTERNALSYM EMRPOLYDRAW}
  2895.   TEmrPolyDraw = EMRPOLYDRAW;
  2896.   PEmrPolyDraw16 = ^TEmrPolyDraw16;
  2897.   tagEMRPOLYDRAW16 = record
  2898.     emr: EMR;
  2899.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  2900.     cpts: DWORD; // Number of points
  2901.     apts: array [0..0] of POINTS; // Array of points
  2902.     abTypes: array [0..0] of BYTE; // Array of point types
  2903.   end;
  2904.   {$EXTERNALSYM tagEMRPOLYDRAW16}
  2905.   EMRPOLYDRAW16 = tagEMRPOLYDRAW16;
  2906.   {$EXTERNALSYM EMRPOLYDRAW16}
  2907.   TEmrPolyDraw16 = EMRPOLYDRAW16;
  2908.   PEmrPolyPolyline = ^TEmrPolyPolyline;
  2909.   tagEMRPOLYPOLYLINE = record
  2910.     emr: EMR;
  2911.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  2912.     nPolys: DWORD; // Number of polys
  2913.     cptl: DWORD; // Total number of points in all polys
  2914.     aPolyCounts: array [0..0] of DWORD; // Array of point counts for each poly
  2915.     aptl: array [0..0] of POINTL; // Array of points
  2916.   end;
  2917.   {$EXTERNALSYM tagEMRPOLYPOLYLINE}
  2918.   EMRPOLYPOLYLINE = tagEMRPOLYPOLYLINE;
  2919.   {$EXTERNALSYM EMRPOLYPOLYLINE}
  2920.   EMRPOLYPOLYGON = tagEMRPOLYPOLYLINE;
  2921.   {$EXTERNALSYM EMRPOLYPOLYGON}
  2922.   TEmrPolyPolyline = EMRPOLYPOLYLINE;
  2923.   PEmrPolyPolyline16 = ^TEmrPolyPolyline16;
  2924.   tagEMRPOLYPOLYLINE16 = record
  2925.     emr: EMR;
  2926.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  2927.     nPolys: DWORD; // Number of polys
  2928.     cpts: DWORD; // Total number of points in all polys
  2929.     aPolyCounts: array [0..0] of DWORD; // Array of point counts for each poly
  2930.     apts: array [0..0] of POINTS; // Array of points
  2931.   end;
  2932.   {$EXTERNALSYM tagEMRPOLYPOLYLINE16}
  2933.   EMRPOLYPOLYLINE16 = tagEMRPOLYPOLYLINE16;
  2934.   {$EXTERNALSYM EMRPOLYPOLYLINE16}
  2935.   EMRPOLYPOLYGON16 = tagEMRPOLYPOLYLINE16;
  2936.   {$EXTERNALSYM EMRPOLYPOLYGON16}
  2937.   PEMRPOLYPOLYGON16 = ^EMRPOLYPOLYGON16;
  2938.   {$EXTERNALSYM PEMRPOLYPOLYGON16}
  2939.   TEmrPolyPolyline16 = EMRPOLYPOLYLINE16;
  2940.   PEmrInvertRgn = ^TEmrInvertRgn;
  2941.   tagEMRINVERTRGN = record
  2942.     emr: EMR;
  2943.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  2944.     cbRgnData: DWORD; // Size of region data in bytes
  2945.     RgnData: array [0..0] of BYTE;
  2946.   end;
  2947.   {$EXTERNALSYM tagEMRINVERTRGN}
  2948.   EMRINVERTRGN = tagEMRINVERTRGN;
  2949.   {$EXTERNALSYM EMRINVERTRGN}
  2950.   EMRPAINTRGN = tagEMRINVERTRGN;
  2951.   {$EXTERNALSYM EMRPAINTRGN}
  2952.   TEmrInvertRgn = EMRINVERTRGN;
  2953.   PEmrFillRgn = ^TEmrFillRgn;
  2954.   tagEMRFILLRGN = record
  2955.     emr: EMR;
  2956.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  2957.     cbRgnData: DWORD; // Size of region data in bytes
  2958.     ihBrush: DWORD; // Brush handle index
  2959.     RgnData: array [0..0] of BYTE;
  2960.   end;
  2961.   {$EXTERNALSYM tagEMRFILLRGN}
  2962.   EMRFILLRGN = tagEMRFILLRGN;
  2963.   {$EXTERNALSYM EMRFILLRGN}
  2964.   TEmrFillRgn = EMRFILLRGN;
  2965.   PEmrFrameRgn = ^TEmrFrameRgn;
  2966.   tagEMRFRAMERGN = record
  2967.     emr: EMR;
  2968.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  2969.     cbRgnData: DWORD; // Size of region data in bytes
  2970.     ihBrush: DWORD; // Brush handle index
  2971.     szlStroke: SIZEL;
  2972.     RgnData: array [0..0] of BYTE;
  2973.   end;
  2974.   {$EXTERNALSYM tagEMRFRAMERGN}
  2975.   EMRFRAMERGN = tagEMRFRAMERGN;
  2976.   {$EXTERNALSYM EMRFRAMERGN}
  2977.   TEmrFrameRgn = EMRFRAMERGN;
  2978.   PEmrExtSelectClipRgn = ^TEmrExtSelectClipRgn;
  2979.   tagEMREXTSELECTCLIPRGN = record
  2980.     emr: EMR;
  2981.     cbRgnData: DWORD; // Size of region data in bytes
  2982.     iMode: DWORD;
  2983.     RgnData: array [0..0] of BYTE;
  2984.   end;
  2985.   {$EXTERNALSYM tagEMREXTSELECTCLIPRGN}
  2986.   EMREXTSELECTCLIPRGN = tagEMREXTSELECTCLIPRGN;
  2987.   {$EXTERNALSYM EMREXTSELECTCLIPRGN}
  2988.   TEmrExtSelectClipRgn = EMREXTSELECTCLIPRGN;
  2989.   PEmrExtTextOutA = ^TEmrExtTextOutA;
  2990.   tagEMREXTTEXTOUTA = record
  2991.     emr: EMR;
  2992.     rclBounds: RECTL;     // Inclusive-inclusive bounds in device units
  2993.     iGraphicsMode: DWORD; // Current graphics mode
  2994.     exScale: FLOAT;       // X and Y scales from Page units to .01mm units
  2995.     eyScale: FLOAT;       // if graphics mode is GM_COMPATIBLE.
  2996.     emrtext: EMRTEXT;     // This is followed by the string and spacing array
  2997.   end;
  2998.   {$EXTERNALSYM tagEMREXTTEXTOUTA}
  2999.   EMREXTTEXTOUTA = tagEMREXTTEXTOUTA;
  3000.   {$EXTERNALSYM EMREXTTEXTOUTA}
  3001.   EMREXTTEXTOUTW = tagEMREXTTEXTOUTA;
  3002.   {$EXTERNALSYM EMREXTTEXTOUTW}
  3003.   PEMREXTTEXTOUTW = ^EMREXTTEXTOUTW;
  3004.   {$EXTERNALSYM PEMREXTTEXTOUTW}
  3005.   TEmrExtTextOutA = EMREXTTEXTOUTA;
  3006.   PEmrPolyTextOutA = ^TEmrPolyTextOutA;
  3007.   tagEMRPOLYTEXTOUTA = record
  3008.     emr: EMR;
  3009.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  3010.     iGraphicsMode: DWORD; // Current graphics mode
  3011.     exScale: FLOAT; // X and Y scales from Page units to .01mm units
  3012.     eyScale: FLOAT; // if graphics mode is GM_COMPATIBLE.
  3013.     cStrings: LONG;
  3014.     aemrtext: array [0..0] of EMRTEXT; // Array of EMRTEXT structures.  This is
  3015.     // followed by the strings and spacing arrays.
  3016.   end;
  3017.   {$EXTERNALSYM tagEMRPOLYTEXTOUTA}
  3018.   EMRPOLYTEXTOUTA = tagEMRPOLYTEXTOUTA;
  3019.   {$EXTERNALSYM EMRPOLYTEXTOUTA}
  3020.   EMRPOLYTEXTOUTW = tagEMRPOLYTEXTOUTA;
  3021.   {$EXTERNALSYM EMRPOLYTEXTOUTW}
  3022.   PEMRPOLYTEXTOUTW = ^EMRPOLYTEXTOUTW;
  3023.   {$EXTERNALSYM PEMRPOLYTEXTOUTW}
  3024.   TEmrPolyTextOutA = EMRPOLYTEXTOUTA;
  3025.   PEmrBitBlt = ^TEmrBitBlt;
  3026.   tagEMRBITBLT = record
  3027.     emr: EMR;
  3028.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  3029.     xDest: LONG;
  3030.     yDest: LONG;
  3031.     cxDest: LONG;
  3032.     cyDest: LONG;
  3033.     dwRop: DWORD;
  3034.     xSrc: LONG;
  3035.     ySrc: LONG;
  3036.     xformSrc: XFORM; // Source DC transform
  3037.     crBkColorSrc: COLORREF; // Source DC BkColor in RGB
  3038.     iUsageSrc: DWORD; // Source bitmap info color table usage
  3039.     // (DIB_RGB_COLORS)
  3040.     offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
  3041.     cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
  3042.     offBitsSrc: DWORD; // Offset to the source bitmap bits
  3043.     cbBitsSrc: DWORD; // Size of the source bitmap bits
  3044.   end;
  3045.   {$EXTERNALSYM tagEMRBITBLT}
  3046.   EMRBITBLT = tagEMRBITBLT;
  3047.   {$EXTERNALSYM EMRBITBLT}
  3048.   TEmrBitBlt = EMRBITBLT;
  3049.   PEmrStretchBlt = ^TEmrStretchBlt;
  3050.   tagEMRSTRETCHBLT = record
  3051.     emr: EMR;
  3052.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  3053.     xDest: LONG;
  3054.     yDest: LONG;
  3055.     cxDest: LONG;
  3056.     cyDest: LONG;
  3057.     dwRop: DWORD;
  3058.     xSrc: LONG;
  3059.     ySrc: LONG;
  3060.     xformSrc: XFORM; // Source DC transform
  3061.     crBkColorSrc: COLORREF; // Source DC BkColor in RGB
  3062.     iUsageSrc: DWORD; // Source bitmap info color table usage
  3063.     // (DIB_RGB_COLORS)
  3064.     offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
  3065.     cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
  3066.     offBitsSrc: DWORD; // Offset to the source bitmap bits
  3067.     cbBitsSrc: DWORD; // Size of the source bitmap bits
  3068.     cxSrc: LONG;
  3069.     cySrc: LONG;
  3070.   end;
  3071.   {$EXTERNALSYM tagEMRSTRETCHBLT}
  3072.   EMRSTRETCHBLT = tagEMRSTRETCHBLT;
  3073.   {$EXTERNALSYM EMRSTRETCHBLT}
  3074.   TEmrStretchBlt = EMRSTRETCHBLT;
  3075.   PEmrMaskBlt = ^TEmrMaskBlt;
  3076.   tagEMRMASKBLT = record
  3077.     emr: EMR;
  3078.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  3079.     xDest: LONG;
  3080.     yDest: LONG;
  3081.     cxDest: LONG;
  3082.     cyDest: LONG;
  3083.     dwRop: DWORD;
  3084.     xSrc: LONG;
  3085.     ySrc: LONG;
  3086.     xformSrc: XFORM; // Source DC transform
  3087.     crBkColorSrc: COLORREF; // Source DC BkColor in RGB
  3088.     iUsageSrc: DWORD; // Source bitmap info color table usage
  3089.     // (DIB_RGB_COLORS)
  3090.     offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
  3091.     cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
  3092.     offBitsSrc: DWORD; // Offset to the source bitmap bits
  3093.     cbBitsSrc: DWORD; // Size of the source bitmap bits
  3094.     xMask: LONG;
  3095.     yMask: LONG;
  3096.     iUsageMask: DWORD; // Mask bitmap info color table usage
  3097.     offBmiMask: DWORD; // Offset to the mask BITMAPINFO structure if any
  3098.     cbBmiMask: DWORD; // Size of the mask BITMAPINFO structure if any
  3099.     offBitsMask: DWORD; // Offset to the mask bitmap bits if any
  3100.     cbBitsMask: DWORD; // Size of the mask bitmap bits if any
  3101.   end;
  3102.   {$EXTERNALSYM tagEMRMASKBLT}
  3103.   EMRMASKBLT = tagEMRMASKBLT;
  3104.   {$EXTERNALSYM EMRMASKBLT}
  3105.   TEmrMaskBlt = EMRMASKBLT;
  3106.   PEmrPlgBlt = ^TEmrPlgBlt;
  3107.   tagEMRPLGBLT = record
  3108.     emr: EMR;
  3109.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  3110.     aptlDest: array[0..2] of POINTL;
  3111.     xSrc: LONG;
  3112.     ySrc: LONG;
  3113.     cxSrc: LONG;
  3114.     cySrc: LONG;
  3115.     xformSrc: XFORM; // Source DC transform
  3116.     crBkColorSrc: COLORREF; // Source DC BkColor in RGB
  3117.     iUsageSrc: DWORD; // Source bitmap info color table usage
  3118.     // (DIB_RGB_COLORS)
  3119.     offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
  3120.     cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
  3121.     offBitsSrc: DWORD; // Offset to the source bitmap bits
  3122.     cbBitsSrc: DWORD; // Size of the source bitmap bits
  3123.     xMask: LONG;
  3124.     yMask: LONG;
  3125.     iUsageMask: DWORD; // Mask bitmap info color table usage
  3126.     offBmiMask: DWORD; // Offset to the mask BITMAPINFO structure if any
  3127.     cbBmiMask: DWORD; // Size of the mask BITMAPINFO structure if any
  3128.     offBitsMask: DWORD; // Offset to the mask bitmap bits if any
  3129.     cbBitsMask: DWORD; // Size of the mask bitmap bits if any
  3130.   end;
  3131.   {$EXTERNALSYM tagEMRPLGBLT}
  3132.   EMRPLGBLT = tagEMRPLGBLT;
  3133.   {$EXTERNALSYM EMRPLGBLT}
  3134.   TEmrPlgBlt = EMRPLGBLT;
  3135.   PEmrSetDiBitsToDevice = ^TEmrSetDiBitsToDevice;
  3136.   tagEMRSETDIBITSTODEVICE = record
  3137.     emr: EMR;
  3138.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  3139.     xDest: LONG;
  3140.     yDest: LONG;
  3141.     xSrc: LONG;
  3142.     ySrc: LONG;
  3143.     cxSrc: LONG;
  3144.     cySrc: LONG;
  3145.     offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
  3146.     cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
  3147.     offBitsSrc: DWORD; // Offset to the source bitmap bits
  3148.     cbBitsSrc: DWORD; // Size of the source bitmap bits
  3149.     iUsageSrc: DWORD; // Source bitmap info color table usage
  3150.     iStartScan: DWORD;
  3151.     cScans: DWORD;
  3152.   end;
  3153.   {$EXTERNALSYM tagEMRSETDIBITSTODEVICE}
  3154.   EMRSETDIBITSTODEVICE = tagEMRSETDIBITSTODEVICE;
  3155.   {$EXTERNALSYM EMRSETDIBITSTODEVICE}
  3156.   TEmrSetDiBitsToDevice = EMRSETDIBITSTODEVICE;
  3157.   PEmrStretchDiBits = ^TEmrStretchDiBits;
  3158.   tagEMRSTRETCHDIBITS = record
  3159.     emr: EMR;
  3160.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  3161.     xDest: LONG;
  3162.     yDest: LONG;
  3163.     xSrc: LONG;
  3164.     ySrc: LONG;
  3165.     cxSrc: LONG;
  3166.     cySrc: LONG;
  3167.     offBmiSrc: DWORD; // Offset to the source BITMAPINFO structure
  3168.     cbBmiSrc: DWORD; // Size of the source BITMAPINFO structure
  3169.     offBitsSrc: DWORD; // Offset to the source bitmap bits
  3170.     cbBitsSrc: DWORD; // Size of the source bitmap bits
  3171.     iUsageSrc: DWORD; // Source bitmap info color table usage
  3172.     dwRop: DWORD;
  3173.     cxDest: LONG;
  3174.     cyDest: LONG;
  3175.   end;
  3176.   {$EXTERNALSYM tagEMRSTRETCHDIBITS}
  3177.   EMRSTRETCHDIBITS = tagEMRSTRETCHDIBITS;
  3178.   {$EXTERNALSYM EMRSTRETCHDIBITS}
  3179.   TEmrStretchDiBits = EMRSTRETCHDIBITS;
  3180.   PEmrExtCreateFontIndirectW = ^TEmrExtCreateFontIndirectW;
  3181.   tagEMREXTCREATEFONTINDIRECTW = record
  3182.     emr: EMR;
  3183.     ihFont: DWORD; // Font handle index
  3184.     elfw: EXTLOGFONTW;
  3185.   end;
  3186.   {$EXTERNALSYM tagEMREXTCREATEFONTINDIRECTW}
  3187.   EMREXTCREATEFONTINDIRECTW = tagEMREXTCREATEFONTINDIRECTW;
  3188.   {$EXTERNALSYM EMREXTCREATEFONTINDIRECTW}
  3189.   TEmrExtCreateFontIndirectW = EMREXTCREATEFONTINDIRECTW;
  3190.   PEmrCreatePalette = ^TEmrCreatePalette;
  3191.   tagEMRCREATEPALETTE = record
  3192.     emr: EMR;
  3193.     ihPal: DWORD; // Palette handle index
  3194.     lgpl: LOGPALETTE; // The peFlags fields in the palette entries
  3195.     // do not contain any flags
  3196.   end;
  3197.   {$EXTERNALSYM tagEMRCREATEPALETTE}
  3198.   EMRCREATEPALETTE = tagEMRCREATEPALETTE;
  3199.   {$EXTERNALSYM EMRCREATEPALETTE}
  3200.   TEmrCreatePalette = EMRCREATEPALETTE;
  3201.   PEmrCreatePen = ^TEmrCreatePen;
  3202.   tagEMRCREATEPEN = record
  3203.     emr: EMR;
  3204.     ihPen: DWORD; // Pen handle index
  3205.     lopn: LOGPEN;
  3206.   end;
  3207.   {$EXTERNALSYM tagEMRCREATEPEN}
  3208.   EMRCREATEPEN = tagEMRCREATEPEN;
  3209.   {$EXTERNALSYM EMRCREATEPEN}
  3210.   TEmrCreatePen = EMRCREATEPEN;
  3211.   PEmrExtCreatePen = ^TEmrExtCreatePen;
  3212.   tagEMREXTCREATEPEN = record
  3213.     emr: EMR;
  3214.     ihPen: DWORD; // Pen handle index
  3215.     offBmi: DWORD; // Offset to the BITMAPINFO structure if any
  3216.     cbBmi: DWORD; // Size of the BITMAPINFO structure if any
  3217.     // The bitmap info is followed by the bitmap
  3218.     // bits to form a packed DIB.
  3219.     offBits: DWORD; // Offset to the brush bitmap bits if any
  3220.     cbBits: DWORD; // Size of the brush bitmap bits if any
  3221.     elp: EXTLOGPEN; // The extended pen with the style array.
  3222.   end;
  3223.   {$EXTERNALSYM tagEMREXTCREATEPEN}
  3224.   EMREXTCREATEPEN = tagEMREXTCREATEPEN;
  3225.   {$EXTERNALSYM EMREXTCREATEPEN}
  3226.   TEmrExtCreatePen = EMREXTCREATEPEN;
  3227.   PEmrCreateBrushIndirect = ^TEmrCreateBrushIndirect;
  3228.   tagEMRCREATEBRUSHINDIRECT = record
  3229.     emr: EMR;
  3230.     ihBrush: DWORD; // Brush handle index
  3231.     lb: LOGBRUSH32; // The style must be BS_SOLID, BS_HOLLOW,
  3232.     // BS_NULL or BS_HATCHED.
  3233.   end;
  3234.   {$EXTERNALSYM tagEMRCREATEBRUSHINDIRECT}
  3235.   EMRCREATEBRUSHINDIRECT = tagEMRCREATEBRUSHINDIRECT;
  3236.   {$EXTERNALSYM EMRCREATEBRUSHINDIRECT}
  3237.   TEmrCreateBrushIndirect = EMRCREATEBRUSHINDIRECT;
  3238.   PEmrCreateMonoBrush = ^TEmrCreateMonoBrush;
  3239.   tagEMRCREATEMONOBRUSH = record
  3240.     emr: EMR;
  3241.     ihBrush: DWORD; // Brush handle index
  3242.     iUsage: DWORD; // Bitmap info color table usage
  3243.     offBmi: DWORD; // Offset to the BITMAPINFO structure
  3244.     cbBmi: DWORD; // Size of the BITMAPINFO structure
  3245.     offBits: DWORD; // Offset to the bitmap bits
  3246.     cbBits: DWORD; // Size of the bitmap bits
  3247.   end;
  3248.   {$EXTERNALSYM tagEMRCREATEMONOBRUSH}
  3249.   EMRCREATEMONOBRUSH = tagEMRCREATEMONOBRUSH;
  3250.   {$EXTERNALSYM EMRCREATEMONOBRUSH}
  3251.   TEmrCreateMonoBrush = EMRCREATEMONOBRUSH;
  3252.   PEmrCreateDibPatternBrushPt = ^TEmrCreateDibPatternBrushPt;
  3253.   tagEMRCREATEDIBPATTERNBRUSHPT = record
  3254.     emr: EMR;
  3255.     ihBrush: DWORD; // Brush handle index
  3256.     iUsage: DWORD; // Bitmap info color table usage
  3257.     offBmi: DWORD; // Offset to the BITMAPINFO structure
  3258.     cbBmi: DWORD; // Size of the BITMAPINFO structure
  3259.     // The bitmap info is followed by the bitmap
  3260.     // bits to form a packed DIB.
  3261.     offBits: DWORD; // Offset to the bitmap bits
  3262.     cbBits: DWORD; // Size of the bitmap bits
  3263.   end;
  3264.   {$EXTERNALSYM tagEMRCREATEDIBPATTERNBRUSHPT}
  3265.   EMRCREATEDIBPATTERNBRUSHPT = tagEMRCREATEDIBPATTERNBRUSHPT;
  3266.   {$EXTERNALSYM EMRCREATEDIBPATTERNBRUSHPT}
  3267.   TEmrCreateDibPatternBrushPt = EMRCREATEDIBPATTERNBRUSHPT;
  3268.   PEmrFormat = ^TEmrFormat;
  3269.   tagEMRFORMAT = record
  3270.     dSignature: DWORD; // Format signature, e.g. ENHMETA_SIGNATURE.
  3271.     nVersion: DWORD; // Format version number.
  3272.     cbData: DWORD; // Size of data in bytes.
  3273.     offData: DWORD; // Offset to data from GDICOMMENT_IDENTIFIER.
  3274.     // It must begin at a DWORD offset.
  3275.   end;
  3276.   {$EXTERNALSYM tagEMRFORMAT}
  3277.   EMRFORMAT = tagEMRFORMAT;
  3278.   {$EXTERNALSYM EMRFORMAT}
  3279.   TEmrFormat = EMRFORMAT;
  3280.   PEmrGlsRecord = ^TEmrGlsRecord;
  3281.   tagEMRGLSRECORD = record
  3282.     emr: EMR;
  3283.     cbData: DWORD; // Size of data in bytes
  3284.     Data: array [0..0] of BYTE;
  3285.   end;
  3286.   {$EXTERNALSYM tagEMRGLSRECORD}
  3287.   EMRGLSRECORD = tagEMRGLSRECORD;
  3288.   {$EXTERNALSYM EMRGLSRECORD}
  3289.   TEmrGlsRecord = EMRGLSRECORD;
  3290.   PEmrGlsBoundedRecord = ^TEmrGlsBoundedRecord;
  3291.   tagEMRGLSBOUNDEDRECORD = record
  3292.     emr: EMR;
  3293.     rclBounds: RECTL; // Bounds in recording coordinates
  3294.     cbData: DWORD; // Size of data in bytes
  3295.     Data: array [0..0] of BYTE;
  3296.   end;
  3297.   {$EXTERNALSYM tagEMRGLSBOUNDEDRECORD}
  3298.   EMRGLSBOUNDEDRECORD = tagEMRGLSBOUNDEDRECORD;
  3299.   {$EXTERNALSYM EMRGLSBOUNDEDRECORD}
  3300.   TEmrGlsBoundedRecord = EMRGLSBOUNDEDRECORD;
  3301.   PEmrPixelFormat = ^TEmrPixelFormat;
  3302.   tagEMRPIXELFORMAT = record
  3303.     emr: EMR;
  3304.     pfd: PIXELFORMATDESCRIPTOR;
  3305.   end;
  3306.   {$EXTERNALSYM tagEMRPIXELFORMAT}
  3307.   EMRPIXELFORMAT = tagEMRPIXELFORMAT;
  3308.   {$EXTERNALSYM EMRPIXELFORMAT}
  3309.   TEmrPixelFormat = EMRPIXELFORMAT;
  3310.   PEmrCreateColorSpace = ^TEmrCreateColorSpace;
  3311.   tagEMRCREATECOLORSPACE = record
  3312.     emr: EMR;
  3313.     ihCS: DWORD; // ColorSpace handle index
  3314.     lcs: LOGCOLORSPACEA; // Ansi version of LOGCOLORSPACE
  3315.   end;
  3316.   {$EXTERNALSYM tagEMRCREATECOLORSPACE}
  3317.   EMRCREATECOLORSPACE = tagEMRCREATECOLORSPACE;
  3318.   {$EXTERNALSYM EMRCREATECOLORSPACE}
  3319.   TEmrCreateColorSpace = EMRCREATECOLORSPACE;
  3320.   PEmrSetColorSpace = ^TEmrSetColorSpace;
  3321.   tagEMRSETCOLORSPACE = record
  3322.     emr: EMR;
  3323.     ihCS: DWORD; // ColorSpace handle index
  3324.   end;
  3325.   {$EXTERNALSYM tagEMRSETCOLORSPACE}
  3326.   EMRSETCOLORSPACE = tagEMRSETCOLORSPACE;
  3327.   {$EXTERNALSYM EMRSETCOLORSPACE}
  3328.   EMRSELECTCOLORSPACE = tagEMRSETCOLORSPACE;
  3329.   {$EXTERNALSYM EMRSELECTCOLORSPACE}
  3330.   PEMRSELECTCOLORSPACE = ^EMRSELECTCOLORSPACE;
  3331.   {$EXTERNALSYM PEMRSELECTCOLORSPACE}
  3332.   EMRDELETECOLORSPACE = tagEMRSETCOLORSPACE;
  3333.   {$EXTERNALSYM EMRDELETECOLORSPACE}
  3334.   PEMRDELETECOLORSPACE = ^EMRDELETECOLORSPACE;
  3335.   {$EXTERNALSYM PEMRDELETECOLORSPACE}
  3336.   TEmrSetColorSpace = EMRSETCOLORSPACE;
  3337.   PEmrExtEscape = ^TEmrExtEscape;
  3338.   tagEMREXTESCAPE = record
  3339.     emr: EMR;
  3340.     iEscape: INT; // Escape code
  3341.     cbEscData: INT; // Size of escape data
  3342.     EscData: array [0..0] of BYTE; // Escape data
  3343.   end;
  3344.   {$EXTERNALSYM tagEMREXTESCAPE}
  3345.   EMREXTESCAPE = tagEMREXTESCAPE;
  3346.   {$EXTERNALSYM EMREXTESCAPE}
  3347.   EMRDRAWESCAPE = tagEMREXTESCAPE;
  3348.   {$EXTERNALSYM EMRDRAWESCAPE}
  3349.   PEMRDRAWESCAPE = ^EMRDRAWESCAPE;
  3350.   {$EXTERNALSYM PEMRDRAWESCAPE}
  3351.   TEmrExtEscape = EMREXTESCAPE;
  3352.   PEmrNamedEscape = ^TEmrNamedEscape;
  3353.   tagEMRNAMEDESCAPE = record
  3354.     emr: EMR;
  3355.     iEscape: INT; // Escape code
  3356.     cbDriver: INT; // Size of driver name
  3357.     cbEscData: INT; // Size of escape data
  3358.     EscData: array [0..0] of BYTE; // Driver name and Escape data
  3359.   end;
  3360.   {$EXTERNALSYM tagEMRNAMEDESCAPE}
  3361.   EMRNAMEDESCAPE = tagEMRNAMEDESCAPE;
  3362.   {$EXTERNALSYM EMRNAMEDESCAPE}
  3363.   TEmrNamedEscape = EMRNAMEDESCAPE;
  3364. const
  3365.   SETICMPROFILE_EMBEDED = $00000001;
  3366.   {$EXTERNALSYM SETICMPROFILE_EMBEDED}
  3367. type
  3368.   PEmrSetIcmProfile = ^TEmrSetIcmProfile;
  3369.   tagEMRSETICMPROFILE = record
  3370.     emr: EMR;
  3371.     dwFlags: DWORD; // flags
  3372.     cbName: DWORD; // Size of desired profile name
  3373.     cbData: DWORD; // Size of raw profile data if attached
  3374.     Data: array [0..0] of BYTE; // Array size is cbName + cbData
  3375.   end;
  3376.   {$EXTERNALSYM tagEMRSETICMPROFILE}
  3377.   EMRSETICMPROFILE = tagEMRSETICMPROFILE;
  3378.   {$EXTERNALSYM EMRSETICMPROFILE}
  3379.   EMRSETICMPROFILEA = tagEMRSETICMPROFILE;
  3380.   {$EXTERNALSYM EMRSETICMPROFILEA}
  3381.   PEMRSETICMPROFILEA = ^EMRSETICMPROFILEA;
  3382.   {$EXTERNALSYM PEMRSETICMPROFILEA}
  3383.   EMRSETICMPROFILEW = tagEMRSETICMPROFILE;
  3384.   {$EXTERNALSYM EMRSETICMPROFILEW}
  3385.   PEMRSETICMPROFILEW = ^EMRSETICMPROFILEW;
  3386.   {$EXTERNALSYM PEMRSETICMPROFILEW}
  3387.   TEmrSetIcmProfile = EMRSETICMPROFILE;
  3388. const
  3389.   CREATECOLORSPACE_EMBEDED = $00000001;
  3390.   {$EXTERNALSYM CREATECOLORSPACE_EMBEDED}
  3391. type
  3392.   PEmrCreateColorSpaceW = ^TEmrCreateColorSpaceW;
  3393.   tagEMRCREATECOLORSPACEW = record
  3394.     emr: EMR;
  3395.     ihCS: DWORD; // ColorSpace handle index
  3396.     lcs: LOGCOLORSPACEW; // Unicode version of logical color space structure
  3397.     dwFlags: DWORD; // flags
  3398.     cbData: DWORD; // size of raw source profile data if attached
  3399.     Data: array [0..0] of BYTE; // Array size is cbData
  3400.   end;
  3401.   {$EXTERNALSYM tagEMRCREATECOLORSPACEW}
  3402.   EMRCREATECOLORSPACEW = tagEMRCREATECOLORSPACEW;
  3403.   {$EXTERNALSYM EMRCREATECOLORSPACEW}
  3404.   TEmrCreateColorSpaceW = EMRCREATECOLORSPACEW;
  3405. const
  3406.   COLORMATCHTOTARGET_EMBEDED = $00000001;
  3407.   {$EXTERNALSYM COLORMATCHTOTARGET_EMBEDED}
  3408. type
  3409.   PColorMatchToTarget = ^TColorMatchToTarget;
  3410.   tagCOLORMATCHTOTARGET = record
  3411.     emr: EMR;
  3412.     dwAction: DWORD;  // CS_ENABLE, CS_DISABLE or CS_DELETE_TRANSFORM
  3413.     dwFlags: DWORD;   // flags
  3414.     cbName: DWORD;    // Size of desired target profile name
  3415.     cbData: DWORD;    // Size of raw target profile data if attached
  3416.     Data: array [0..0] of BYTE; // Array size is cbName + cbData
  3417.   end;
  3418.   {$EXTERNALSYM tagCOLORMATCHTOTARGET}
  3419.   //COLORMATCHTOTARGET = tagCOLORMATCHTOTARGET;
  3420.   //{$EXTERNALSYM COLORMATCHTOTARGET}
  3421.   TColorMatchToTarget = tagCOLORMATCHTOTARGET;
  3422.   PColorCorrectPalette = ^TColorCorrectPalette;
  3423.   tagCOLORCORRECTPALETTE = record
  3424.     emr: EMR;
  3425.     ihPalette: DWORD;   // Palette handle index
  3426.     nFirstEntry: DWORD; // Index of first entry to correct
  3427.     nPalEntries: DWORD; // Number of palette entries to correct
  3428.     nReserved: DWORD;   // Reserved
  3429.   end;
  3430.   {$EXTERNALSYM tagCOLORCORRECTPALETTE}
  3431.   //COLORCORRECTPALETTE = tagCOLORCORRECTPALETTE;
  3432.   //{$EXTERNALSYM COLORCORRECTPALETTE}
  3433.   TColorCorrectPalette = tagCOLORCORRECTPALETTE;
  3434.   PEmrAlphaBlend = ^TEmrAlphaBlend;
  3435.   tagEMRALPHABLEND = record
  3436.     emr: EMR;
  3437.     rclBounds: RECTL;       // Inclusive-inclusive bounds in device units
  3438.     xDest: LONG;
  3439.     yDest: LONG;
  3440.     cxDest: LONG;
  3441.     cyDest: LONG;
  3442.     dwRop: DWORD;
  3443.     xSrc: LONG;
  3444.     ySrc: LONG;
  3445.     xformSrc: XFORM;        // Source DC transform
  3446.     crBkColorSrc: COLORREF; // Source DC BkColor in RGB
  3447.     iUsageSrc: DWORD;       // Source bitmap info color table usage (DIB_RGB_COLORS)
  3448.     offBmiSrc: DWORD;       // Offset to the source BITMAPINFO structure
  3449.     cbBmiSrc: DWORD;        // Size of the source BITMAPINFO structure
  3450.     offBitsSrc: DWORD;      // Offset to the source bitmap bits
  3451.     cbBitsSrc: DWORD;       // Size of the source bitmap bits
  3452.     cxSrc: LONG;
  3453.     cySrc: LONG;
  3454.   end;
  3455.   {$EXTERNALSYM tagEMRALPHABLEND}
  3456.   EMRALPHABLEND = tagEMRALPHABLEND;
  3457.   {$EXTERNALSYM EMRALPHABLEND}
  3458.   TEmrAlphaBlend = EMRALPHABLEND;
  3459.   PEmrGradientFill = ^TEmrGradientFill;
  3460.   tagEMRGRADIENTFILL = record
  3461.     emr: EMR;
  3462.     rclBounds: RECTL; // Inclusive-inclusive bounds in device units
  3463.     nVer: DWORD;
  3464.     nTri: DWORD;
  3465.     ulMode: ULONG;
  3466.     Ver: array [0..0] of TRIVERTEX;
  3467.   end;
  3468.   {$EXTERNALSYM tagEMRGRADIENTFILL}
  3469.   EMRGRADIENTFILL = tagEMRGRADIENTFILL;
  3470.   {$EXTERNALSYM EMRGRADIENTFILL}
  3471.   TEmrGradientFill = EMRGRADIENTFILL;
  3472.   PEmrTransparentBlt = ^TEmrTransparentBlt;
  3473.   tagEMRTRANSPARENTBLT = record
  3474.     emr: EMR;
  3475.     rclBounds: RECTL;       // Inclusive-inclusive bounds in device units
  3476.     xDest: LONG;
  3477.     yDest: LONG;
  3478.     cxDest: LONG;
  3479.     cyDest: LONG;
  3480.     dwRop: DWORD;
  3481.     xSrc: LONG;
  3482.     ySrc: LONG;
  3483.     xformSrc: XFORM;        // Source DC transform
  3484.     crBkColorSrc: COLORREF; // Source DC BkColor in RGB
  3485.     iUsageSrc: DWORD;       // Source bitmap info color table usage
  3486.                             // (DIB_RGB_COLORS)
  3487.     offBmiSrc: DWORD;       // Offset to the source BITMAPINFO structure
  3488.     cbBmiSrc: DWORD;        // Size of the source BITMAPINFO structure
  3489.     offBitsSrc: DWORD;      // Offset to the source bitmap bits
  3490.     cbBitsSrc: DWORD;       // Size of the source bitmap bits
  3491.     cxSrc: LONG;
  3492.     cySrc: LONG;
  3493.   end;
  3494.   {$EXTERNALSYM tagEMRTRANSPARENTBLT}
  3495.   EMRTRANSPARENTBLT = tagEMRTRANSPARENTBLT;
  3496.   {$EXTERNALSYM EMRTRANSPARENTBLT}
  3497.   TEmrTransparentBlt = EMRTRANSPARENTBLT;
  3498. const
  3499.   GDICOMMENT_IDENTIFIER       = $43494447;
  3500.   {$EXTERNALSYM GDICOMMENT_IDENTIFIER}
  3501.   GDICOMMENT_WINDOWS_METAFILE = DWORD($80000001);
  3502.   {$EXTERNALSYM GDICOMMENT_WINDOWS_METAFILE}
  3503.   GDICOMMENT_BEGINGROUP       = $00000002;
  3504.   {$EXTERNALSYM GDICOMMENT_BEGINGROUP}
  3505.   GDICOMMENT_ENDGROUP         = $00000003;
  3506.   {$EXTERNALSYM GDICOMMENT_ENDGROUP}
  3507.   GDICOMMENT_MULTIFORMATS     = $40000004;
  3508.   {$EXTERNALSYM GDICOMMENT_MULTIFORMATS}
  3509.   EPS_SIGNATURE               = $46535045;
  3510.   {$EXTERNALSYM EPS_SIGNATURE}
  3511.   GDICOMMENT_UNICODE_STRING   = $00000040;
  3512.   {$EXTERNALSYM GDICOMMENT_UNICODE_STRING}
  3513.   GDICOMMENT_UNICODE_END      = $00000080;
  3514.   {$EXTERNALSYM GDICOMMENT_UNICODE_END}
  3515. // OpenGL wgl prototypes
  3516. function wglCopyContext(hglrcSrc, hglrcDest: HGLRC; mask: UINT): BOOL; stdcall;
  3517. {$EXTERNALSYM wglCopyContext}
  3518. function wglCreateContext(hdc: HDC): HGLRC; stdcall;
  3519. {$EXTERNALSYM wglCreateContext}
  3520. function wglCreateLayerContext(hdc: HDC; iLayerPlane: Integer): HGLRC; stdcall;
  3521. {$EXTERNALSYM wglCreateLayerContext}
  3522. function wglDeleteContext(hglrc: HGLRC): BOOL; stdcall;
  3523. {$EXTERNALSYM wglDeleteContext}
  3524. function wglGetCurrentContext: HGLRC; stdcall;
  3525. {$EXTERNALSYM wglGetCurrentContext}
  3526. function wglGetCurrentDC: HDC; stdcall;
  3527. {$EXTERNALSYM wglGetCurrentDC}
  3528. function wglGetProcAddress(lpszProc: LPCSTR): PROC; stdcall;
  3529. {$EXTERNALSYM wglGetProcAddress}
  3530. function wglMakeCurrent(hdc: HDC; hglrc: HGLRC): BOOL; stdcall;
  3531. {$EXTERNALSYM wglMakeCurrent}
  3532. function wglShareLists(hglrc1, hglrc2: HGLRC): BOOL; stdcall;
  3533. {$EXTERNALSYM wglShareLists}
  3534. function wglUseFontBitmapsA(hdc: HDC; first, count, listBase: DWORD): BOOL; stdcall;
  3535. {$EXTERNALSYM wglUseFontBitmapsA}
  3536. function wglUseFontBitmapsW(hdc: HDC; first, count, listBase: DWORD): BOOL; stdcall;
  3537. {$EXTERNALSYM wglUseFontBitmapsW}
  3538. {$IFDEF UNICODE}
  3539. function wglUseFontBitmaps(hdc: HDC; first, count, listBase: DWORD): BOOL; stdcall;
  3540. {$EXTERNALSYM wglUseFontBitmaps}
  3541. {$ELSE}
  3542. function wglUseFontBitmaps(hdc: HDC; first, count, listBase: DWORD): BOOL; stdcall;
  3543. {$EXTERNALSYM wglUseFontBitmaps}
  3544. {$ENDIF}
  3545. function SwapBuffers(hdc: HDC): BOOL; stdcall;
  3546. {$EXTERNALSYM SwapBuffers}
  3547. type
  3548.   PPointFloat = ^TPointFloat;
  3549.   _POINTFLOAT = record
  3550.     x: FLOAT;
  3551.     y: FLOAT;
  3552.   end;
  3553.   {$EXTERNALSYM _POINTFLOAT}
  3554.   POINTFLOAT = _POINTFLOAT;
  3555.   {$EXTERNALSYM POINTFLOAT}
  3556.   TPointFloat = _POINTFLOAT;
  3557.   PGlyphMetricsFloat = ^TGlyphMetricsFloat;
  3558.   _GLYPHMETRICSFLOAT = record
  3559.     gmfBlackBoxX: FLOAT;
  3560.     gmfBlackBoxY: FLOAT;
  3561.     gmfptGlyphOrigin: POINTFLOAT;
  3562.     gmfCellIncX: FLOAT;
  3563.     gmfCellIncY: FLOAT;
  3564.   end;
  3565.   {$EXTERNALSYM _GLYPHMETRICSFLOAT}
  3566.   GLYPHMETRICSFLOAT = _GLYPHMETRICSFLOAT;
  3567.   {$EXTERNALSYM GLYPHMETRICSFLOAT}
  3568.   LPGLYPHMETRICSFLOAT = ^GLYPHMETRICSFLOAT;
  3569.   {$EXTERNALSYM LPGLYPHMETRICSFLOAT}
  3570.   TGlyphMetricsFloat = _GLYPHMETRICSFLOAT;
  3571. const
  3572.   WGL_FONT_LINES    = 0;
  3573.   {$EXTERNALSYM WGL_FONT_LINES}
  3574.   WGL_FONT_POLYGONS = 1;
  3575.   {$EXTERNALSYM WGL_FONT_POLYGONS}
  3576. function wglUseFontOutlinesA(hdc: HDC; first, count, listBase: DWORD; deviation,
  3577.   extrusion: FLOAT; format: Integer; lpgmf: LPGLYPHMETRICSFLOAT): BOOL; stdcall;
  3578. {$EXTERNALSYM wglUseFontOutlinesA}
  3579. function wglUseFontOutlinesW(hdc: HDC; first, count, listBase: DWORD; deviation,
  3580.   extrusion: FLOAT; format: Integer; lpgmf: LPGLYPHMETRICSFLOAT): BOOL; stdcall;
  3581. {$EXTERNALSYM wglUseFontOutlinesW}
  3582. {$IFDEF UNICODE}
  3583. function wglUseFontOutlines(hdc: HDC; first, count, listBase: DWORD; deviation,
  3584.   extrusion: FLOAT; format: Integer; lpgmf: LPGLYPHMETRICSFLOAT): BOOL; stdcall;
  3585. {$EXTERNALSYM wglUseFontOutlines}
  3586. {$ELSE}
  3587. function wglUseFontOutlines(hdc: HDC; first, count, listBase: DWORD; deviation,
  3588.   extrusion: FLOAT; format: Integer; lpgmf: LPGLYPHMETRICSFLOAT): BOOL; stdcall;
  3589. {$EXTERNALSYM wglUseFontOutlines}
  3590. {$ENDIF}
  3591. // Layer plane descriptor
  3592. type
  3593.   PLayerPlaneDescriptor = ^TLayerPlaneDescriptor;
  3594.   tagLAYERPLANEDESCRIPTOR = record
  3595.     nSize: WORD;
  3596.     nVersion: WORD;
  3597.     dwFlags: DWORD;
  3598.     iPixelType: BYTE;
  3599.     cColorBits: BYTE;
  3600.     cRedBits: BYTE;
  3601.     cRedShift: BYTE;
  3602.     cGreenBits: BYTE;
  3603.     cGreenShift: BYTE;
  3604.     cBlueBits: BYTE;
  3605.     cBlueShift: BYTE;
  3606.     cAlphaBits: BYTE;
  3607.     cAlphaShift: BYTE;
  3608.     cAccumBits: BYTE;
  3609.     cAccumRedBits: BYTE;
  3610.     cAccumGreenBits: BYTE;
  3611.     cAccumBlueBits: BYTE;
  3612.     cAccumAlphaBits: BYTE;
  3613.     cDepthBits: BYTE;
  3614.     cStencilBits: BYTE;
  3615.     cAuxBuffers: BYTE;
  3616.     iLayerPlane: BYTE;
  3617.     bReserved: BYTE;
  3618.     crTransparent: COLORREF;
  3619.   end;
  3620.   {$EXTERNALSYM tagLAYERPLANEDESCRIPTOR}
  3621.   LAYERPLANEDESCRIPTOR = tagLAYERPLANEDESCRIPTOR;
  3622.   {$EXTERNALSYM LAYERPLANEDESCRIPTOR}
  3623.   LPLAYERPLANEDESCRIPTOR = ^LAYERPLANEDESCRIPTOR;
  3624.   {$EXTERNALSYM LPLAYERPLANEDESCRIPTOR}
  3625.   TLayerPlaneDescriptor = LAYERPLANEDESCRIPTOR;
  3626. // LAYERPLANEDESCRIPTOR flags
  3627. const
  3628.   LPD_DOUBLEBUFFER   = $00000001;
  3629.   {$EXTERNALSYM LPD_DOUBLEBUFFER}
  3630.   LPD_STEREO         = $00000002;
  3631.   {$EXTERNALSYM LPD_STEREO}
  3632.   LPD_SUPPORT_GDI    = $00000010;
  3633.   {$EXTERNALSYM LPD_SUPPORT_GDI}
  3634.   LPD_SUPPORT_OPENGL = $00000020;
  3635.   {$EXTERNALSYM LPD_SUPPORT_OPENGL}
  3636.   LPD_SHARE_DEPTH    = $00000040;
  3637.   {$EXTERNALSYM LPD_SHARE_DEPTH}
  3638.   LPD_SHARE_STENCIL  = $00000080;
  3639.   {$EXTERNALSYM LPD_SHARE_STENCIL}
  3640.   LPD_SHARE_ACCUM    = $00000100;
  3641.   {$EXTERNALSYM LPD_SHARE_ACCUM}
  3642.   LPD_SWAP_EXCHANGE  = $00000200;
  3643.   {$EXTERNALSYM LPD_SWAP_EXCHANGE}
  3644.   LPD_SWAP_COPY      = $00000400;
  3645.   {$EXTERNALSYM LPD_SWAP_COPY}
  3646.   LPD_TRANSPARENT    = $00001000;
  3647.   {$EXTERNALSYM LPD_TRANSPARENT}
  3648.   LPD_TYPE_RGBA       = 0;
  3649.   {$EXTERNALSYM LPD_TYPE_RGBA}
  3650.   LPD_TYPE_COLORINDEX = 1;
  3651.   {$EXTERNALSYM LPD_TYPE_COLORINDEX}
  3652. // wglSwapLayerBuffers flags
  3653.   WGL_SWAP_MAIN_PLANE = $00000001;
  3654.   {$EXTERNALSYM WGL_SWAP_MAIN_PLANE}
  3655.   WGL_SWAP_OVERLAY1   = $00000002;
  3656.   {$EXTERNALSYM WGL_SWAP_OVERLAY1}
  3657.   WGL_SWAP_OVERLAY2   = $00000004;
  3658.   {$EXTERNALSYM WGL_SWAP_OVERLAY2}
  3659.   WGL_SWAP_OVERLAY3   = $00000008;
  3660.   {$EXTERNALSYM WGL_SWAP_OVERLAY3}
  3661.   WGL_SWAP_OVERLAY4   = $00000010;
  3662.   {$EXTERNALSYM WGL_SWAP_OVERLAY4}
  3663.   WGL_SWAP_OVERLAY5   = $00000020;
  3664.   {$EXTERNALSYM WGL_SWAP_OVERLAY5}
  3665.   WGL_SWAP_OVERLAY6   = $00000040;
  3666.   {$EXTERNALSYM WGL_SWAP_OVERLAY6}
  3667.   WGL_SWAP_OVERLAY7   = $00000080;
  3668.   {$EXTERNALSYM WGL_SWAP_OVERLAY7}
  3669.   WGL_SWAP_OVERLAY8   = $00000100;
  3670.   {$EXTERNALSYM WGL_SWAP_OVERLAY8}
  3671.   WGL_SWAP_OVERLAY9   = $00000200;
  3672.   {$EXTERNALSYM WGL_SWAP_OVERLAY9}
  3673.   WGL_SWAP_OVERLAY10  = $00000400;
  3674.   {$EXTERNALSYM WGL_SWAP_OVERLAY10}
  3675.   WGL_SWAP_OVERLAY11  = $00000800;
  3676.   {$EXTERNALSYM WGL_SWAP_OVERLAY11}
  3677.   WGL_SWAP_OVERLAY12  = $00001000;
  3678.   {$EXTERNALSYM WGL_SWAP_OVERLAY12}
  3679.   WGL_SWAP_OVERLAY13  = $00002000;
  3680.   {$EXTERNALSYM WGL_SWAP_OVERLAY13}
  3681.   WGL_SWAP_OVERLAY14  = $00004000;
  3682.   {$EXTERNALSYM WGL_SWAP_OVERLAY14}
  3683.   WGL_SWAP_OVERLAY15  = $00008000;
  3684.   {$EXTERNALSYM WGL_SWAP_OVERLAY15}
  3685.   WGL_SWAP_UNDERLAY1  = $00010000;
  3686.   {$EXTERNALSYM WGL_SWAP_UNDERLAY1}
  3687.   WGL_SWAP_UNDERLAY2  = $00020000;
  3688.   {$EXTERNALSYM WGL_SWAP_UNDERLAY2}
  3689.   WGL_SWAP_UNDERLAY3  = $00040000;
  3690.   {$EXTERNALSYM WGL_SWAP_UNDERLAY3}
  3691.   WGL_SWAP_UNDERLAY4  = $00080000;
  3692.   {$EXTERNALSYM WGL_SWAP_UNDERLAY4}
  3693.   WGL_SWAP_UNDERLAY5  = $00100000;
  3694.   {$EXTERNALSYM WGL_SWAP_UNDERLAY5}
  3695.   WGL_SWAP_UNDERLAY6  = $00200000;
  3696.   {$EXTERNALSYM WGL_SWAP_UNDERLAY6}
  3697.   WGL_SWAP_UNDERLAY7  = $00400000;
  3698.   {$EXTERNALSYM WGL_SWAP_UNDERLAY7}
  3699.   WGL_SWAP_UNDERLAY8  = $00800000;
  3700.   {$EXTERNALSYM WGL_SWAP_UNDERLAY8}
  3701.   WGL_SWAP_UNDERLAY9  = $01000000;
  3702.   {$EXTERNALSYM WGL_SWAP_UNDERLAY9}
  3703.   WGL_SWAP_UNDERLAY10 = $02000000;
  3704.   {$EXTERNALSYM WGL_SWAP_UNDERLAY10}
  3705.   WGL_SWAP_UNDERLAY11 = $04000000;
  3706.   {$EXTERNALSYM WGL_SWAP_UNDERLAY11}
  3707.   WGL_SWAP_UNDERLAY12 = $08000000;
  3708.   {$EXTERNALSYM WGL_SWAP_UNDERLAY12}
  3709.   WGL_SWAP_UNDERLAY13 = $10000000;
  3710.   {$EXTERNALSYM WGL_SWAP_UNDERLAY13}
  3711.   WGL_SWAP_UNDERLAY14 = $20000000;
  3712.   {$EXTERNALSYM WGL_SWAP_UNDERLAY14}
  3713.   WGL_SWAP_UNDERLAY15 = $40000000;
  3714.   {$EXTERNALSYM WGL_SWAP_UNDERLAY15}
  3715. function wglDescribeLayerPlane(hdc: HDC; iPixelFormat, iLayerPlane: Integer;
  3716.   nBytes: UINT; plpd: LPLAYERPLANEDESCRIPTOR): BOOL; stdcall;
  3717. {$EXTERNALSYM wglDescribeLayerPlane}
  3718. function wglSetLayerPaletteEntries(hdc: HDC; iLayerPlane, iStart, cEntries: Integer;
  3719.   pcr: LPCOLORREF): Integer; stdcall;
  3720. {$EXTERNALSYM wglSetLayerPaletteEntries}
  3721. function wglGetLayerPaletteEntries(hdc: HDC; iLayerPlane, iStart, cEntries: Integer;
  3722.   pcr: LPCOLORREF): Integer; stdcall;
  3723. {$EXTERNALSYM wglGetLayerPaletteEntries}
  3724. function wglRealizeLayerPalette(hdc: HDC; iLayerPlane: Integer; bRealize: BOOL): BOOL; stdcall;
  3725. {$EXTERNALSYM wglRealizeLayerPalette}
  3726. function wglSwapLayerBuffers(hdc: HDC; fuPlanes: UINT): BOOL; stdcall;
  3727. {$EXTERNALSYM wglSwapLayerBuffers}
  3728. type
  3729.   PWglSwap = ^TWglSwap;
  3730.   _WGLSWAP = record
  3731.     hdc: HDC;
  3732.     uiFlags: UINT;
  3733.   end;
  3734.   {$EXTERNALSYM _WGLSWAP}
  3735.   WGLSWAP = _WGLSWAP;
  3736.   {$EXTERNALSYM WGLSWAP}
  3737.   LPWGLSWAP = ^WGLSWAP;
  3738.   {$EXTERNALSYM LPWGLSWAP}
  3739.   TWglSwap = _WGLSWAP;
  3740. const
  3741.   WGL_SWAPMULTIPLE_MAX = 16;
  3742.   {$EXTERNALSYM WGL_SWAPMULTIPLE_MAX}