home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue65 / system / GDIPlus.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2000-11-29  |  5.1 KB  |  103 lines

  1. unit GDIPlus;
  2.  
  3. interface
  4.  
  5. uses Windows;
  6.  
  7. const
  8.     DLLName = 'gdiplus.dll';
  9.  
  10. // Brush styles
  11.  
  12.     bsBackwardDiagonal  = 0;
  13.     bsCross             = 1;
  14.     bsDiagonalCross     = 2;
  15.     bsForwardDiagonal   = 3;
  16.     bsHollow            = 4;
  17.     bsHorizontal        = 5;
  18.     bsPattern           = 6;
  19.     bsSolid             = 7;
  20.     bsVertical          = 8;
  21.  
  22. // Polygon fill modes
  23.  
  24.     Alternate           = 0;
  25.     Winding             = 1;
  26.  
  27. type
  28.     GPPointF = record
  29.                    X, Y: Single;
  30.                end;
  31.  
  32.     GPPointI = record
  33.                    X, Y: Integer;
  34.                end;
  35.  
  36.     GPRectF = record
  37.                   X, Y, Width, Height: Single;
  38.               end;
  39.  
  40.     GPRectI = record
  41.                   X, Y, Width, Height: Integer;
  42.               end;
  43.  
  44. function GdipCreateFromHDC (hdc: HDC; var Graphics: Integer): Integer; stdcall; external DLLName;
  45. function GdipDeleteGraphics (Graphics: Integer): Integer; stdcall; external DLLName;
  46.  
  47. // Brushes
  48.  
  49. function GdipDeleteBrush (Brush: Integer): Integer; stdcall; external DLLName;
  50. function GdipCreateSolidFill (Color: Cardinal; var Brush: Integer): Integer; stdcall; external DLLName;
  51. function GdipCreateHatchBrush (HatchStyle: Integer; ForeCol, BackCol: Cardinal; var Brush: Integer): Integer; stdcall; external DLLName;
  52. function GdipCreateTexture (Bitmap, WrapMode: Integer; var Texture: Integer): Integer; stdcall; external DLLName;
  53. function GdipGetHatchStyle (Brush: Integer; var HatchStyle: Integer): Integer; stdcall; external DLLName;
  54. function GdipGetBrushType (Brush: Integer; var BrushType: Integer): Integer; stdcall; external DLLName;
  55. function GdipSetSolidFillColor (Brush: Integer; Color: Cardinal): Integer; stdcall; external DLLName;
  56. function GdipGetSolidFillColor (Brush: Integer; var Color: Cardinal): Integer; stdcall; external DLLName;
  57. function GdipCreatePathGradientFromPath (Path: Integer; var Brush: Integer): Integer; stdcall; external DLLName;
  58. function GdipSetPathGradientCenterColor (Brush: Integer; Color: Cardinal): Integer; stdcall; external DLLName;
  59.  
  60. // Bitmaps
  61.  
  62. function GdipCreateBitmapFromGraphics (Width, Height, Graphics: Integer; var Bitmap: Integer): Integer; stdcall; external DLLName;
  63.  
  64. // Images
  65.  
  66. function GdipDisposeImage (Image: Integer): Integer; stdcall; external DLLName;
  67.  
  68. // Fills
  69.  
  70. function GdipFillRectangle (Graphics, Brush: Integer; x, y, Width, Height: Single): Integer; stdcall; external DLLName;
  71. function GdipFillRectangleI (Graphics, Brush, x, y, Width, Height: Integer): Integer; stdcall; external DLLName;
  72. function GdipFillRectangles (Graphics, Brush: Integer; var Rects: GPRectF; Count: Integer): Integer; stdcall; external DLLName;
  73. function GdipFillRectanglesI (Graphics, Brush: Integer; var Rects: GPRectI; Count: Integer): Integer; stdcall; external DLLName;
  74. function GdipFillEllipse (Graphics, Brush: Integer; x, y, Width, Height: Single): Integer; stdcall; external DLLName;
  75. function GdipFillEllipseI (Graphics, Brush, x, y, Width, Height: Integer): Integer; stdcall; external DLLName;
  76. function GdipFillPolygon (Graphics, Brush: Integer; var Points: GPPointF; Count, FillMode: Integer): Integer; stdcall; external DLLName;
  77. function GdipFillPolygonI (Graphics, Brush: Integer; var Points: GPPointI; Count, FillMode: Integer): Integer; stdcall; external DLLName;
  78. function GdipFillPolygon2 (Graphics, Brush: Integer; var Points: GPPointF; Count: Integer): Integer; stdcall; external DLLName;
  79. function GdipFillPolygon2I (Graphics, Brush: Integer; var Points: GPPointI; Count: Integer): Integer; stdcall; external DLLName;
  80. function GdipFillPie (Graphics, Brush: Integer; x, y, Width, Height, StartAngle, SweepAngle: Single): Integer; stdcall; external DLLName;
  81. function GdipFillPieI (Graphics, Brush, x, y, Width, Height: Integer; StartAngle, SweepAngle: Single): Integer; stdcall; external DLLName;
  82. function GdipFillPath (Graphics, Brush, Path: Integer): Integer; stdcall; external DLLName;
  83.  
  84. // Paths
  85.  
  86. function GdipCreatePath (FillMode: Integer; var Path: Integer): Integer; stdcall; external DLLName;
  87. function GdipDeletePath (Path: Integer): Integer; stdcall; external DLLName;
  88. function GdipDrawPath (Graphics, Pen, Path: Integer): Integer; stdcall; external DLLName;
  89. function GdipAddPathLine (Path: Integer; x1, y1, x2, y2: Single): Integer; stdcall; external DLLName;
  90. function GdipAddPathArc (Path: Integer; x, y, Width, Height, StartAngle, SweepAngle: Single): Integer; stdcall; external DLLName;
  91. function GdipAddPathCurve (Path: Integer; var MemoryPts: GPPointF; Count: Integer): Integer; stdcall; external DLLName;
  92. function GdipAddPathBeziers (Path: Integer; var MemoryPts: GPPointF; Count: Integer): Integer; stdcall; external DLLName;
  93.  
  94.  
  95.  
  96. function GdipCreateAdjustableArrowCap (Height, Width: Single; IsFilled: Bool; var adjustableArrowCap: Integer): Integer; stdcall; external DLLName;
  97. function GdipSetAdjustableArrowCapHeight (adjustableArrowCap: Integer; Height: Single): Integer; stdcall; external DLLName;
  98. function GdipGetAdjustableArrowCapHeight (adjustableArrowCap: Integer; var Height: Single): Integer; stdcall; external DLLName;
  99.  
  100. implementation
  101.  
  102. end.
  103.