// CodeGear C++Builder
// Copyright (c) 1995, 2010 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'AnyMetafile.pas' rev: 22.00

#ifndef AnymetafileHPP
#define AnymetafileHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit

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

namespace Anymetafile
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TMetafileImage;
class PASCALIMPLEMENTATION TMetafileImage : public Graphics::TSharedImage
{
	typedef Graphics::TSharedImage inherited;
	
private:
	unsigned FHandle;
	int FWidth;
	int FHeight;
	HPALETTE FPalette;
	System::Word FInch;
	int FTempWidth;
	int FTempHeight;
	
protected:
	virtual void __fastcall FreeHandle(void);
	
public:
	__fastcall virtual ~TMetafileImage(void);
public:
	/* TObject.Create */ inline __fastcall TMetafileImage(void) : Graphics::TSharedImage() { }
	
};


class DELPHICLASS TMetafileEn;
class PASCALIMPLEMENTATION TMetafileEn : public Graphics::TGraphic
{
	typedef Graphics::TGraphic inherited;
	
private:
	TMetafileImage* FImage;
	bool FEnhanced;
	System::UnicodeString __fastcall GetAuthor(void);
	System::UnicodeString __fastcall GetDesc(void);
	unsigned __fastcall GetHandle(void);
	System::Word __fastcall GetInch(void);
	int __fastcall GetMMHeight(void);
	int __fastcall GetMMWidth(void);
	void __fastcall NewImage(void);
	void __fastcall SetHandle(unsigned Value);
	void __fastcall SetInch(System::Word Value);
	void __fastcall SetMMHeight(int Value);
	void __fastcall SetMMWidth(int Value);
	void __fastcall UniqueImage(void);
	
protected:
	virtual bool __fastcall GetEmpty(void);
	virtual int __fastcall GetHeight(void);
	virtual HPALETTE __fastcall GetPalette(void);
	virtual int __fastcall GetWidth(void);
	virtual void __fastcall Draw(Graphics::TCanvas* ACanvas, const Types::TRect &Rect);
	virtual void __fastcall ReadData(Classes::TStream* Stream);
	void __fastcall ReadEMFStream(Classes::TStream* Stream);
	void __fastcall ReadWMFStream(Classes::TStream* Stream, int Length);
	virtual void __fastcall SetHeight(int Value);
	virtual void __fastcall SetTransparent(bool Value);
	virtual void __fastcall SetWidth(int Value);
	bool __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 TMetafileEn(void);
	__fastcall virtual ~TMetafileEn(void);
	void __fastcall Clear(void);
	bool __fastcall HandleAllocated(void);
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
	virtual void __fastcall SaveToFile(const System::UnicodeString Filename);
	virtual void __fastcall SaveToStream(Classes::TStream* Stream);
	virtual void __fastcall LoadFromClipboardFormat(System::Word AFormat, unsigned AData, HPALETTE APalette);
	virtual void __fastcall SaveToClipboardFormat(System::Word &AFormat, unsigned &AData, HPALETTE &APalette);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	unsigned __fastcall ReleaseHandle(void);
	__property System::UnicodeString CreatedBy = {read=GetAuthor};
	__property System::UnicodeString Description = {read=GetDesc};
	__property bool Enhanced = {read=FEnhanced, write=FEnhanced, default=1};
	__property unsigned Handle = {read=GetHandle, write=SetHandle, nodefault};
	__property int MMWidth = {read=GetMMWidth, write=SetMMWidth, nodefault};
	__property int MMHeight = {read=GetMMHeight, write=SetMMHeight, nodefault};
	__property System::Word Inch = {read=GetInch, write=SetInch, nodefault};
};


class DELPHICLASS TMetafileCanvasEn;
class PASCALIMPLEMENTATION TMetafileCanvasEn : public Graphics::TCanvas
{
	typedef Graphics::TCanvas inherited;
	
private:
	TMetafileEn* FMetafile;
	
public:
	__fastcall TMetafileCanvasEn(TMetafileEn* AMetafile, HDC ReferenceDevice);
	__fastcall TMetafileCanvasEn(TMetafileEn* AMetafile, HDC ReferenceDevice, const System::UnicodeString CreatedBy, const System::UnicodeString Description);
	__fastcall virtual ~TMetafileCanvasEn(void);
};


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

}	/* namespace Anymetafile */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE)
using namespace Anymetafile;
#endif
#pragma pack(pop)
#pragma option pop

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