// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'sgBitmap.pas' rev: 6.00

#ifndef sgBitmapHPP
#define sgBitmapHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <MVFont.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Sgbitmap
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TsgBitmapImage;
class PASCALIMPLEMENTATION TsgBitmapImage : public Graphics::TSharedImage 
{
	typedef Graphics::TSharedImage inherited;
	
protected:
	tagBITMAPINFO *FInfo;
	void *FData;
	virtual void __fastcall FreeHandle(void);
	
public:
	__property Windows::PBitmapInfo Info = {read=FInfo};
	__property void * Data = {read=FData};
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TsgBitmapImage(void) : Graphics::TSharedImage() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TsgBitmapImage(void) { }
	#pragma option pop
	
};


class DELPHICLASS TsgBitmap;
class PASCALIMPLEMENTATION TsgBitmap : public Graphics::TGraphic 
{
	typedef Graphics::TGraphic inherited;
	
private:
	TsgBitmapImage* FImg;
	Word FWidth;
	Word FHeight;
	Classes::TNotifyEvent FOnRotate;
	Graphics::TPixelFormat FPixelFormat;
	void * __fastcall GetScanLine(int Row);
	Byte __fastcall GetROP(void);
	int __fastcall InfoSize(void);
	void __fastcall SetPixelFormat(Graphics::TPixelFormat Value);
	void __fastcall SetROP(Byte Value);
	void __fastcall NewImage(void);
	void __fastcall Update(void);
	void __fastcall AssignBM(Graphics::TBitmap* BM);
	
protected:
	int FROP;
	virtual bool __fastcall GetEmpty(void);
	virtual int __fastcall GetHeight(void);
	virtual int __fastcall GetWidth(void);
	virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
	virtual void __fastcall Draw(Graphics::TCanvas* ACanvas, const Types::TRect &R);
	virtual void __fastcall SetWidth(int Value);
	virtual void __fastcall SetHeight(int Value);
	
public:
	__fastcall virtual TsgBitmap(void);
	__fastcall virtual ~TsgBitmap(void);
	int __fastcall GetColors(void * AColors);
	int __fastcall RowSize(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	virtual void __fastcall SaveToStream(Classes::TStream* S);
	virtual void __fastcall SaveToFile(const AnsiString FileName);
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
	virtual void __fastcall LoadFromClipboardFormat(Word AFmt, unsigned AData, HPALETTE APal);
	virtual void __fastcall SaveToClipboardFormat(Word &AFmt, unsigned &AData, HPALETTE &APal);
	void __fastcall Flip(void);
	void __fastcall Rotate(int Angle);
	void __fastcall SetColors(void * AColors);
	__property TsgBitmapImage* ImageData = {read=FImg};
	__property void * ScanLine[int Row] = {read=GetScanLine};
	__property Graphics::TPixelFormat PixelFormat = {read=FPixelFormat, write=SetPixelFormat, nodefault};
	__property Byte ROP = {read=GetROP, write=SetROP, nodefault};
	__property Classes::TNotifyEvent OnRotate = {read=FOnRotate, write=FOnRotate};
};


class DELPHICLASS TsgBMAdapter;
class PASCALIMPLEMENTATION TsgBMAdapter : public Graphics::TGraphic 
{
	typedef Graphics::TGraphic inherited;
	
private:
	Graphics::TGraphic* FSource;
	Graphics::TGraphic* FOwned;
	Graphics::TBitmap* __fastcall BM(void);
	TsgBitmap* __fastcall SG(void);
	Graphics::TCanvas* __fastcall GetCanvas(void);
	Graphics::TBitmapHandleType __fastcall GetHandleType(void);
	Graphics::TPixelFormat __fastcall GetPixelFormat(void);
	int __fastcall GetROP(void);
	void * __fastcall GetScanLine(int Row);
	Graphics::TGraphic* __fastcall GetSource(void);
	bool __fastcall IsBM(void);
	bool __fastcall IsSG(void);
	void __fastcall ForceBM(void);
	void __fastcall ForceSG(void);
	void __fastcall SetSource(Graphics::TGraphic* Value);
	void __fastcall SetOwned(Graphics::TGraphic* Value);
	void __fastcall SetHandleType(Graphics::TBitmapHandleType Value);
	void __fastcall SetPixelFormat(Graphics::TPixelFormat Value);
	void __fastcall SetROP(int Value);
	
protected:
	virtual bool __fastcall GetEmpty(void);
	virtual int __fastcall GetWidth(void);
	virtual int __fastcall GetHeight(void);
	virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
	virtual void __fastcall Draw(Graphics::TCanvas* ACanvas, const Types::TRect &R);
	virtual void __fastcall SetWidth(int Value);
	virtual void __fastcall SetHeight(int Value);
	__property Graphics::TGraphic* Source = {read=GetSource, write=SetSource};
	__property Graphics::TGraphic* Owned = {read=FOwned, write=SetOwned};
	
public:
	__fastcall virtual TsgBMAdapter(void);
	__fastcall virtual ~TsgBMAdapter(void);
	int __fastcall GetColorTable(void * P);
	virtual void __fastcall Assign(Classes::TPersistent* Src);
	virtual void __fastcall LoadFromStream(Classes::TStream* S);
	virtual void __fastcall SaveToStream(Classes::TStream* S);
	virtual void __fastcall LoadFromClipboardFormat(Word AFmt, unsigned AData, HPALETTE APal);
	virtual void __fastcall SaveToClipboardFormat(Word &AFmt, unsigned &AData, HPALETTE &APal);
	void __fastcall Rotate(int Angle);
	__property Graphics::TCanvas* Canvas = {read=GetCanvas};
	__property void * ScanLine[int Row] = {read=GetScanLine};
	__property Graphics::TBitmapHandleType HandleType = {read=GetHandleType, write=SetHandleType, nodefault};
	__property Graphics::TPixelFormat PixelFormat = {read=GetPixelFormat, write=SetPixelFormat, nodefault};
	__property int ROP = {read=GetROP, write=SetROP, nodefault};
};


//-- var, const, procedure ---------------------------------------------------

}	/* namespace Sgbitmap */
using namespace Sgbitmap;
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// sgBitmap
