⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 graphicex.hpp

📁 骨灰盒规范化果腹
💻 HPP
字号:
// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'GraphicEx.pas' rev: 5.00

#ifndef GraphicExHPP
#define GraphicExHPP

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

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

namespace Graphicex
{
//-- type declarations -------------------------------------------------------
typedef DynamicArray<unsigned >  TCardinalArray;

class DELPHICLASS TSGIGraphic;
class PASCALIMPLEMENTATION TSGIGraphic : public Graphics::TBitmap 
{
	typedef Graphics::TBitmap inherited;
	
private:
	unsigned FStartPosition;
	DynamicArray<unsigned >  FRowStart;
	DynamicArray<unsigned >  FRowSize;
	void *FRowBuffer;
	Classes::TStream* FStream;
	Graphiccompression::TDecoder* FDecoder;
	Byte FSampleSize;
	void __fastcall ReadAndDecode(Graphiccompression::PByte Red, Graphiccompression::PByte Green, Graphiccompression::PByte 
		Blue, Graphiccompression::PByte Alpha, int Row, int BPC);
	
public:
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
public:
	#pragma option push -w-inl
	/* TBitmap.Create */ inline __fastcall virtual TSGIGraphic(void) : Graphics::TBitmap() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TBitmap.Destroy */ inline __fastcall virtual ~TSGIGraphic(void) { }
	#pragma option pop
	
};


class DELPHICLASS TAutodeskGraphic;
class PASCALIMPLEMENTATION TAutodeskGraphic : public Graphics::TBitmap 
{
	typedef Graphics::TBitmap inherited;
	
public:
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
public:
	#pragma option push -w-inl
	/* TBitmap.Create */ inline __fastcall virtual TAutodeskGraphic(void) : Graphics::TBitmap() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TBitmap.Destroy */ inline __fastcall virtual ~TAutodeskGraphic(void) { }
	#pragma option pop
	
};


#pragma pack(push, 1)
struct TTIFFHeader
{
	Word ByteOrder;
	Word Version;
	unsigned FirstIFD;
} ;
#pragma pack(pop)

#pragma pack(push, 1)
struct TIFDEntry
{
	Word Tag;
	Word DataType;
	unsigned DataLength;
	unsigned Offset;
} ;
#pragma pack(pop)

typedef Word TTIFFPalette[788];

typedef DynamicArray<TIFDEntry >  GraphicEx__4;

class DELPHICLASS TTIFFGraphic;
class PASCALIMPLEMENTATION TTIFFGraphic : public Graphics::TBitmap 
{
	typedef Graphics::TBitmap inherited;
	
private:
	#pragma pack(push, 1)
	TTIFFHeader FHeader;
	#pragma pack(pop)
	
	DynamicArray<TIFDEntry >  FIFD;
	unsigned FBasePosition;
	int FInternalPalette;
	Word FPalette[788];
	bool __fastcall FindIFD(unsigned Tag, unsigned &Index);
	void __fastcall GetValueList(Classes::TStream* Stream, unsigned Tag, TCardinalArray &Values);
	unsigned __fastcall GetValue(unsigned Tag, unsigned Default);
	unsigned __fastcall GetValueLength(unsigned Tag, unsigned Default);
	void __fastcall MakePalette(Byte BPS, int Mode);
	void __fastcall SwapIFD(void);
	
public:
	__fastcall virtual TTIFFGraphic(void);
	__fastcall virtual ~TTIFFGraphic(void);
	void __fastcall SaveToTifFile(AnsiString FileName, bool Compressing);
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
	virtual void __fastcall SaveToStream(Classes::TStream* Stream)/* overload */;
};


class DELPHICLASS TTargaGraphic;
class PASCALIMPLEMENTATION TTargaGraphic : public Graphics::TBitmap 
{
	typedef Graphics::TBitmap inherited;
	
private:
	AnsiString FImageID;
	
public:
	HIDESBASE void __fastcall LoadFromResourceName(unsigned Instance, const AnsiString ResName);
	HIDESBASE void __fastcall LoadFromResourceID(unsigned Instance, int ResID);
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
	virtual void __fastcall SaveToStream(Classes::TStream* Stream)/* overload */;
	HIDESBASE void __fastcall SaveToStream(Classes::TStream* Stream, bool Compressed)/* overload */;
	__property AnsiString ImageID = {read=FImageID, write=FImageID};
public:
	#pragma option push -w-inl
	/* TBitmap.Create */ inline __fastcall virtual TTargaGraphic(void) : Graphics::TBitmap() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TBitmap.Destroy */ inline __fastcall virtual ~TTargaGraphic(void) { }
	#pragma option pop
	
};


class DELPHICLASS TPCXGraphic;
class PASCALIMPLEMENTATION TPCXGraphic : public Graphics::TBitmap 
{
	typedef Graphics::TBitmap inherited;
	
public:
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
	virtual void __fastcall SaveToStream(Classes::TStream* Stream);
public:
	#pragma option push -w-inl
	/* TBitmap.Create */ inline __fastcall virtual TPCXGraphic(void) : Graphics::TBitmap() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TBitmap.Destroy */ inline __fastcall virtual ~TPCXGraphic(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TPCDResolution { pcdBase16, pcdBase4, pcdBase, pcd4Base, pcd16Base, pcd64Base };
#pragma option pop

class DELPHICLASS TPCDGraphic;
class PASCALIMPLEMENTATION TPCDGraphic : public Graphics::TBitmap 
{
	typedef Graphics::TBitmap inherited;
	
private:
	unsigned FBasePosition;
	TPCDResolution FResolution;
	
public:
	__fastcall virtual TPCDGraphic(void);
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
	virtual void __fastcall SaveToStream(Classes::TStream* Stream);
	__property TPCDResolution Resolution = {read=FResolution, write=FResolution, default=2};
public:
	#pragma option push -w-inl
	/* TBitmap.Destroy */ inline __fastcall virtual ~TPCDGraphic(void) { }
	#pragma option pop
	
};


class DELPHICLASS TPPMGraphic;
class PASCALIMPLEMENTATION TPPMGraphic : public Graphics::TBitmap 
{
	typedef Graphics::TBitmap inherited;
	
private:
	Classes::TStream* FStream;
	char FBuffer[4096];
	int FIndex;
	void __fastcall CreateGrayScalePalette(bool BW);
	char __fastcall CurrentChar(void);
	char __fastcall GetChar(void);
	unsigned __fastcall GetNumber(void);
	AnsiString __fastcall ReadLine();
	
public:
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
public:
	#pragma option push -w-inl
	/* TBitmap.Create */ inline __fastcall virtual TPPMGraphic(void) : Graphics::TBitmap() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TBitmap.Destroy */ inline __fastcall virtual ~TPPMGraphic(void) { }
	#pragma option pop
	
};


class DELPHICLASS TCUTGraphic;
class PASCALIMPLEMENTATION TCUTGraphic : public Graphics::TBitmap 
{
	typedef Graphics::TBitmap inherited;
	
private:
	AnsiString FPaletteFile;
	
protected:
	void __fastcall LoadPalette(void);
	
public:
	virtual void __fastcall LoadFromFile(const AnsiString FileName);
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
	__property AnsiString PaletteFile = {read=FPaletteFile, write=FPaletteFile};
public:
	#pragma option push -w-inl
	/* TBitmap.Create */ inline __fastcall virtual TCUTGraphic(void) : Graphics::TBitmap() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TBitmap.Destroy */ inline __fastcall virtual ~TCUTGraphic(void) { }
	#pragma option pop
	
};


class DELPHICLASS TGIFGraphic;
class PASCALIMPLEMENTATION TGIFGraphic : public Graphics::TBitmap 
{
	typedef Graphics::TBitmap inherited;
	
public:
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
public:
	#pragma option push -w-inl
	/* TBitmap.Create */ inline __fastcall virtual TGIFGraphic(void) : Graphics::TBitmap() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TBitmap.Destroy */ inline __fastcall virtual ~TGIFGraphic(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRLAGraphic;
class PASCALIMPLEMENTATION TRLAGraphic : public Graphics::TBitmap 
{
	typedef Graphics::TBitmap inherited;
	
private:
	void __fastcall SwapHeader(void *Header);
	
public:
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
public:
	#pragma option push -w-inl
	/* TBitmap.Create */ inline __fastcall virtual TRLAGraphic(void) : Graphics::TBitmap() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TBitmap.Destroy */ inline __fastcall virtual ~TRLAGraphic(void) { }
	#pragma option pop
	
};


class DELPHICLASS TPSDGraphic;
class PASCALIMPLEMENTATION TPSDGraphic : public Graphics::TBitmap 
{
	typedef Graphics::TBitmap inherited;
	
private:
	Byte FPalette[768];
	void __fastcall MakePalette(Byte BPS, int Mode);
	
public:
	virtual void __fastcall LoadFromStream(Classes::TStream* Stream);
public:
	#pragma option push -w-inl
	/* TBitmap.Create */ inline __fastcall virtual TPSDGraphic(void) : Graphics::TBitmap() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TBitmap.Destroy */ inline __fastcall virtual ~TPSDGraphic(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TResamplingFilter { sfBox, sfTriangle, sfHermite, sfBell, sfSpline, sfLanczos3, sfMitchell };
#pragma option pop

//-- var, const, procedure ---------------------------------------------------
extern PACKAGE void __fastcall Stretch(unsigned NewWidth, unsigned NewHeight, TResamplingFilter Filter
	, float Radius, Graphics::TBitmap* Source, Graphics::TBitmap* Target)/* overload */;
extern PACKAGE void __fastcall Stretch(unsigned NewWidth, unsigned NewHeight, TResamplingFilter Filter
	, float Radius, Graphics::TBitmap* Source)/* overload */;

}	/* namespace Graphicex */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Graphicex;
#endif
#pragma option pop	// -w-
#pragma option pop	// -Vx

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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -