29 #ifndef PGF_PGFTYPES_H
30 #define PGF_PGFTYPES_H
48 #define PGFCodecVersion "6.14.12"
49 #define PGFCodecVersionID 0x061412
55 #define PGFMagic "PGF"
59 #define DownsampleThreshold 3
60 #define ColorTableLen 256
68 #ifdef __PGF32SUPPORT__
69 #define PGFVersion (Version2 | PGF32 | Version5 | Version6)
71 #define PGFVersion (Version2 | Version5 | Version6)
77 #define BufferSize 16384
78 #define RLblockSizeLen 15
79 #define LinBlockSize 8
80 #define InterBlockSize 4
81 #ifdef __PGF32SUPPORT__
82 #define MaxBitPlanes 31
84 #define MaxBitPlanes 15
86 #define MaxBitPlanesLog 5
87 #define MaxQuality MaxBitPlanes
92 enum Orientation { LL=0, HL=1, LH=2, HH=3 };
163 #ifdef PGF_USE_BIG_ENDIAN
169 #endif // PGF_USE_BIG_ENDIAN
196 PGFRect() : left(0), top(0), right(0), bottom(0) {}
202 PGFRect(UINT32 x, UINT32 y, UINT32 width, UINT32 height) : left(x), top(y), right(x + width), bottom(y + height) {}
205 UINT32
Width()
const {
return right - left; }
207 UINT32
Height()
const {
return bottom - top; }
213 bool IsInside(UINT32 x, UINT32 y)
const {
return (x >= left && x < right && y >= top && y < bottom); }
215 UINT32 left, top, right, bottom;
218 #ifdef __PGF32SUPPORT__
224 typedef void (*RefreshCB)(
void *p);
229 #define MagicVersionSize sizeof(PGFMagicVersion)
230 #define PreHeaderSize sizeof(PGFPreHeader)
231 #define HeaderSize sizeof(PGFHeader)
232 #define ColorTableSize ColorTableLen*sizeof(RGBQUAD)
233 #define DataTSize sizeof(DataT)
235 #endif //PGF_PGFTYPES_H
PGF identification and version.
Definition: PGFtypes.h:104
PGFRect()
Standard constructor.
Definition: PGFtypes.h:196
#define ColorTableLen
size of color lookup table (clut)
Definition: PGFtypes.h:60
bool IsInside(UINT32 x, UINT32 y) const
Definition: PGFtypes.h:213
#define RLblockSizeLen
block size length (< 16): ld(BufferSize) < RLblockSizeLen <= 2*ld(BufferSize)
Definition: PGFtypes.h:78
OSError error
operating system error code
Definition: PGFtypes.h:187
IOException()
Standard constructor.
Definition: PGFtypes.h:182
IOException(OSError err)
Definition: PGFtypes.h:185
char magic[3]
PGF identification = "PGF".
Definition: PGFtypes.h:105
PGF exception.
Definition: PGFtypes.h:180
UINT8 version
PGF version.
Definition: PGFtypes.h:106
UINT32 Width() const
Definition: PGFtypes.h:205
UINT32 Height() const
Definition: PGFtypes.h:207
PGFRect(UINT32 x, UINT32 y, UINT32 width, UINT32 height)
Definition: PGFtypes.h:202
Rectangle.
Definition: PGFtypes.h:194