home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // Graphics.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
- // From: Graphics.pas
- //----------------------------------------------------------------------------
- #ifndef GraphicsHPP
- #define GraphicsHPP
- //----------------------------------------------------------------------------
- #ifndef ClassesHPP
- #include <Classes.hpp>
- #endif
-
- #ifndef SysUtilsHPP
- #include <SysUtils.hpp>
- #endif
-
- #ifndef WindowsHPP
- #include <Windows.hpp>
- #endif
-
- #ifndef SystemHPP
- #include <System.hpp>
- #endif
-
- namespace Graphics
- {
- //-- type declarations -------------------------------------------------------
- enum TColor {clMin=-0x7fffffff-1, clMax=0x7fffffff};
-
- typedef System::Integer HMETAFILE;
-
- typedef System::Integer HENHMETAFILE;
-
- class __declspec(delphiclass) EInvalidGraphic;
- class __declspec(pascalimplementation) EInvalidGraphic : public Sysutils::Exception
- {
- typedef EInvalidGraphic ThisClass;
- typedef Sysutils::Exception inherited;
-
- public:
- /* !! Exception.Create */ __fastcall EInvalidGraphic(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* !! Exception.CreateFmt */ __fastcall EInvalidGraphic(const System::AnsiString Msg, const TVarRec
- *Args, const System::Integer Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* !! Exception.CreateRes */ __fastcall EInvalidGraphic(System::Integer Ident) : Sysutils::Exception(
- Ident) { }
- /* !! Exception.CreateResFmt */ __fastcall EInvalidGraphic(System::Integer Ident, const TVarRec *Args
- , const System::Integer Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* !! Exception.CreateHelp */ __fastcall EInvalidGraphic(const System::AnsiString Msg, System::Integer
- AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
- /* !! Exception.CreateFmtHelp */ __fastcall EInvalidGraphic(const System::AnsiString Msg, const TVarRec
- *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Msg, Args
- , Args_Size, AHelpContext) { }
- /* !! Exception.CreateResHelp */ __fastcall EInvalidGraphic(System::Integer Ident, System::Integer
- AHelpContext) : Sysutils::Exception(Ident, AHelpContext) { }
- /* !! Exception.CreateResFmtHelp */ __fastcall EInvalidGraphic(System::Integer Ident, const TVarRec
- *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Ident,
- Args, Args_Size, AHelpContext) { }
-
- public:
- /* !! TObject.Destroy */ __fastcall virtual ~EInvalidGraphic(void) { }
-
- };
-
- class __declspec(delphiclass) EInvalidGraphicOperation;
- class __declspec(pascalimplementation) EInvalidGraphicOperation : public Sysutils::Exception
- {
- typedef EInvalidGraphicOperation ThisClass;
- typedef Sysutils::Exception inherited;
-
- public:
- /* !! Exception.Create */ __fastcall EInvalidGraphicOperation(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* !! Exception.CreateFmt */ __fastcall EInvalidGraphicOperation(const System::AnsiString Msg, const
- TVarRec *Args, const System::Integer Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* !! Exception.CreateRes */ __fastcall EInvalidGraphicOperation(System::Integer Ident) : Sysutils::Exception(
- Ident) { }
- /* !! Exception.CreateResFmt */ __fastcall EInvalidGraphicOperation(System::Integer Ident, const TVarRec
- *Args, const System::Integer Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* !! Exception.CreateHelp */ __fastcall EInvalidGraphicOperation(const System::AnsiString Msg, System::Integer
- AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
- /* !! Exception.CreateFmtHelp */ __fastcall EInvalidGraphicOperation(const System::AnsiString Msg,
- const TVarRec *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(
- Msg, Args, Args_Size, AHelpContext) { }
- /* !! Exception.CreateResHelp */ __fastcall EInvalidGraphicOperation(System::Integer Ident, System::Integer
- AHelpContext) : Sysutils::Exception(Ident, AHelpContext) { }
- /* !! Exception.CreateResFmtHelp */ __fastcall EInvalidGraphicOperation(System::Integer Ident, const
- TVarRec *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(
- Ident, Args, Args_Size, AHelpContext) { }
-
- public:
- /* !! TObject.Destroy */ __fastcall virtual ~EInvalidGraphicOperation(void) { }
-
- };
-
- struct TResData
- {
- System::Integer Handle;
- } ;
-
- enum TFontStyle { fsBold, fsItalic, fsUnderline, fsStrikeOut };
-
- typedef Set<TFontStyle, fsBold, fsStrikeOut> TFontStyles;
-
- enum TFontPitch { fpDefault, fpVariable, fpFixed };
-
- typedef SmallString<31> TFontName;
-
- typedef System::Byte TFontCharset;
-
- struct TFontData
- {
- System::Integer Handle;
- System::Integer Height;
- TFontPitch Pitch;
- TFontStyles Style;
- TFontCharset Charset;
- TFontName Name;
- } ;
-
- typedef DummySet<TFontStyle, fsBold, fsStrikeOut> TDummyFontStyles;
-
- typedef DummySmallString<31> TDummyFontName;
-
- struct TDummyFontData
- {
- System::Integer Handle;
- System::Integer Height;
- TFontPitch Pitch;
- TDummyFontStyles Style;
- TFontCharset Charset;
- TDummyFontName Name;
- } ;
-
- enum TPenStyle { psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame };
-
- enum TPenMode { pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, pmMaskPenNot, pmMergeNotPen,
- pmMaskNotPen, pmMerge, pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor };
-
- struct TPenData
- {
- System::Integer Handle;
- TColor Color;
- System::Integer Width;
- TPenStyle Style;
- } ;
-
- enum TBrushStyle { bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross
- };
-
- class __declspec(delphiclass) TBitmap;
- class __declspec(delphiclass) TGraphic;
- class __declspec(delphiclass) TCanvas;
- class __declspec(pascalimplementation) TGraphic : public Classes::TPersistent
- {
- typedef TGraphic ThisClass;
- typedef Classes::TPersistent inherited;
-
- private:
- Classes::TNotifyEvent FOnChange;
- System::Boolean FModified;
- System::Byte FReserved;
- void __fastcall SetModified(System::Boolean Value);
-
- protected:
- __fastcall virtual TGraphic(void);
- void __fastcall Changed(System::TObject *Sender);
- virtual void __fastcall DefineProperties(Classes::TFiler *Filer);
- virtual void __fastcall Draw(TCanvas *ACanvas, const Windows::TRect &Rect) = 0;
- virtual System::Boolean __fastcall Equals(TGraphic *Graphic);
- virtual System::Boolean __fastcall GetEmpty(void) = 0;
- virtual System::Integer __fastcall GetHeight(void) = 0;
- virtual System::Integer __fastcall GetWidth(void) = 0;
- virtual void __fastcall ReadData(Classes::TStream *Stream);
- virtual void __fastcall SetHeight(System::Integer Value) = 0;
- virtual void __fastcall SetWidth(System::Integer Value) = 0;
- virtual void __fastcall WriteData(Classes::TStream *Stream);
-
- public:
- virtual void __fastcall LoadFromFile(const System::AnsiString Filename);
- virtual void __fastcall SaveToFile(const System::AnsiString Filename);
- virtual void __fastcall LoadFromStream(Classes::TStream *Stream) = 0;
- virtual void __fastcall SaveToStream(Classes::TStream *Stream) = 0;
- virtual void __fastcall LoadFromClipboardFormat(System::Word AFormat, System::Integer AData, System::Integer
- APalette) = 0;
- virtual void __fastcall SaveToClipboardFormat(System::Word &AFormat, System::Integer &AData, System::Integer
- &APalette) = 0;
- __property System::Boolean Empty = {read=GetEmpty, nodefault};
- __property System::Integer Height = {read=GetHeight, write=SetHeight, nodefault};
- __property System::Boolean Modified = {read=FModified, write=SetModified, nodefault};
- __property System::Integer Width = {read=GetWidth, write=SetWidth, nodefault};
- __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
- public:
- /* !! TObject.Destroy */ __fastcall virtual ~TGraphic(void) { }
-
- };
-
- class __declspec(delphiclass) TBitmapImage;
- class __declspec(delphiclass) TInternalImage;
- class __declspec(pascalimplementation) TInternalImage : public System::TObject
- {
- typedef TInternalImage ThisClass;
- typedef System::TObject inherited;
-
- private:
- System::Integer FRefCount;
- Classes::TCustomMemoryStream *FMemoryImage;
- void __fastcall Reference(void);
- void __fastcall Release(void);
- virtual void __fastcall FreeHandle(void) = 0;
- public:
- /* !! TObject.Create */ __fastcall TInternalImage(void) : System::TObject() { }
- /* !! TObject.Destroy */ __fastcall virtual ~TInternalImage(void) { }
-
- };
-
- enum TDIBType { dtNone, dtWin, dtPM };
-
- class __declspec(pascalimplementation) TBitmapImage : public TInternalImage
- {
- typedef TBitmapImage ThisClass;
- typedef TInternalImage inherited;
-
- private:
- System::Integer FHandle;
- System::Integer FPalette;
- System::Integer FWidth;
- System::Integer FHeight;
- void *FDIBHeader;
- void *FDIBBits;
- System::Boolean FMonochrome;
- TDIBType FDIBType;
- virtual void __fastcall FreeHandle(void);
- public:
- /* !! TObject.Create */ __fastcall TBitmapImage(void) : Graphics::TInternalImage() { }
- /* !! TObject.Destroy */ __fastcall virtual ~TBitmapImage(void) { }
-
- };
-
- class __declspec(pascalimplementation) TBitmap : public TGraphic
- {
- typedef TBitmap ThisClass;
- typedef TGraphic inherited;
-
- private:
- TBitmapImage *FImage;
- TCanvas *FCanvas;
- System::Boolean FIgnorePalette;
- void __fastcall Changing(System::TObject *Sender);
- void __fastcall CopyImage(System::Integer AHandle, System::Integer APalette, System::Integer AWidth
- , System::Integer AHeight, System::Boolean AMonochrome);
- void __fastcall FreeContext(void);
- TCanvas *__fastcall GetCanvas(void);
- virtual System::Integer __fastcall GetHandle(void);
- System::Boolean __fastcall GetMonochrome(void);
- System::Integer __fastcall GetPalette(void);
- TColor __fastcall GetTransparentColor(void);
- void __fastcall HandleNeeded(void);
- void __fastcall ReadStream(System::Longint Size, Classes::TStream *Stream);
- void __fastcall ReadStreamDIB(Classes::TCustomMemoryStream *Image);
- void __fastcall SetHandle(System::Integer Value);
- void __fastcall SetMonochrome(System::Boolean Value);
- void __fastcall SetPalette(System::Integer Value);
- void __fastcall MemoryImageNeeded(void);
- void __fastcall PaletteNeeded(void);
- void __fastcall NewImage(System::Integer NewHandle, System::Integer NewPalette, System::Integer NewWidth
- , System::Integer NewHeight, System::Boolean NewMonochrome, Classes::TCustomMemoryStream *NewImage
- , TDIBType NewDIBType, System::Pointer NewDIBHeader, System::Pointer NewDIBBits);
- void __fastcall WriteStream(Classes::TStream *Stream, System::Boolean WriteSize);
-
- protected:
- virtual void __fastcall Draw(TCanvas *ACanvas, const Windows::TRect &Rect);
- virtual System::Boolean __fastcall GetEmpty(void);
- virtual System::Integer __fastcall GetHeight(void);
- virtual System::Integer __fastcall GetWidth(void);
- virtual void __fastcall ReadData(Classes::TStream *Stream);
- virtual void __fastcall SetWidth(System::Integer Value);
- virtual void __fastcall SetHeight(System::Integer Value);
- virtual void __fastcall WriteData(Classes::TStream *Stream);
-
- public:
- __fastcall virtual TBitmap(void);
- __fastcall virtual ~TBitmap(void);
- virtual void __fastcall Assign(Classes::TPersistent *Source);
- void __fastcall Dormant(void);
- void __fastcall FreeImage(void);
- virtual void __fastcall LoadFromClipboardFormat(System::Word AFormat, System::Integer AData, System::Integer
- APalette);
- virtual void __fastcall LoadFromStream(Classes::TStream *Stream);
- void __fastcall LoadFromResourceName(System::Integer Instance, const System::AnsiString ResName);
- void __fastcall LoadFromResourceID(System::Integer Instance, System::Integer ResID);
- System::Integer __fastcall ReleaseHandle(void);
- System::Integer __fastcall ReleasePalette(void);
- virtual void __fastcall SaveToClipboardFormat(System::Word &Format, System::Integer &Data, System::Integer
- &APalette);
- virtual void __fastcall SaveToStream(Classes::TStream *Stream);
- __property TCanvas * Canvas = {read=GetCanvas, nodefault};
- __property System::Integer Handle = {read=GetHandle, write=SetHandle, nodefault};
- __property System::Boolean Monochrome = {read=GetMonochrome, write=SetMonochrome, nodefault};
- __property System::Integer Palette = {read=GetPalette, write=SetPalette, nodefault};
- __property System::Boolean IgnorePalette = {read=FIgnorePalette, write=FIgnorePalette, nodefault};
- __property TColor TransparentColor = {read=GetTransparentColor, nodefault};
- };
-
- struct TBrushData
- {
- System::Integer Handle;
- TColor Color;
- TBitmap *Bitmap;
- TBrushStyle Style;
- } ;
-
- struct TResource;
- typedef TResource *PResource;
-
- struct TResource
- {
- TResource *Next;
- System::Integer RefCount;
- System::Integer Handle;
- System::Word HashCode;
- union
- {
- TBrushData Brush;
- TPenData Pen;
- TDummyFontData Font;
- TResData Data;
-
- };
- } ;
-
- class __declspec(delphiclass) TGraphicsObject;
- class __declspec(pascalimplementation) TGraphicsObject : public Classes::TPersistent
- {
- typedef TGraphicsObject ThisClass;
- typedef Classes::TPersistent inherited;
-
- private:
- Classes::TNotifyEvent FOnChange;
- TResource *FResource;
-
- protected:
- virtual void __fastcall Changed(void);
-
- public:
- __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
- public:
- /* !! TObject.Create */ __fastcall TGraphicsObject(void) : Classes::TPersistent() { }
- /* !! TObject.Destroy */ __fastcall virtual ~TGraphicsObject(void) { }
-
- };
-
- class __declspec(delphiclass) TFont;
- class __declspec(pascalimplementation) TFont : public TGraphicsObject
- {
- typedef TFont ThisClass;
- typedef TGraphicsObject inherited;
-
- private:
- TColor FColor;
- System::Integer FPixelsPerInch;
- void __fastcall GetData(TFontData &FontData);
- void __fastcall SetData(const TFontData &FontData);
-
- protected:
- System::Integer __fastcall GetHandle(void);
- System::Integer __fastcall GetHeight(void);
- TFontName __fastcall GetName(void);
- TFontPitch __fastcall GetPitch(void);
- System::Integer __fastcall GetSize(void);
- TFontStyles __fastcall GetStyle(void);
- TFontCharset __fastcall GetCharset(void);
- void __fastcall SetColor(TColor Value);
- void __fastcall SetHandle(System::Integer Value);
- void __fastcall SetHeight(System::Integer Value);
- void __fastcall SetName(const TFontName &Value);
- void __fastcall SetPitch(TFontPitch Value);
- void __fastcall SetSize(System::Integer Value);
- void __fastcall SetStyle( TFontStyles Value);
- void __fastcall SetCharset(TFontCharset Value);
-
- public:
- __fastcall TFont(void);
- __fastcall virtual ~TFont(void);
- virtual void __fastcall Assign(Classes::TPersistent *Source);
- __property System::Integer Handle = {read=GetHandle, write=SetHandle, nodefault};
- __property System::Integer PixelsPerInch = {read=FPixelsPerInch, write=FPixelsPerInch, nodefault};
-
- __published:
- __property TFontCharset Charset = {read=GetCharset, write=SetCharset, default=1};
- __property TColor Color = {read=FColor, write=SetColor, nodefault};
- __property System::Integer Height = {read=GetHeight, write=SetHeight, nodefault};
- __property TFontName Name = {read=GetName, write=SetName};
- __property TFontPitch Pitch = {read=GetPitch, write=SetPitch, default=0};
- __property System::Integer Size = {read=GetSize, write=SetSize, stored=false, nodefault};
- __property TFontStyles Style = {read=GetStyle, write=SetStyle, nodefault};
- };
-
- class __declspec(delphiclass) TPen;
- class __declspec(pascalimplementation) TPen : public TGraphicsObject
- {
- typedef TPen ThisClass;
- typedef TGraphicsObject inherited;
-
- private:
- TPenMode FMode;
- void __fastcall GetData(TPenData &PenData);
- void __fastcall SetData(const TPenData &PenData);
-
- protected:
- TColor __fastcall GetColor(void);
- void __fastcall SetColor(TColor Value);
- System::Integer __fastcall GetHandle(void);
- void __fastcall SetHandle(System::Integer Value);
- void __fastcall SetMode(TPenMode Value);
- TPenStyle __fastcall GetStyle(void);
- void __fastcall SetStyle(TPenStyle Value);
- System::Integer __fastcall GetWidth(void);
- void __fastcall SetWidth(System::Integer Value);
-
- public:
- __fastcall TPen(void);
- __fastcall virtual ~TPen(void);
- virtual void __fastcall Assign(Classes::TPersistent *Source);
- __property System::Integer Handle = {read=GetHandle, write=SetHandle, nodefault};
-
- __published:
- __property TColor Color = {read=GetColor, write=SetColor, default=0};
- __property TPenMode Mode = {read=FMode, write=SetMode, default=4};
- __property TPenStyle Style = {read=GetStyle, write=SetStyle, default=0};
- __property System::Integer Width = {read=GetWidth, write=SetWidth, default=1};
- };
-
- class __declspec(delphiclass) TBrush;
- class __declspec(pascalimplementation) TBrush : public TGraphicsObject
- {
- typedef TBrush ThisClass;
- typedef TGraphicsObject inherited;
-
- private:
- void __fastcall GetData(TBrushData &BrushData);
- void __fastcall SetData(const TBrushData &BrushData);
-
- protected:
- TBitmap *__fastcall GetBitmap(void);
- void __fastcall SetBitmap(TBitmap *Value);
- TColor __fastcall GetColor(void);
- void __fastcall SetColor(TColor Value);
- System::Integer __fastcall GetHandle(void);
- void __fastcall SetHandle(System::Integer Value);
- TBrushStyle __fastcall GetStyle(void);
- void __fastcall SetStyle(TBrushStyle Value);
-
- public:
- __fastcall TBrush(void);
- __fastcall virtual ~TBrush(void);
- virtual void __fastcall Assign(Classes::TPersistent *Source);
- __property TBitmap * Bitmap = {read=GetBitmap, write=SetBitmap, nodefault};
- __property System::Integer Handle = {read=GetHandle, write=SetHandle, nodefault};
-
- __published:
- __property TColor Color = {read=GetColor, write=SetColor, default=16777215};
- __property TBrushStyle Style = {read=GetStyle, write=SetStyle, default=0};
- };
-
- enum TFillStyle { fsSurface, fsBorder };
-
- enum TFillMode { fmAlternate, fmWinding };
-
- typedef System::Integer TCopyMode;
-
- enum TCanvasStates { csHandleValid, csFontValid, csPenValid, csBrushValid };
-
- typedef Set<TCanvasStates, csHandleValid, csBrushValid> TCanvasState;
-
- class __declspec(pascalimplementation) TCanvas : public Classes::TPersistent
- {
- typedef TCanvas ThisClass;
- typedef Classes::TPersistent inherited;
-
- private:
- System::Integer FHandle;
- TCanvasState State;
- TFont *FFont;
- TPen *FPen;
- TBrush *FBrush;
- Windows::TPoint FPenPos;
- System::Longint FCopyMode;
- Classes::TNotifyEvent FOnChange;
- Classes::TNotifyEvent FOnChanging;
- void __fastcall CreateBrush(void);
- void __fastcall CreateFont(void);
- void __fastcall CreatePen(void);
- void __fastcall BrushChanged(System::TObject *ABrush);
- void __fastcall DeselectHandles(void);
- Windows::TRect __fastcall GetClipRect(void);
- System::Integer __fastcall GetHandle(void);
- Windows::TPoint __fastcall GetPenPos(void);
- TColor __fastcall GetPixel(System::Integer X, System::Integer Y);
- void __fastcall FontChanged(System::TObject *AFont);
- void __fastcall PenChanged(System::TObject *APen);
- void __fastcall SetBrush(TBrush *Value);
- void __fastcall SetFont(TFont *Value);
- void __fastcall SetHandle(System::Integer Value);
- void __fastcall SetPen(TPen *Value);
- void __fastcall SetPenPos(const Windows::TPoint &Value);
- void __fastcall SetPixel(System::Integer X, System::Integer Y, TColor Value);
-
- protected:
- virtual void __fastcall Changed(void);
- virtual void __fastcall Changing(void);
- virtual void __fastcall CreateHandle(void);
- void __fastcall RequiredState( TCanvasState ReqState);
-
- public:
- __fastcall TCanvas(void);
- __fastcall virtual ~TCanvas(void);
- void __fastcall Arc(System::Integer X1, System::Integer Y1, System::Integer X2, System::Integer Y2,
- System::Integer X3, System::Integer Y3, System::Integer X4, System::Integer Y4);
- void __fastcall BrushCopy(const Windows::TRect &Dest, TBitmap *Bitmap, const Windows::TRect &Source
- , TColor Color);
- void __fastcall Chord(System::Integer X1, System::Integer Y1, System::Integer X2, System::Integer Y2
- , System::Integer X3, System::Integer Y3, System::Integer X4, System::Integer Y4);
- void __fastcall CopyRect(const Windows::TRect &Dest, TCanvas *Canvas, const Windows::TRect &Source)
- ;
- void __fastcall Draw(System::Integer X, System::Integer Y, TGraphic *Graphic);
- void __fastcall DrawFocusRect(const Windows::TRect &Rect);
- void __fastcall Ellipse(System::Integer X1, System::Integer Y1, System::Integer X2, System::Integer
- Y2);
- void __fastcall FillRect(const Windows::TRect &Rect);
- void __fastcall FloodFill(System::Integer X, System::Integer Y, TColor Color, TFillStyle FillStyle)
- ;
- void __fastcall FrameRect(const Windows::TRect &Rect);
- void __fastcall LineTo(System::Integer X, System::Integer Y);
- void __fastcall MoveTo(System::Integer X, System::Integer Y);
- void __fastcall Pie(System::Integer X1, System::Integer Y1, System::Integer X2, System::Integer Y2,
- System::Integer X3, System::Integer Y3, System::Integer X4, System::Integer Y4);
- void __fastcall Polygon(const TPoint *Points, const System::Integer Points_Size);
- void __fastcall Polyline(const TPoint *Points, const System::Integer Points_Size);
- void __fastcall Rectangle(System::Integer X1, System::Integer Y1, System::Integer X2, System::Integer
- Y2);
- void __fastcall Refresh(void);
- void __fastcall RoundRect(System::Integer X1, System::Integer Y1, System::Integer X2, System::Integer
- Y2, System::Integer X3, System::Integer Y3);
- void __fastcall StretchDraw(const Windows::TRect &Rect, TGraphic *Graphic);
- System::Integer __fastcall TextHeight(const System::AnsiString Text);
- void __fastcall TextOut(System::Integer X, System::Integer Y, const System::AnsiString Text);
- void __fastcall TextRect(const Windows::TRect &Rect, System::Integer X, System::Integer Y, const System::AnsiString
- Text);
- System::Integer __fastcall TextWidth(const System::AnsiString Text);
- __property Windows::TRect ClipRect = {read=GetClipRect};
- __property System::Integer Handle = {read=GetHandle, write=SetHandle, nodefault};
- __property Windows::TPoint PenPos = {read=GetPenPos, write=SetPenPos};
- __property TColor Pixels[System::Integer X][System::Integer Y] = {read=GetPixel, write=SetPixel};
- __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
- __property Classes::TNotifyEvent OnChanging = {read=FOnChanging, write=FOnChanging};
-
- __published:
- __property TBrush * Brush = {read=FBrush, write=SetBrush, nodefault};
- __property System::Longint CopyMode = {read=FCopyMode, write=FCopyMode, default=13369376};
- __property TFont * Font = {read=FFont, write=SetFont, nodefault};
- __property TPen * Pen = {read=FPen, write=SetPen, nodefault};
- };
-
- typedef System::TMetaClass *TGraphicClass;
-
- class __declspec(delphiclass) TPicture;
- class __declspec(delphiclass) TIcon;
- class __declspec(delphiclass) TMetafile;
- class __declspec(pascalimplementation) TPicture : public Classes::TPersistent
- {
- typedef TPicture ThisClass;
- typedef Classes::TPersistent inherited;
-
- private:
- TGraphic *FGraphic;
- Classes::TNotifyEvent FOnChange;
- void __fastcall ForceType(System::TMetaClass * GraphicType);
- TBitmap *__fastcall GetBitmap(void);
- System::Integer __fastcall GetHeight(void);
- TIcon *__fastcall GetIcon(void);
- TMetafile *__fastcall GetMetafile(void);
- System::Integer __fastcall GetWidth(void);
- void __fastcall ReadData(Classes::TStream *Stream);
- void __fastcall SetBitmap(TBitmap *Value);
- void __fastcall SetGraphic(TGraphic *Value);
- void __fastcall SetIcon(TIcon *Value);
- void __fastcall SetMetafile(TMetafile *Value);
- void __fastcall WriteData(Classes::TStream *Stream);
-
- protected:
- virtual void __fastcall AssignTo(Classes::TPersistent *Dest);
- void __fastcall Changed(System::TObject *Sender);
- virtual void __fastcall DefineProperties(Classes::TFiler *Filer);
-
- public:
- __fastcall virtual ~TPicture(void);
- void __fastcall LoadFromFile(const System::AnsiString Filename);
- void __fastcall SaveToFile(const System::AnsiString Filename);
- void __fastcall LoadFromClipboardFormat(System::Word AFormat, System::Integer AData, System::Integer
- APalette);
- void __fastcall SaveToClipboardFormat(System::Word &AFormat, System::Integer &AData, System::Integer
- &APalette);
- static /* class method */ System::Boolean __fastcall SupportsClipboardFormat(const System::TMetaClass * const vmt,
- System::Word AFormat);
- virtual void __fastcall Assign(Classes::TPersistent *Source);
- static /* class method */ void __fastcall RegisterFileFormat(const System::TMetaClass * const vmt,
- const System::AnsiString AExtension, const System::AnsiString ADescription, System::TMetaClass * AGraphicClass
- );
- static /* class method */ void __fastcall RegisterFileFormatRes(const System::TMetaClass * const vmt,
- const System::AnsiString AExtension, System::Integer ADescriptionResID, System::TMetaClass * AGraphicClass
- );
- static /* class method */ void __fastcall RegisterClipboardFormat(const System::TMetaClass * const vmt,
- System::Word AFormat, System::TMetaClass * AGraphicClass);
- __property TBitmap * Bitmap = {read=GetBitmap, write=SetBitmap, nodefault};
- __property TGraphic * Graphic = {read=FGraphic, write=SetGraphic, nodefault};
- __property System::Integer Height = {read=GetHeight, nodefault};
- __property TIcon * Icon = {read=GetIcon, write=SetIcon, nodefault};
- __property TMetafile * Metafile = {read=GetMetafile, write=SetMetafile, nodefault};
- __property System::Integer Width = {read=GetWidth, nodefault};
- __property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
- public:
- /* !! TObject.Create */ __fastcall TPicture(void) : Classes::TPersistent() { }
-
- };
-
- class __declspec(delphiclass) TMetafileCanvas;
- class __declspec(pascalimplementation) TMetafileCanvas : public TCanvas
- {
- typedef TMetafileCanvas ThisClass;
- typedef TCanvas inherited;
-
- private:
- TMetafile *FMetafile;
-
- public:
- __fastcall TMetafileCanvas(TMetafile *AMetafile, System::Integer ReferenceDevice);
- __fastcall TMetafileCanvas(TMetafile *AMetafile, System::Integer ReferenceDevice, const System::AnsiString
- CreatedBy, const System::AnsiString Description);
- __fastcall virtual ~TMetafileCanvas(void);
- };
-
- class __declspec(delphiclass) TMetafileImage;
- class __declspec(pascalimplementation) TMetafileImage : public System::TObject
- {
- typedef TMetafileImage ThisClass;
- typedef System::TObject inherited;
-
- private:
- System::Integer FRefCount;
- System::Integer FHandle;
- System::Integer FWidth;
- System::Integer FHeight;
- System::Integer FPalette;
- System::Word FInch;
- System::Integer FTempWidth;
- System::Integer FTempHeight;
- void __fastcall Reference(void);
- void __fastcall Release(void);
- public:
- /* !! TObject.Create */ __fastcall TMetafileImage(void) : System::TObject() { }
- /* !! TObject.Destroy */ __fastcall virtual ~TMetafileImage(void) { }
-
- };
-
- class __declspec(pascalimplementation) TMetafile : public TGraphic
- {
- typedef TMetafile ThisClass;
- typedef TGraphic inherited;
-
- private:
- TMetafileImage *FImage;
- System::Boolean FEnhanced;
- System::AnsiString __fastcall GetAuthor(void);
- System::AnsiString __fastcall GetDesc(void);
- System::Integer __fastcall GetHandle(void);
- System::Word __fastcall GetInch(void);
- System::Integer __fastcall GetMMHeight(void);
- System::Integer __fastcall GetMMWidth(void);
- System::Integer __fastcall GetPalette(void);
- void __fastcall NewImage(void);
- void __fastcall SetHandle(System::Integer Value);
- void __fastcall SetInch(System::Word Value);
- void __fastcall SetMMHeight(System::Integer Value);
- void __fastcall SetMMWidth(System::Integer Value);
- void __fastcall UniqueImage(void);
-
- protected:
- virtual System::Boolean __fastcall GetEmpty(void);
- virtual System::Integer __fastcall GetHeight(void);
- virtual System::Integer __fastcall GetWidth(void);
- virtual void __fastcall Draw(TCanvas *ACanvas, const Windows::TRect &Rect);
- virtual void __fastcall ReadData(Classes::TStream *Stream);
- void __fastcall ReadEMFStream(Classes::TStream *Stream);
- void __fastcall ReadWMFStream(Classes::TStream *Stream, System::Longint Length);
- virtual void __fastcall SetHeight(System::Integer Value);
- virtual void __fastcall SetWidth(System::Integer Value);
- System::Boolean __fastcall TestEMF(Classes::TStream *Stream);
- virtual void __fastcall WriteData(Classes::TStream *Stream);
- void __fastcall WriteEMFStream(Classes::TStream *Stream);
- void __fastcall WriteWMFStream(Classes::TStream *Stream);
-
- public:
- __fastcall virtual TMetafile(void);
- __fastcall virtual ~TMetafile(void);
- void __fastcall Clear(void);
- virtual void __fastcall LoadFromStream(Classes::TStream *Stream);
- virtual void __fastcall SaveToFile(const System::AnsiString Filename);
- virtual void __fastcall SaveToStream(Classes::TStream *Stream);
- virtual void __fastcall LoadFromClipboardFormat(System::Word AFormat, System::Integer AData, System::Integer
- APalette);
- virtual void __fastcall SaveToClipboardFormat(System::Word &AFormat, System::Integer &AData, System::Integer
- &APalette);
- virtual void __fastcall Assign(Classes::TPersistent *Source);
- __property System::AnsiString CreatedBy = {read=GetAuthor, nodefault};
- __property System::AnsiString Description = {read=GetDesc, nodefault};
- __property System::Boolean Enhanced = {read=FEnhanced, write=FEnhanced, default=1};
- __property System::Integer Handle = {read=GetHandle, write=SetHandle, nodefault};
- __property System::Integer MMWidth = {read=GetMMWidth, write=SetMMWidth, nodefault};
- __property System::Integer MMHeight = {read=GetMMHeight, write=SetMMHeight, nodefault};
- __property System::Word Inch = {read=GetInch, write=SetInch, nodefault};
- __property System::Integer Palette = {read=GetPalette, nodefault};
- };
-
- class __declspec(delphiclass) TIconImage;
- class __declspec(pascalimplementation) TIconImage : public TInternalImage
- {
- typedef TIconImage ThisClass;
- typedef TInternalImage inherited;
-
- private:
- System::Integer FHandle;
- virtual void __fastcall FreeHandle(void);
- public:
- /* !! TObject.Create */ __fastcall TIconImage(void) : Graphics::TInternalImage() { }
- /* !! TObject.Destroy */ __fastcall virtual ~TIconImage(void) { }
-
- };
-
- class __declspec(pascalimplementation) TIcon : public TGraphic
- {
- typedef TIcon ThisClass;
- typedef TGraphic inherited;
-
- private:
- TIconImage *FImage;
- System::Integer __fastcall GetHandle(void);
- void __fastcall HandleNeeded(void);
- void __fastcall ImageNeeded(void);
- void __fastcall NewImage(System::Integer NewHandle, Classes::TMemoryStream *NewImage);
- void __fastcall SetHandle(System::Integer Value);
-
- protected:
- virtual void __fastcall Draw(TCanvas *ACanvas, const Windows::TRect &Rect);
- virtual System::Boolean __fastcall GetEmpty(void);
- virtual System::Integer __fastcall GetHeight(void);
- virtual System::Integer __fastcall GetWidth(void);
- virtual void __fastcall SetHeight(System::Integer Value);
- virtual void __fastcall SetWidth(System::Integer Value);
- virtual void __fastcall LoadFromClipboardFormat(System::Word AFormat, System::Integer AData, System::Integer
- APalette);
- virtual void __fastcall SaveToClipboardFormat(System::Word &Format, System::Integer &Data, System::Integer
- &APalette);
-
- public:
- __fastcall virtual TIcon(void);
- __fastcall virtual ~TIcon(void);
- virtual void __fastcall Assign(Classes::TPersistent *Source);
- virtual void __fastcall LoadFromStream(Classes::TStream *Stream);
- System::Integer __fastcall ReleaseHandle(void);
- virtual void __fastcall SaveToStream(Classes::TStream *Stream);
- __property System::Integer Handle = {read=GetHandle, write=SetHandle, nodefault};
- };
-
- //-- var, const, procedure ---------------------------------------------------
- #define clScrollBar System::Integer(-2147483648)
- #define clBackground System::Integer(-2147483647)
- #define clActiveCaption System::Integer(-2147483646)
- #define clInactiveCaption System::Integer(-2147483645)
- #define clMenu System::Integer(-2147483644)
- #define clWindow System::Integer(-2147483643)
- #define clWindowFrame System::Integer(-2147483642)
- #define clMenuText System::Integer(-2147483641)
- #define clWindowText System::Integer(-2147483640)
- #define clCaptionText System::Integer(-2147483639)
- #define clActiveBorder System::Integer(-2147483638)
- #define clInactiveBorder System::Integer(-2147483637)
- #define clAppWorkSpace System::Integer(-2147483636)
- #define clHighlight System::Integer(-2147483635)
- #define clHighlightText System::Integer(-2147483634)
- #define clBtnFace System::Integer(-2147483633)
- #define clBtnShadow System::Integer(-2147483632)
- #define clGrayText System::Integer(-2147483631)
- #define clBtnText System::Integer(-2147483630)
- #define clInactiveCaptionText System::Integer(-2147483629)
- #define clBtnHighlight System::Integer(-2147483628)
- #define cl3DDkShadow System::Integer(-2147483627)
- #define cl3DLight System::Integer(-2147483626)
- #define clInfoText System::Integer(-2147483625)
- #define clInfoBk System::Integer(-2147483624)
- #define clBlack TColor(0)
- #define clMaroon TColor(128)
- #define clGreen TColor(32768)
- #define clOlive TColor(32896)
- #define clNavy TColor(8388608)
- #define clPurple TColor(8388736)
- #define clTeal TColor(8421376)
- #define clGray TColor(8421504)
- #define clSilver TColor(12632256)
- #define clRed TColor(255)
- #define clLime TColor(65280)
- #define clYellow TColor(65535)
- #define clBlue TColor(16711680)
- #define clFuchsia TColor(16711935)
- #define clAqua TColor(16776960)
- #define clLtGray TColor(12632256)
- #define clDkGray TColor(8421504)
- #define clWhite TColor(16777215)
- #define clNone TColor(536870911)
- #define clDefault TColor(536870912)
- #define cmBlackness System::Byte(66)
- #define cmDstInvert System::Integer(5570569)
- #define cmMergeCopy System::Integer(12583114)
- #define cmMergePaint System::Integer(12255782)
- #define cmNotSrcCopy System::Integer(3342344)
- #define cmNotSrcErase System::Integer(1114278)
- #define cmPatCopy System::Integer(15728673)
- #define cmPatInvert System::Integer(5898313)
- #define cmPatPaint System::Integer(16452105)
- #define cmSrcAnd System::Integer(8913094)
- #define cmSrcCopy System::Integer(13369376)
- #define cmSrcErase System::Integer(4457256)
- #define cmSrcInvert System::Integer(6684742)
- #define cmSrcPaint System::Integer(15597702)
- #define cmWhiteness System::Integer(16711778)
- extern TFontData DefFontData;
- extern void __fastcall PaletteChanged(void);
- extern System::Longint __fastcall ColorToRGB(TColor Color);
- extern System::AnsiString __fastcall ColorToString(TColor Color);
- extern TColor __fastcall StringToColor(const System::AnsiString S);
- extern void __fastcall GetColorValues(Classes::TGetStrProc Proc);
- extern System::Boolean __fastcall ColorToIdent(System::Longint Color, System::AnsiString &Ident);
- extern System::Boolean __fastcall IdentToColor(const System::AnsiString Ident, System::Longint &Color
- );
- extern void __fastcall GetCharsetValues(Classes::TGetStrProc Proc);
- extern System::Boolean __fastcall CharsetToIdent(System::Longint Charset, System::AnsiString &Ident
- );
- extern System::Boolean __fastcall IdentToCharset(const System::AnsiString Ident, System::Longint &Charset
- );
- extern System::Pointer __fastcall MemAlloc(System::Longint Size);
- extern void __fastcall GetDIBSizes(System::Integer Bitmap, System::Integer &InfoHeaderSize, System::Integer
- &ImageSize);
- extern System::Boolean __fastcall GetDIB(System::Integer Bitmap, System::Integer Palette, void *BitmapInfo
- , void *Bits);
- extern void __fastcall FreeMemoryContexts(void);
- extern System::Integer __fastcall CopyPalette(System::Integer Palette);
- extern System::AnsiString __fastcall GraphicFilter(System::TMetaClass * GraphicClass);
- extern System::AnsiString __fastcall GraphicExtension(System::TMetaClass * GraphicClass);
- extern void __fastcall InitGraphics(void);
- //-- template instantiations -------------------------------------------------
- template class TCanvasState ;
- template class TDummyFontStyles ;
- template class SmallString<31> ;
- template class TFontStyles ;
-
- } /* namespace Graphics */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Graphics;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // Graphics
-