home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / Vcl / GRAPHICS.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  39.2 KB  |  1,078 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1999 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'Graphics.pas' rev: 4.00
  6.  
  7. #ifndef GraphicsHPP
  8. #define GraphicsHPP
  9.  
  10. #pragma delphiheader begin
  11. #pragma option push -w-
  12. #include <Classes.hpp>    // Pascal unit
  13. #include <SysUtils.hpp>    // Pascal unit
  14. #include <Windows.hpp>    // Pascal unit
  15. #include <SysInit.hpp>    // Pascal unit
  16. #include <System.hpp>    // Pascal unit
  17.  
  18. //-- user supplied -----------------------------------------------------------
  19. namespace Graphics
  20. {
  21.   enum TColor {clMin=-0x7fffffff-1, clMax=0x7fffffff};
  22. }
  23. namespace Graphics
  24. {
  25.   enum TFontStyle { fsBold, fsItalic, fsUnderline, fsStrikeOut };
  26.   typedef SmallStringBase<31> TFontDataName;
  27.   typedef SetBase<TFontStyle, fsBold, fsStrikeOut> TFontStylesBase;
  28. }
  29.  
  30. namespace Graphics
  31. {
  32. //-- type declarations -------------------------------------------------------
  33. class DELPHICLASS EInvalidGraphic;
  34. #pragma pack(push, 4)
  35. class PASCALIMPLEMENTATION EInvalidGraphic : public Sysutils::Exception 
  36. {
  37.     typedef Sysutils::Exception inherited;
  38.     
  39. public:
  40.     #pragma option push -w-inl
  41.     /* Exception.Create */ inline __fastcall EInvalidGraphic(const AnsiString Msg) : Sysutils::Exception(
  42.         Msg) { }
  43.     #pragma option pop
  44.     #pragma option push -w-inl
  45.     /* Exception.CreateFmt */ inline __fastcall EInvalidGraphic(const AnsiString Msg, const System::TVarRec 
  46.         * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  47.     #pragma option pop
  48.     #pragma option push -w-inl
  49.     /* Exception.CreateRes */ inline __fastcall EInvalidGraphic(int Ident, Extended Dummy) : Sysutils::Exception(
  50.         Ident, Dummy) { }
  51.     #pragma option pop
  52.     #pragma option push -w-inl
  53.     /* Exception.CreateResFmt */ inline __fastcall EInvalidGraphic(int Ident, const System::TVarRec * Args
  54.         , const int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
  55.     #pragma option pop
  56.     #pragma option push -w-inl
  57.     /* Exception.CreateHelp */ inline __fastcall EInvalidGraphic(const AnsiString Msg, int AHelpContext
  58.         ) : Sysutils::Exception(Msg, AHelpContext) { }
  59.     #pragma option pop
  60.     #pragma option push -w-inl
  61.     /* Exception.CreateFmtHelp */ inline __fastcall EInvalidGraphic(const AnsiString Msg, const System::TVarRec 
  62.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
  63.         ) { }
  64.     #pragma option pop
  65.     #pragma option push -w-inl
  66.     /* Exception.CreateResHelp */ inline __fastcall EInvalidGraphic(int Ident, int AHelpContext) : Sysutils::Exception(
  67.         Ident, AHelpContext) { }
  68.     #pragma option pop
  69.     #pragma option push -w-inl
  70.     /* Exception.CreateResFmtHelp */ inline __fastcall EInvalidGraphic(int Ident, const System::TVarRec 
  71.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
  72.         ) { }
  73.     #pragma option pop
  74.     
  75. public:
  76.     #pragma option push -w-inl
  77.     /* TObject.Destroy */ inline __fastcall virtual ~EInvalidGraphic(void) { }
  78.     #pragma option pop
  79.     
  80. };
  81.  
  82. #pragma pack(pop)
  83.  
  84. class DELPHICLASS EInvalidGraphicOperation;
  85. #pragma pack(push, 4)
  86. class PASCALIMPLEMENTATION EInvalidGraphicOperation : public Sysutils::Exception 
  87. {
  88.     typedef Sysutils::Exception inherited;
  89.     
  90. public:
  91.     #pragma option push -w-inl
  92.     /* Exception.Create */ inline __fastcall EInvalidGraphicOperation(const AnsiString Msg) : Sysutils::Exception(
  93.         Msg) { }
  94.     #pragma option pop
  95.     #pragma option push -w-inl
  96.     /* Exception.CreateFmt */ inline __fastcall EInvalidGraphicOperation(const AnsiString Msg, const System::TVarRec 
  97.         * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  98.     #pragma option pop
  99.     #pragma option push -w-inl
  100.     /* Exception.CreateRes */ inline __fastcall EInvalidGraphicOperation(int Ident, Extended Dummy) : Sysutils::Exception(
  101.         Ident, Dummy) { }
  102.     #pragma option pop
  103.     #pragma option push -w-inl
  104.     /* Exception.CreateResFmt */ inline __fastcall EInvalidGraphicOperation(int Ident, const System::TVarRec 
  105.         * Args, const int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
  106.     #pragma option pop
  107.     #pragma option push -w-inl
  108.     /* Exception.CreateHelp */ inline __fastcall EInvalidGraphicOperation(const AnsiString Msg, int AHelpContext
  109.         ) : Sysutils::Exception(Msg, AHelpContext) { }
  110.     #pragma option pop
  111.     #pragma option push -w-inl
  112.     /* Exception.CreateFmtHelp */ inline __fastcall EInvalidGraphicOperation(const AnsiString Msg, const 
  113.         System::TVarRec * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size
  114.         , AHelpContext) { }
  115.     #pragma option pop
  116.     #pragma option push -w-inl
  117.     /* Exception.CreateResHelp */ inline __fastcall EInvalidGraphicOperation(int Ident, int AHelpContext
  118.         ) : Sysutils::Exception(Ident, AHelpContext) { }
  119.     #pragma option pop
  120.     #pragma option push -w-inl
  121.     /* Exception.CreateResFmtHelp */ inline __fastcall EInvalidGraphicOperation(int Ident, const System::TVarRec 
  122.         * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
  123.         ) { }
  124.     #pragma option pop
  125.     
  126. public:
  127.     #pragma option push -w-inl
  128.     /* TObject.Destroy */ inline __fastcall virtual ~EInvalidGraphicOperation(void) { }
  129.     #pragma option pop
  130.     
  131. };
  132.  
  133. #pragma pack(pop)
  134.  
  135. #pragma pack(push, 4)
  136. struct TResData
  137. {
  138.     unsigned Handle;
  139. } ;
  140. #pragma pack(pop)
  141.  
  142. #pragma option push -b-
  143. enum TFontPitch { fpDefault, fpVariable, fpFixed };
  144. #pragma option pop
  145.  
  146. typedef AnsiString TFontName;
  147.  
  148. typedef Byte TFontCharset;
  149.  
  150. typedef Set<TFontStyle, fsBold, fsStrikeOut>  TFontStyles;
  151.  
  152. #pragma pack(push, 4)
  153. struct TFontData
  154. {
  155.     HFONT Handle;
  156.     int Height;
  157.     TFontPitch Pitch;
  158.     TFontStylesBase Style;
  159.     TFontCharset Charset;
  160.     TFontDataName Name;
  161. } ;
  162. #pragma pack(pop)
  163.  
  164. #pragma option push -b-
  165. enum TPenStyle { psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame };
  166. #pragma option pop
  167.  
  168. #pragma option push -b-
  169. enum TPenMode { pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, pmMaskPenNot, pmMergeNotPen, 
  170.     pmMaskNotPen, pmMerge, pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor };
  171. #pragma option pop
  172.  
  173. #pragma pack(push, 4)
  174. struct TPenData
  175. {
  176.     HPEN Handle;
  177.     TColor Color;
  178.     int Width;
  179.     TPenStyle Style;
  180. } ;
  181. #pragma pack(pop)
  182.  
  183. #pragma option push -b-
  184. enum TBrushStyle { bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross 
  185.     };
  186. #pragma option pop
  187.  
  188. class DELPHICLASS TBitmap;
  189. class DELPHICLASS TGraphic;
  190. #pragma option push -b-
  191. enum TProgressStage { psStarting, psRunning, psEnding };
  192. #pragma option pop
  193.  
  194. typedef void __fastcall (__closure *TProgressEvent)(System::TObject* Sender, TProgressStage Stage, Byte 
  195.     PercentDone, bool RedrawNow, const Windows::TRect &R, const AnsiString Msg);
  196.  
  197. class DELPHICLASS TCanvas;
  198. #pragma pack(push, 4)
  199. class PASCALIMPLEMENTATION TGraphic : public Classes::TPersistent 
  200. {
  201.     typedef Classes::TPersistent inherited;
  202.     
  203. private:
  204.     Classes::TNotifyEvent FOnChange;
  205.     TProgressEvent FOnProgress;
  206.     bool FModified;
  207.     bool FTransparent;
  208.     bool FPaletteModified;
  209.     void __fastcall SetModified(bool Value);
  210.     
  211. protected:
  212.     __fastcall virtual TGraphic(void);
  213.     virtual void __fastcall Changed(System::TObject* Sender);
  214.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  215.     virtual void __fastcall Draw(TCanvas* ACanvas, const Windows::TRect &Rect) = 0 ;
  216.     virtual bool __fastcall Equals(TGraphic* Graphic);
  217.     virtual bool __fastcall GetEmpty(void) = 0 ;
  218.     virtual int __fastcall GetHeight(void) = 0 ;
  219.     virtual HPALETTE __fastcall GetPalette(void);
  220.     virtual bool __fastcall GetTransparent(void);
  221.     virtual int __fastcall GetWidth(void) = 0 ;
  222.     DYNAMIC void __fastcall Progress(System::TObject* Sender, TProgressStage Stage, Byte PercentDone, bool 
  223.         RedrawNow, const Windows::TRect &R, const AnsiString Msg);
  224.     virtual void __fastcall ReadData(Classes::TStream* Stream);
  225.     virtual void __fastcall SetHeight(int Value) = 0 ;
  226.     virtual void __fastcall SetPalette(HPALETTE Value);
  227.     virtual void __fastcall SetTransparent(bool Value);
  228.     virtual void __fastcall SetWidth(int Value) = 0 ;
  229.     virtual void __fastcall WriteData(Classes::TStream* Stream);
  230.     
  231. public:
  232.     virtual void __fastcall LoadFromFile(const AnsiString Filename);
  233.     virtual void __fastcall SaveToFile(const AnsiString Filename);
  234.     virtual void __fastcall LoadFromStream(Classes::TStream* Stream) = 0 ;
  235.     virtual void __fastcall SaveToStream(Classes::TStream* Stream) = 0 ;
  236.     virtual void __fastcall LoadFromClipboardFormat(Word AFormat, unsigned AData, HPALETTE APalette) = 0 
  237.         ;
  238.     virtual void __fastcall SaveToClipboardFormat(Word &AFormat, unsigned &AData, HPALETTE &APalette) = 0 
  239.         ;
  240.     __property bool Empty = {read=GetEmpty, nodefault};
  241.     __property int Height = {read=GetHeight, write=SetHeight, nodefault};
  242.     __property bool Modified = {read=FModified, write=SetModified, nodefault};
  243.     __property HPALETTE Palette = {read=GetPalette, write=SetPalette, nodefault};
  244.     __property bool PaletteModified = {read=FPaletteModified, write=FPaletteModified, nodefault};
  245.     __property bool Transparent = {read=GetTransparent, write=SetTransparent, nodefault};
  246.     __property int Width = {read=GetWidth, write=SetWidth, nodefault};
  247.     __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  248.     __property TProgressEvent OnProgress = {read=FOnProgress, write=FOnProgress};
  249. public:
  250.     #pragma option push -w-inl
  251.     /* TPersistent.Destroy */ inline __fastcall virtual ~TGraphic(void) { }
  252.     #pragma option pop
  253.     
  254. };
  255.  
  256. #pragma pack(pop)
  257.  
  258. class DELPHICLASS TBitmapImage;
  259. class DELPHICLASS TSharedImage;
  260. #pragma pack(push, 4)
  261. class PASCALIMPLEMENTATION TSharedImage : public System::TObject 
  262. {
  263.     typedef System::TObject inherited;
  264.     
  265. private:
  266.     int FRefCount;
  267.     
  268. protected:
  269.     void __fastcall Reference(void);
  270.     void __fastcall Release(void);
  271.     virtual void __fastcall FreeHandle(void) = 0 ;
  272.     __property int RefCount = {read=FRefCount, nodefault};
  273. public:
  274.     #pragma option push -w-inl
  275.     /* TObject.Create */ inline __fastcall TSharedImage(void) : System::TObject() { }
  276.     #pragma option pop
  277.     #pragma option push -w-inl
  278.     /* TObject.Destroy */ inline __fastcall virtual ~TSharedImage(void) { }
  279.     #pragma option pop
  280.     
  281. };
  282.  
  283. #pragma pack(pop)
  284.  
  285. #pragma pack(push, 4)
  286. class PASCALIMPLEMENTATION TBitmapImage : public TSharedImage 
  287. {
  288.     typedef TSharedImage inherited;
  289.     
  290. private:
  291.     HBITMAP FHandle;
  292.     HBITMAP FMaskHandle;
  293.     HPALETTE FPalette;
  294.     HBITMAP FDIBHandle;
  295.     tagDIBSECTION FDIB;
  296.     bool FOS2Format;
  297.     bool FHalftone;
  298.     
  299. protected:
  300.     virtual void __fastcall FreeHandle(void);
  301.     
  302. public:
  303.     __fastcall virtual ~TBitmapImage(void);
  304. public:
  305.     #pragma option push -w-inl
  306.     /* TObject.Create */ inline __fastcall TBitmapImage(void) : TSharedImage() { }
  307.     #pragma option pop
  308.     
  309. };
  310.  
  311. #pragma pack(pop)
  312.  
  313. #pragma option push -b-
  314. enum TTransparentMode { tmAuto, tmFixed };
  315. #pragma option pop
  316.  
  317. #pragma option push -b-
  318. enum TBitmapHandleType { bmDIB, bmDDB };
  319. #pragma option pop
  320.  
  321. #pragma option push -b-
  322. enum TPixelFormat { pfDevice, pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit, pfCustom }
  323.     ;
  324. #pragma option pop
  325.  
  326. #pragma pack(push, 4)
  327. class PASCALIMPLEMENTATION TBitmap : public TGraphic 
  328. {
  329.     typedef TGraphic inherited;
  330.     
  331. private:
  332.     TBitmapImage* FImage;
  333.     TCanvas* FCanvas;
  334.     bool FIgnorePalette;
  335.     bool FMaskBitsValid;
  336.     bool FMaskValid;
  337.     TColor FTransparentColor;
  338.     TTransparentMode FTransparentMode;
  339.     void __fastcall Changing(System::TObject* Sender);
  340.     void __fastcall CopyImage(HBITMAP AHandle, HPALETTE APalette, const tagDIBSECTION &DIB);
  341.     void __fastcall DIBNeeded(void);
  342.     void __fastcall FreeContext(void);
  343.     TCanvas* __fastcall GetCanvas(void);
  344.     virtual HBITMAP __fastcall GetHandle(void);
  345.     TBitmapHandleType __fastcall GetHandleType(void);
  346.     virtual HBITMAP __fastcall GetMaskHandle(void);
  347.     bool __fastcall GetMonochrome(void);
  348.     TPixelFormat __fastcall GetPixelFormat(void);
  349.     void * __fastcall GetScanline(int Row);
  350.     TColor __fastcall GetTransparentColor(void);
  351.     void __fastcall NewImage(HBITMAP NewHandle, HPALETTE NewPalette, const tagDIBSECTION &NewDIB, bool 
  352.         OS2Format);
  353.     void __fastcall ReadStream(Classes::TStream* Stream, int Size);
  354.     void __fastcall ReadDIB(Classes::TStream* Stream, unsigned ImageSize);
  355.     void __fastcall SetHandle(HBITMAP Value);
  356.     virtual void __fastcall SetHandleType(TBitmapHandleType Value);
  357.     void __fastcall SetMaskHandle(HBITMAP Value);
  358.     void __fastcall SetMonochrome(bool Value);
  359.     void __fastcall SetPixelFormat(TPixelFormat Value);
  360.     void __fastcall SetTransparentColor(TColor Value);
  361.     void __fastcall SetTransparentMode(TTransparentMode Value);
  362.     bool __fastcall TransparentColorStored(void);
  363.     void __fastcall WriteStream(Classes::TStream* Stream, bool WriteSize);
  364.     
  365. protected:
  366.     virtual void __fastcall Changed(System::TObject* Sender);
  367.     virtual void __fastcall Draw(TCanvas* ACanvas, const Windows::TRect &Rect);
  368.     virtual bool __fastcall GetEmpty(void);
  369.     virtual int __fastcall GetHeight(void);
  370.     virtual HPALETTE __fastcall GetPalette(void);
  371.     virtual int __fastcall GetWidth(void);
  372.     void __fastcall HandleNeeded(void);
  373.     void __fastcall MaskHandleNeeded(void);
  374.     void __fastcall PaletteNeeded(void);
  375.     virtual void __fastcall ReadData(Classes::TStream* Stream);
  376.     virtual void __fastcall SetHeight(int Value);
  377.     virtual void __fastcall SetPalette(HPALETTE Value);
  378.     virtual void __fastcall SetWidth(int Value);
  379.     virtual void __fastcall WriteData(Classes::TStream* Stream);
  380.     
  381. public:
  382.     __fastcall virtual TBitmap(void);
  383.     __fastcall virtual ~TBitmap(void);
  384.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  385.     void __fastcall Dormant(void);
  386.     void __fastcall FreeImage(void);
  387.     virtual void __fastcall LoadFromClipboardFormat(Word AFormat, unsigned AData, HPALETTE APalette);
  388.     virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
  389.     void __fastcall LoadFromResourceName(unsigned Instance, const AnsiString ResName);
  390.     void __fastcall LoadFromResourceID(unsigned Instance, int ResID);
  391.     void __fastcall Mask(TColor TransparentColor);
  392.     HBITMAP __fastcall ReleaseHandle(void);
  393.     HBITMAP __fastcall ReleaseMaskHandle(void);
  394.     HPALETTE __fastcall ReleasePalette(void);
  395.     virtual void __fastcall SaveToClipboardFormat(Word &Format, unsigned &Data, HPALETTE &APalette);
  396.     virtual void __fastcall SaveToStream(Classes::TStream* Stream);
  397.     __property TCanvas* Canvas = {read=GetCanvas};
  398.     __property HBITMAP Handle = {read=GetHandle, write=SetHandle, nodefault};
  399.     __property TBitmapHandleType HandleType = {read=GetHandleType, write=SetHandleType, nodefault};
  400.     __property bool IgnorePalette = {read=FIgnorePalette, write=FIgnorePalette, nodefault};
  401.     __property HBITMAP MaskHandle = {read=GetMaskHandle, write=SetMaskHandle, nodefault};
  402.     __property bool Monochrome = {read=GetMonochrome, write=SetMonochrome, nodefault};
  403.     __property TPixelFormat PixelFormat = {read=GetPixelFormat, write=SetPixelFormat, nodefault};
  404.     __property void * ScanLine[int Row] = {read=GetScanline};
  405.     __property TColor TransparentColor = {read=GetTransparentColor, write=SetTransparentColor, stored=TransparentColorStored
  406.         , nodefault};
  407.     __property TTransparentMode TransparentMode = {read=FTransparentMode, write=SetTransparentMode, default=0
  408.         };
  409. };
  410.  
  411. #pragma pack(pop)
  412.  
  413. #pragma pack(push, 4)
  414. struct TBrushData
  415. {
  416.     HBRUSH Handle;
  417.     TColor Color;
  418.     TBitmap* Bitmap;
  419.     TBrushStyle Style;
  420. } ;
  421. #pragma pack(pop)
  422.  
  423. struct TResource;
  424. typedef TResource *PResource;
  425.  
  426. #pragma pack(push, 4)
  427. struct TResource
  428. {
  429.     TResource *Next;
  430.     int RefCount;
  431.     unsigned Handle;
  432.     Word HashCode;
  433.     union
  434.     {
  435.         struct 
  436.         {
  437.             TBrushData Brush;
  438.             
  439.         };
  440.         struct 
  441.         {
  442.             TPenData Pen;
  443.             
  444.         };
  445.         struct 
  446.         {
  447.             TFontData Font;
  448.             
  449.         };
  450.         struct 
  451.         {
  452.             TResData Data;
  453.             
  454.         };
  455.         
  456.     };
  457. } ;
  458. #pragma pack(pop)
  459.  
  460. class DELPHICLASS TGraphicsObject;
  461. #pragma pack(push, 4)
  462. class PASCALIMPLEMENTATION TGraphicsObject : public Classes::TPersistent 
  463. {
  464.     typedef Classes::TPersistent inherited;
  465.     
  466. private:
  467.     Classes::TNotifyEvent FOnChange;
  468.     TResource *FResource;
  469.     _RTL_CRITICAL_SECTION *FOwnerLock;
  470.     
  471. protected:
  472.     DYNAMIC void __fastcall Changed(void);
  473.     void __fastcall Lock(void);
  474.     void __fastcall Unlock(void);
  475.     
  476. public:
  477.     __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  478.     __property Windows::PRTLCriticalSection OwnerCriticalSection = {read=FOwnerLock, write=FOwnerLock};
  479.         
  480. public:
  481.     #pragma option push -w-inl
  482.     /* TPersistent.Destroy */ inline __fastcall virtual ~TGraphicsObject(void) { }
  483.     #pragma option pop
  484.     
  485. public:
  486.     #pragma option push -w-inl
  487.     /* TObject.Create */ inline __fastcall TGraphicsObject(void) : Classes::TPersistent() { }
  488.     #pragma option pop
  489.     
  490. };
  491.  
  492. #pragma pack(pop)
  493.  
  494. __interface IChangeNotifier;
  495. typedef System::DelphiInterface<IChangeNotifier> _di_IChangeNotifier;
  496. __interface IChangeNotifier  : public IUnknown /* __guid="{1FB62321-44A7-11D0-9E93-0020AF3D82DA}" */
  497.     
  498. {
  499.     
  500. public:
  501.     virtual void __fastcall Changed(void) = 0 ;
  502. };
  503.  
  504. class DELPHICLASS TFont;
  505. #pragma pack(push, 4)
  506. class PASCALIMPLEMENTATION TFont : public TGraphicsObject 
  507. {
  508.     typedef TGraphicsObject inherited;
  509.     
  510. private:
  511.     TColor FColor;
  512.     int FPixelsPerInch;
  513.     _di_IChangeNotifier FNotify;
  514.     void __fastcall GetData(TFontData &FontData);
  515.     void __fastcall SetData(const TFontData &FontData);
  516.     
  517. protected:
  518.     DYNAMIC void __fastcall Changed(void);
  519.     HFONT __fastcall GetHandle(void);
  520.     int __fastcall GetHeight(void);
  521.     AnsiString __fastcall GetName();
  522.     TFontPitch __fastcall GetPitch(void);
  523.     int __fastcall GetSize(void);
  524.     TFontStyles __fastcall GetStyle(void);
  525.     TFontCharset __fastcall GetCharset(void);
  526.     void __fastcall SetColor(TColor Value);
  527.     void __fastcall SetHandle(HFONT Value);
  528.     void __fastcall SetHeight(int Value);
  529.     void __fastcall SetName(const AnsiString Value);
  530.     void __fastcall SetPitch(TFontPitch Value);
  531.     void __fastcall SetSize(int Value);
  532.     void __fastcall SetStyle(TFontStyles Value);
  533.     void __fastcall SetCharset(TFontCharset Value);
  534.     
  535. public:
  536.     __fastcall TFont(void);
  537.     __fastcall virtual ~TFont(void);
  538.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  539.     __property _di_IChangeNotifier FontAdapter = {read=FNotify, write=FNotify};
  540.     __property HFONT Handle = {read=GetHandle, write=SetHandle, nodefault};
  541.     __property int PixelsPerInch = {read=FPixelsPerInch, write=FPixelsPerInch, nodefault};
  542.     
  543. __published:
  544.     __property TFontCharset Charset = {read=GetCharset, write=SetCharset, nodefault};
  545.     __property TColor Color = {read=FColor, write=SetColor, nodefault};
  546.     __property int Height = {read=GetHeight, write=SetHeight, nodefault};
  547.     __property AnsiString Name = {read=GetName, write=SetName};
  548.     __property TFontPitch Pitch = {read=GetPitch, write=SetPitch, default=0};
  549.     __property int Size = {read=GetSize, write=SetSize, stored=false, nodefault};
  550.     __property TFontStyles Style = {read=GetStyle, write=SetStyle, nodefault};
  551. };
  552.  
  553. #pragma pack(pop)
  554.  
  555. class DELPHICLASS TPen;
  556. #pragma pack(push, 4)
  557. class PASCALIMPLEMENTATION TPen : public TGraphicsObject 
  558. {
  559.     typedef TGraphicsObject inherited;
  560.     
  561. private:
  562.     TPenMode FMode;
  563.     void __fastcall GetData(TPenData &PenData);
  564.     void __fastcall SetData(const TPenData &PenData);
  565.     
  566. protected:
  567.     TColor __fastcall GetColor(void);
  568.     void __fastcall SetColor(TColor Value);
  569.     HPEN __fastcall GetHandle(void);
  570.     void __fastcall SetHandle(HPEN Value);
  571.     void __fastcall SetMode(TPenMode Value);
  572.     TPenStyle __fastcall GetStyle(void);
  573.     void __fastcall SetStyle(TPenStyle Value);
  574.     int __fastcall GetWidth(void);
  575.     void __fastcall SetWidth(int Value);
  576.     
  577. public:
  578.     __fastcall TPen(void);
  579.     __fastcall virtual ~TPen(void);
  580.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  581.     __property HPEN Handle = {read=GetHandle, write=SetHandle, nodefault};
  582.     
  583. __published:
  584.     __property TColor Color = {read=GetColor, write=SetColor, default=0};
  585.     __property TPenMode Mode = {read=FMode, write=SetMode, default=4};
  586.     __property TPenStyle Style = {read=GetStyle, write=SetStyle, default=0};
  587.     __property int Width = {read=GetWidth, write=SetWidth, default=1};
  588. };
  589.  
  590. #pragma pack(pop)
  591.  
  592. class DELPHICLASS TBrush;
  593. #pragma pack(push, 4)
  594. class PASCALIMPLEMENTATION TBrush : public TGraphicsObject 
  595. {
  596.     typedef TGraphicsObject inherited;
  597.     
  598. private:
  599.     void __fastcall GetData(TBrushData &BrushData);
  600.     void __fastcall SetData(const TBrushData &BrushData);
  601.     
  602. protected:
  603.     TBitmap* __fastcall GetBitmap(void);
  604.     void __fastcall SetBitmap(TBitmap* Value);
  605.     TColor __fastcall GetColor(void);
  606.     void __fastcall SetColor(TColor Value);
  607.     HBRUSH __fastcall GetHandle(void);
  608.     void __fastcall SetHandle(HBRUSH Value);
  609.     TBrushStyle __fastcall GetStyle(void);
  610.     void __fastcall SetStyle(TBrushStyle Value);
  611.     
  612. public:
  613.     __fastcall TBrush(void);
  614.     __fastcall virtual ~TBrush(void);
  615.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  616.     __property TBitmap* Bitmap = {read=GetBitmap, write=SetBitmap};
  617.     __property HBRUSH Handle = {read=GetHandle, write=SetHandle, nodefault};
  618.     
  619. __published:
  620.     __property TColor Color = {read=GetColor, write=SetColor, default=16777215};
  621.     __property TBrushStyle Style = {read=GetStyle, write=SetStyle, default=0};
  622. };
  623.  
  624. #pragma pack(pop)
  625.  
  626. #pragma option push -b-
  627. enum TFillStyle { fsSurface, fsBorder };
  628. #pragma option pop
  629.  
  630. #pragma option push -b-
  631. enum TFillMode { fmAlternate, fmWinding };
  632. #pragma option pop
  633.  
  634. typedef int TCopyMode;
  635.  
  636. #pragma option push -b-
  637. enum TCanvasStates { csHandleValid, csFontValid, csPenValid, csBrushValid };
  638. #pragma option pop
  639.  
  640. typedef Set<TCanvasStates, csHandleValid, csBrushValid>  TCanvasState;
  641.  
  642. #pragma option push -b-
  643. enum TCanvasOrientation { coLeftToRight, coRightToLeft };
  644. #pragma option pop
  645.  
  646. #pragma pack(push, 4)
  647. class PASCALIMPLEMENTATION TCanvas : public Classes::TPersistent 
  648. {
  649.     typedef Classes::TPersistent inherited;
  650.     
  651. private:
  652.     HDC FHandle;
  653.     TCanvasState State;
  654.     TFont* FFont;
  655.     TPen* FPen;
  656.     TBrush* FBrush;
  657.     Windows::TPoint FPenPos;
  658.     int FCopyMode;
  659.     Classes::TNotifyEvent FOnChange;
  660.     Classes::TNotifyEvent FOnChanging;
  661.     _RTL_CRITICAL_SECTION FLock;
  662.     int FLockCount;
  663.     int FTextFlags;
  664.     void __fastcall CreateBrush(void);
  665.     void __fastcall CreateFont(void);
  666.     void __fastcall CreatePen(void);
  667.     void __fastcall BrushChanged(System::TObject* ABrush);
  668.     void __fastcall DeselectHandles(void);
  669.     TCanvasOrientation __fastcall GetCanvasOrientation(void);
  670.     Windows::TRect __fastcall GetClipRect();
  671.     HDC __fastcall GetHandle(void);
  672.     Windows::TPoint __fastcall GetPenPos();
  673.     TColor __fastcall GetPixel(int X, int Y);
  674.     void __fastcall FontChanged(System::TObject* AFont);
  675.     void __fastcall PenChanged(System::TObject* APen);
  676.     void __fastcall SetBrush(TBrush* Value);
  677.     void __fastcall SetFont(TFont* Value);
  678.     void __fastcall SetHandle(HDC Value);
  679.     void __fastcall SetPen(TPen* Value);
  680.     void __fastcall SetPenPos(const Windows::TPoint &Value);
  681.     void __fastcall SetPixel(int X, int Y, TColor Value);
  682.     
  683. protected:
  684.     virtual void __fastcall Changed(void);
  685.     virtual void __fastcall Changing(void);
  686.     virtual void __fastcall CreateHandle(void);
  687.     void __fastcall RequiredState(TCanvasState ReqState);
  688.     
  689. public:
  690.     __fastcall TCanvas(void);
  691.     __fastcall virtual ~TCanvas(void);
  692.     void __fastcall Arc(int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4);
  693.     void __fastcall BrushCopy(const Windows::TRect &Dest, TBitmap* Bitmap, const Windows::TRect &Source
  694.         , TColor Color);
  695.     void __fastcall Chord(int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4);
  696.     void __fastcall CopyRect(const Windows::TRect &Dest, TCanvas* Canvas, const Windows::TRect &Source)
  697.         ;
  698.     void __fastcall Draw(int X, int Y, TGraphic* Graphic);
  699.     void __fastcall DrawFocusRect(const Windows::TRect &Rect);
  700.     void __fastcall Ellipse(int X1, int Y1, int X2, int Y2);
  701.     void __fastcall FillRect(const Windows::TRect &Rect);
  702.     void __fastcall FloodFill(int X, int Y, TColor Color, TFillStyle FillStyle);
  703.     void __fastcall FrameRect(const Windows::TRect &Rect);
  704.     void __fastcall LineTo(int X, int Y);
  705.     void __fastcall Lock(void);
  706.     void __fastcall MoveTo(int X, int Y);
  707.     void __fastcall Pie(int X1, int Y1, int X2, int Y2, int X3, int Y3, int X4, int Y4);
  708.     void __fastcall Polygon(const Windows::TPoint * Points, const int Points_Size);
  709.     void __fastcall Polyline(const Windows::TPoint * Points, const int Points_Size);
  710.     void __fastcall PolyBezier(const Windows::TPoint * Points, const int Points_Size);
  711.     void __fastcall PolyBezierTo(const Windows::TPoint * Points, const int Points_Size);
  712.     void __fastcall Rectangle(int X1, int Y1, int X2, int Y2);
  713.     void __fastcall Refresh(void);
  714.     void __fastcall RoundRect(int X1, int Y1, int X2, int Y2, int X3, int Y3);
  715.     void __fastcall StretchDraw(const Windows::TRect &Rect, TGraphic* Graphic);
  716.     tagSIZE __fastcall TextExtent(const AnsiString Text);
  717.     int __fastcall TextHeight(const AnsiString Text);
  718.     void __fastcall TextOut(int X, int Y, const AnsiString Text);
  719.     void __fastcall TextRect(const Windows::TRect &Rect, int X, int Y, const AnsiString Text);
  720.     int __fastcall TextWidth(const AnsiString Text);
  721.     bool __fastcall TryLock(void);
  722.     void __fastcall Unlock(void);
  723.     __property Windows::TRect ClipRect = {read=GetClipRect};
  724.     __property HDC Handle = {read=GetHandle, write=SetHandle, nodefault};
  725.     __property int LockCount = {read=FLockCount, nodefault};
  726.     __property TCanvasOrientation CanvasOrientation = {read=GetCanvasOrientation, nodefault};
  727.     __property Windows::TPoint PenPos = {read=GetPenPos, write=SetPenPos};
  728.     __property TColor Pixels[int X][int Y] = {read=GetPixel, write=SetPixel};
  729.     __property int TextFlags = {read=FTextFlags, write=FTextFlags, nodefault};
  730.     __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  731.     __property Classes::TNotifyEvent OnChanging = {read=FOnChanging, write=FOnChanging};
  732.     
  733. __published:
  734.     __property TBrush* Brush = {read=FBrush, write=SetBrush};
  735.     __property int CopyMode = {read=FCopyMode, write=FCopyMode, default=13369376};
  736.     __property TFont* Font = {read=FFont, write=SetFont};
  737.     __property TPen* Pen = {read=FPen, write=SetPen};
  738. };
  739.  
  740. #pragma pack(pop)
  741.  
  742. typedef TMetaClass*TGraphicClass;
  743.  
  744. class DELPHICLASS TPicture;
  745. class DELPHICLASS TIcon;
  746. class DELPHICLASS TMetafile;
  747. #pragma pack(push, 4)
  748. class PASCALIMPLEMENTATION TPicture : public Classes::TPersistent 
  749. {
  750.     typedef Classes::TPersistent inherited;
  751.     
  752. private:
  753.     TGraphic* FGraphic;
  754.     Classes::TNotifyEvent FOnChange;
  755.     _di_IChangeNotifier FNotify;
  756.     TProgressEvent FOnProgress;
  757.     void __fastcall ForceType(TMetaClass* GraphicType);
  758.     TBitmap* __fastcall GetBitmap(void);
  759.     int __fastcall GetHeight(void);
  760.     TIcon* __fastcall GetIcon(void);
  761.     TMetafile* __fastcall GetMetafile(void);
  762.     int __fastcall GetWidth(void);
  763.     void __fastcall ReadData(Classes::TStream* Stream);
  764.     void __fastcall SetBitmap(TBitmap* Value);
  765.     void __fastcall SetGraphic(TGraphic* Value);
  766.     void __fastcall SetIcon(TIcon* Value);
  767.     void __fastcall SetMetafile(TMetafile* Value);
  768.     void __fastcall WriteData(Classes::TStream* Stream);
  769.     
  770. protected:
  771.     virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
  772.     DYNAMIC void __fastcall Changed(System::TObject* Sender);
  773.     DYNAMIC void __fastcall Progress(System::TObject* Sender, TProgressStage Stage, Byte PercentDone, bool 
  774.         RedrawNow, const Windows::TRect &R, const AnsiString Msg);
  775.     virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
  776.     
  777. public:
  778.     __fastcall TPicture(void);
  779.     __fastcall virtual ~TPicture(void);
  780.     void __fastcall LoadFromFile(const AnsiString Filename);
  781.     void __fastcall SaveToFile(const AnsiString Filename);
  782.     void __fastcall LoadFromClipboardFormat(Word AFormat, unsigned AData, HPALETTE APalette);
  783.     void __fastcall SaveToClipboardFormat(Word &AFormat, unsigned &AData, HPALETTE &APalette);
  784.     /*         class method */ static bool __fastcall SupportsClipboardFormat(TMetaClass* vmt, Word AFormat
  785.         );
  786.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  787.     /*         class method */ static void __fastcall RegisterFileFormat(TMetaClass* vmt, const AnsiString 
  788.         AExtension, const AnsiString ADescription, TMetaClass* AGraphicClass);
  789.     /*         class method */ static void __fastcall RegisterFileFormatRes(TMetaClass* vmt, const AnsiString 
  790.         AExtension, int ADescriptionResID, TMetaClass* AGraphicClass);
  791.     /*         class method */ static void __fastcall RegisterClipboardFormat(TMetaClass* vmt, Word AFormat
  792.         , TMetaClass* AGraphicClass);
  793.     /*         class method */ static void __fastcall UnregisterGraphicClass(TMetaClass* vmt, TMetaClass* 
  794.         AClass);
  795.     __property TBitmap* Bitmap = {read=GetBitmap, write=SetBitmap};
  796.     __property TGraphic* Graphic = {read=FGraphic, write=SetGraphic};
  797.     __property _di_IChangeNotifier PictureAdapter = {read=FNotify, write=FNotify};
  798.     __property int Height = {read=GetHeight, nodefault};
  799.     __property TIcon* Icon = {read=GetIcon, write=SetIcon};
  800.     __property TMetafile* Metafile = {read=GetMetafile, write=SetMetafile};
  801.     __property int Width = {read=GetWidth, nodefault};
  802.     __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  803.     __property TProgressEvent OnProgress = {read=FOnProgress, write=FOnProgress};
  804. };
  805.  
  806. #pragma pack(pop)
  807.  
  808. class DELPHICLASS TMetafileCanvas;
  809. #pragma pack(push, 4)
  810. class PASCALIMPLEMENTATION TMetafileCanvas : public TCanvas 
  811. {
  812.     typedef TCanvas inherited;
  813.     
  814. private:
  815.     TMetafile* FMetafile;
  816.     
  817. public:
  818.     __fastcall TMetafileCanvas(TMetafile* AMetafile, HDC ReferenceDevice);
  819.     __fastcall TMetafileCanvas(TMetafile* AMetafile, HDC ReferenceDevice, const AnsiString CreatedBy, const 
  820.         AnsiString Description);
  821.     __fastcall virtual ~TMetafileCanvas(void);
  822. };
  823.  
  824. #pragma pack(pop)
  825.  
  826. class DELPHICLASS TMetafileImage;
  827. #pragma pack(push, 4)
  828. class PASCALIMPLEMENTATION TMetafileImage : public TSharedImage 
  829. {
  830.     typedef TSharedImage inherited;
  831.     
  832. private:
  833.     unsigned FHandle;
  834.     int FWidth;
  835.     int FHeight;
  836.     HPALETTE FPalette;
  837.     Word FInch;
  838.     int FTempWidth;
  839.     int FTempHeight;
  840.     
  841. protected:
  842.     virtual void __fastcall FreeHandle(void);
  843.     
  844. public:
  845.     __fastcall virtual ~TMetafileImage(void);
  846. public:
  847.     #pragma option push -w-inl
  848.     /* TObject.Create */ inline __fastcall TMetafileImage(void) : TSharedImage() { }
  849.     #pragma option pop
  850.     
  851. };
  852.  
  853. #pragma pack(pop)
  854.  
  855. #pragma pack(push, 4)
  856. class PASCALIMPLEMENTATION TMetafile : public TGraphic 
  857. {
  858.     typedef TGraphic inherited;
  859.     
  860. private:
  861.     TMetafileImage* FImage;
  862.     bool FEnhanced;
  863.     AnsiString __fastcall GetAuthor();
  864.     AnsiString __fastcall GetDesc();
  865.     unsigned __fastcall GetHandle(void);
  866.     Word __fastcall GetInch(void);
  867.     int __fastcall GetMMHeight(void);
  868.     int __fastcall GetMMWidth(void);
  869.     void __fastcall NewImage(void);
  870.     void __fastcall SetHandle(unsigned Value);
  871.     void __fastcall SetInch(Word Value);
  872.     void __fastcall SetMMHeight(int Value);
  873.     void __fastcall SetMMWidth(int Value);
  874.     void __fastcall UniqueImage(void);
  875.     
  876. protected:
  877.     virtual bool __fastcall GetEmpty(void);
  878.     virtual int __fastcall GetHeight(void);
  879.     virtual HPALETTE __fastcall GetPalette(void);
  880.     virtual int __fastcall GetWidth(void);
  881.     virtual void __fastcall Draw(TCanvas* ACanvas, const Windows::TRect &Rect);
  882.     virtual void __fastcall ReadData(Classes::TStream* Stream);
  883.     void __fastcall ReadEMFStream(Classes::TStream* Stream);
  884.     void __fastcall ReadWMFStream(Classes::TStream* Stream, int Length);
  885.     virtual void __fastcall SetHeight(int Value);
  886.     virtual void __fastcall SetTransparent(bool Value);
  887.     virtual void __fastcall SetWidth(int Value);
  888.     bool __fastcall TestEMF(Classes::TStream* Stream);
  889.     virtual void __fastcall WriteData(Classes::TStream* Stream);
  890.     void __fastcall WriteEMFStream(Classes::TStream* Stream);
  891.     void __fastcall WriteWMFStream(Classes::TStream* Stream);
  892.     
  893. public:
  894.     __fastcall virtual TMetafile(void);
  895.     __fastcall virtual ~TMetafile(void);
  896.     void __fastcall Clear(void);
  897.     virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
  898.     virtual void __fastcall SaveToFile(const AnsiString Filename);
  899.     virtual void __fastcall SaveToStream(Classes::TStream* Stream);
  900.     virtual void __fastcall LoadFromClipboardFormat(Word AFormat, unsigned AData, HPALETTE APalette);
  901.     virtual void __fastcall SaveToClipboardFormat(Word &AFormat, unsigned &AData, HPALETTE &APalette);
  902.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  903.     unsigned __fastcall ReleaseHandle(void);
  904.     __property AnsiString CreatedBy = {read=GetAuthor};
  905.     __property AnsiString Description = {read=GetDesc};
  906.     __property bool Enhanced = {read=FEnhanced, write=FEnhanced, default=1};
  907.     __property unsigned Handle = {read=GetHandle, write=SetHandle, nodefault};
  908.     __property int MMWidth = {read=GetMMWidth, write=SetMMWidth, nodefault};
  909.     __property int MMHeight = {read=GetMMHeight, write=SetMMHeight, nodefault};
  910.     __property Word Inch = {read=GetInch, write=SetInch, nodefault};
  911. };
  912.  
  913. #pragma pack(pop)
  914.  
  915. class DELPHICLASS TIconImage;
  916. #pragma pack(push, 4)
  917. class PASCALIMPLEMENTATION TIconImage : public TSharedImage 
  918. {
  919.     typedef TSharedImage inherited;
  920.     
  921. private:
  922.     HICON FHandle;
  923.     Classes::TCustomMemoryStream* FMemoryImage;
  924.     
  925. protected:
  926.     virtual void __fastcall FreeHandle(void);
  927.     
  928. public:
  929.     __fastcall virtual ~TIconImage(void);
  930. public:
  931.     #pragma option push -w-inl
  932.     /* TObject.Create */ inline __fastcall TIconImage(void) : TSharedImage() { }
  933.     #pragma option pop
  934.     
  935. };
  936.  
  937. #pragma pack(pop)
  938.  
  939. #pragma pack(push, 4)
  940. class PASCALIMPLEMENTATION TIcon : public TGraphic 
  941. {
  942.     typedef TGraphic inherited;
  943.     
  944. private:
  945.     TIconImage* FImage;
  946.     HICON __fastcall GetHandle(void);
  947.     void __fastcall HandleNeeded(void);
  948.     void __fastcall ImageNeeded(void);
  949.     void __fastcall NewImage(HICON NewHandle, Classes::TMemoryStream* NewImage);
  950.     void __fastcall SetHandle(HICON Value);
  951.     
  952. protected:
  953.     virtual void __fastcall Draw(TCanvas* ACanvas, const Windows::TRect &Rect);
  954.     virtual bool __fastcall GetEmpty(void);
  955.     virtual int __fastcall GetHeight(void);
  956.     virtual int __fastcall GetWidth(void);
  957.     virtual void __fastcall SetHeight(int Value);
  958.     virtual void __fastcall SetTransparent(bool Value);
  959.     virtual void __fastcall SetWidth(int Value);
  960.     
  961. public:
  962.     __fastcall virtual TIcon(void);
  963.     __fastcall virtual ~TIcon(void);
  964.     virtual void __fastcall Assign(Classes::TPersistent* Source);
  965.     virtual void __fastcall LoadFromClipboardFormat(Word AFormat, unsigned AData, HPALETTE APalette);
  966.     virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
  967.     HICON __fastcall ReleaseHandle(void);
  968.     virtual void __fastcall SaveToClipboardFormat(Word &Format, unsigned &Data, HPALETTE &APalette);
  969.     virtual void __fastcall SaveToStream(Classes::TStream* Stream);
  970.     __property HICON Handle = {read=GetHandle, write=SetHandle, nodefault};
  971. };
  972.  
  973. #pragma pack(pop)
  974.  
  975. //-- var, const, procedure ---------------------------------------------------
  976. static const TColor clScrollBar = 0x80000000;
  977. static const TColor clBackground = 0x80000001;
  978. static const TColor clActiveCaption = 0x80000002;
  979. static const TColor clInactiveCaption = 0x80000003;
  980. static const TColor clMenu = 0x80000004;
  981. static const TColor clWindow = 0x80000005;
  982. static const TColor clWindowFrame = 0x80000006;
  983. static const TColor clMenuText = 0x80000007;
  984. static const TColor clWindowText = 0x80000008;
  985. static const TColor clCaptionText = 0x80000009;
  986. static const TColor clActiveBorder = 0x8000000a;
  987. static const TColor clInactiveBorder = 0x8000000b;
  988. static const TColor clAppWorkSpace = 0x8000000c;
  989. static const TColor clHighlight = 0x8000000d;
  990. static const TColor clHighlightText = 0x8000000e;
  991. static const TColor clBtnFace = 0x8000000f;
  992. static const TColor clBtnShadow = 0x80000010;
  993. static const TColor clGrayText = 0x80000011;
  994. static const TColor clBtnText = 0x80000012;
  995. static const TColor clInactiveCaptionText = 0x80000013;
  996. static const TColor clBtnHighlight = 0x80000014;
  997. static const TColor cl3DDkShadow = 0x80000015;
  998. static const TColor cl3DLight = 0x80000016;
  999. static const TColor clInfoText = 0x80000017;
  1000. static const TColor clInfoBk = 0x80000018;
  1001. static const TColor clBlack = 0x0;
  1002. static const TColor clMaroon = 0x80;
  1003. static const TColor clGreen = 0x8000;
  1004. static const TColor clOlive = 0x8080;
  1005. static const TColor clNavy = 0x800000;
  1006. static const TColor clPurple = 0x800080;
  1007. static const TColor clTeal = 0x808000;
  1008. static const TColor clGray = 0x808080;
  1009. static const TColor clSilver = 0xc0c0c0;
  1010. static const TColor clRed = 0xff;
  1011. static const TColor clLime = 0xff00;
  1012. static const TColor clYellow = 0xffff;
  1013. static const TColor clBlue = 0xff0000;
  1014. static const TColor clFuchsia = 0xff00ff;
  1015. static const TColor clAqua = 0xffff00;
  1016. static const TColor clLtGray = 0xc0c0c0;
  1017. static const TColor clDkGray = 0x808080;
  1018. static const TColor clWhite = 0xffffff;
  1019. static const TColor clNone = 0x1fffffff;
  1020. static const TColor clDefault = 0x20000000;
  1021. static const Shortint cmBlackness = 0x42;
  1022. static const int cmDstInvert = 0x550009;
  1023. static const int cmMergeCopy = 0xc000ca;
  1024. static const int cmMergePaint = 0xbb0226;
  1025. static const int cmNotSrcCopy = 0x330008;
  1026. static const int cmNotSrcErase = 0x1100a6;
  1027. static const int cmPatCopy = 0xf00021;
  1028. static const int cmPatInvert = 0x5a0049;
  1029. static const int cmPatPaint = 0xfb0a09;
  1030. static const int cmSrcAnd = 0x8800c6;
  1031. static const int cmSrcCopy = 0xcc0020;
  1032. static const int cmSrcErase = 0x440328;
  1033. static const int cmSrcInvert = 0x660046;
  1034. static const int cmSrcPaint = 0xee0086;
  1035. static const int cmWhiteness = 0xff0062;
  1036. extern PACKAGE TFontData DefFontData;
  1037. extern PACKAGE HPALETTE SystemPalette16;
  1038. extern PACKAGE bool DDBsOnly;
  1039. extern PACKAGE void __fastcall PaletteChanged(void);
  1040. extern PACKAGE int __fastcall ColorToRGB(TColor Color);
  1041. extern PACKAGE AnsiString __fastcall ColorToString(TColor Color);
  1042. extern PACKAGE TColor __fastcall StringToColor(const AnsiString S);
  1043. extern PACKAGE void __fastcall GetColorValues(Classes::TGetStrProc Proc);
  1044. extern PACKAGE bool __fastcall ColorToIdent(int Color, AnsiString &Ident);
  1045. extern PACKAGE bool __fastcall IdentToColor(const AnsiString Ident, int &Color);
  1046. extern PACKAGE void __fastcall GetCharsetValues(Classes::TGetStrProc Proc);
  1047. extern PACKAGE bool __fastcall CharsetToIdent(int Charset, AnsiString &Ident);
  1048. extern PACKAGE bool __fastcall IdentToCharset(const AnsiString Ident, int &Charset);
  1049. extern PACKAGE bool __fastcall TransparentStretchBlt(HDC DstDC, int DstX, int DstY, int DstW, int DstH
  1050.     , HDC SrcDC, int SrcX, int SrcY, int SrcW, int SrcH, HDC MaskDC, int MaskX, int MaskY);
  1051. extern PACKAGE void __fastcall GetDIBSizes(HBITMAP Bitmap, unsigned &InfoHeaderSize, unsigned &ImageSize
  1052.     );
  1053. extern PACKAGE bool __fastcall GetDIB(HBITMAP Bitmap, HPALETTE Palette, void *BitmapInfo, void *Bits
  1054.     );
  1055. extern PACKAGE void __fastcall FreeMemoryContexts(void);
  1056. extern PACKAGE HBITMAP __fastcall CreateMappedBmp(HBITMAP Handle, const TColor * OldColors, const int 
  1057.     OldColors_Size, const TColor * NewColors, const int NewColors_Size);
  1058. extern PACKAGE HBITMAP __fastcall CreateMappedRes(unsigned Instance, char * ResName, const TColor * 
  1059.     OldColors, const int OldColors_Size, const TColor * NewColors, const int NewColors_Size);
  1060. extern PACKAGE HBITMAP __fastcall CreateGrayMappedBmp(HBITMAP Handle);
  1061. extern PACKAGE HBITMAP __fastcall CreateGrayMappedRes(unsigned Instance, char * ResName);
  1062. extern PACKAGE HPALETTE __fastcall CopyPalette(HPALETTE Palette);
  1063. extern PACKAGE AnsiString __fastcall GraphicFilter(TMetaClass* GraphicClass);
  1064. extern PACKAGE AnsiString __fastcall GraphicExtension(TMetaClass* GraphicClass);
  1065. extern PACKAGE AnsiString __fastcall GraphicFileMask(TMetaClass* GraphicClass);
  1066. extern PACKAGE TFontCharset __fastcall GetDefFontCharSet(void);
  1067. extern PACKAGE TBitmap* __fastcall AllocPatternBitmap(TColor BkColor, TColor FgColor);
  1068.  
  1069. }    /* namespace Graphics */
  1070. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  1071. using namespace Graphics;
  1072. #endif
  1073. #pragma option pop    // -w-
  1074.  
  1075. #pragma delphiheader end.
  1076. //-- end unit ----------------------------------------------------------------
  1077. #endif    // Graphics
  1078.