Alien-FreeImage
view release on metacpan or search on metacpan
src/Source/FreeImage/PluginPICT.cpp view on Meta::CPAN
unsigned b3 = Read8(io, handle);
unsigned b2 = Read8(io, handle);
unsigned b1 = Read8(io, handle);
unsigned b0 = Read8(io, handle);
return (b3 << 24) + (b2 << 16) + (b1 << 8) + b0;
}
// ----------------------------------------------------------
struct OpDef
{
const char * name;
int len;
const char * description;
};
// for reserved opcodes
#define res(length) { "reserved", (length), "reserved for Apple use" }
#define RGB_LEN 6
#define WORD_LEN -1
#define NA 0
static OpDef optable[] =
{
/* 0x00 */ { "NOP", 0, "nop" },
/* 0x01 */ { "Clip", NA, "clip" },
/* 0x02 */ { "BkPat", 8, "background pattern" },
/* 0x03 */ { "TxFont", 2, "text font (word)" },
/* 0x04 */ { "TxFace", 1, "text face (byte)" },
/* 0x05 */ { "TxMode", 2, "text mode (word)" },
/* 0x06 */ { "SpExtra", 4, "space extra (fixed point)" },
/* 0x07 */ { "PnSize", 4, "pen size (point)" },
/* 0x08 */ { "PnMode", 2, "pen mode (word)" },
/* 0x09 */ { "PnPat", 8, "pen pattern" },
/* 0x0a */ { "FillPat", 8, "fill pattern" },
/* 0x0b */ { "OvSize", 4, "oval size (point)" },
/* 0x0c */ { "Origin", 4, "dh, dv (word)" },
/* 0x0d */ { "TxSize", 2, "text size (word)" },
/* 0x0e */ { "FgColor", 4, "foreground color (longword)" },
/* 0x0f */ { "BkColor", 4, "background color (longword)" },
/* 0x10 */ { "TxRatio", 8, "numerator (point), denominator (point)" },
/* 0x11 */ { "Version", 1, "version (byte)" },
/* 0x12 */ { "BkPixPat", NA, "color background pattern" },
/* 0x13 */ { "PnPixPat", NA, "color pen pattern" },
/* 0x14 */ { "FillPixPat", NA, "color fill pattern" },
/* 0x15 */ { "PnLocHFrac", 2, "fractional pen position" },
/* 0x16 */ { "ChExtra", 2, "extra for each character" },
/* 0x17 */ res(0),
/* 0x18 */ res(0),
/* 0x19 */ res(0),
/* 0x1a */ { "RGBFgCol", RGB_LEN, "RGB foreColor" },
/* 0x1b */ { "RGBBkCol", RGB_LEN, "RGB backColor" },
/* 0x1c */ { "HiliteMode", 0, "hilite mode flag" },
/* 0x1d */ { "HiliteColor", RGB_LEN, "RGB hilite color" },
/* 0x1e */ { "DefHilite", 0, "Use default hilite color" },
/* 0x1f */ { "OpColor", 6, "RGB OpColor for arithmetic modes" },
/* 0x20 */ { "Line", 8, "pnLoc (point), newPt (point)" },
/* 0x21 */ { "LineFrom", 4, "newPt (point)" },
/* 0x22 */ { "ShortLine", 6, "pnLoc (point, dh, dv (-128 .. 127))" },
/* 0x23 */ { "ShortLineFrom", 2, "dh, dv (-128 .. 127)" },
/* 0x24 */ res(WORD_LEN),
/* 0x25 */ res(WORD_LEN),
/* 0x26 */ res(WORD_LEN),
/* 0x27 */ res(WORD_LEN),
/* 0x28 */ { "LongText", NA, "txLoc (point), count (0..255), text" },
/* 0x29 */ { "DHText", NA, "dh (0..255), count (0..255), text" },
/* 0x2a */ { "DVText", NA, "dv (0..255), count (0..255), text" },
/* 0x2b */ { "DHDVText", NA, "dh, dv (0..255), count (0..255), text" },
/* 0x2c */ res(WORD_LEN),
/* 0x2d */ res(WORD_LEN),
/* 0x2e */ res(WORD_LEN),
/* 0x2f */ res(WORD_LEN),
/* 0x30 */ { "frameRect", 8, "rect" },
/* 0x31 */ { "paintRect", 8, "rect" },
/* 0x32 */ { "eraseRect", 8, "rect" },
/* 0x33 */ { "invertRect", 8, "rect" },
/* 0x34 */ { "fillRect", 8, "rect" },
/* 0x35 */ res(8),
/* 0x36 */ res(8),
/* 0x37 */ res(8),
/* 0x38 */ { "frameSameRect", 0, "rect" },
/* 0x39 */ { "paintSameRect", 0, "rect" },
/* 0x3a */ { "eraseSameRect", 0, "rect" },
/* 0x3b */ { "invertSameRect", 0, "rect" },
/* 0x3c */ { "fillSameRect", 0, "rect" },
/* 0x3d */ res(0),
/* 0x3e */ res(0),
/* 0x3f */ res(0),
/* 0x40 */ { "frameRRect", 8, "rect" },
/* 0x41 */ { "paintRRect", 8, "rect" },
/* 0x42 */ { "eraseRRect", 8, "rect" },
/* 0x43 */ { "invertRRect", 8, "rect" },
/* 0x44 */ { "fillRRrect", 8, "rect" },
/* 0x45 */ res(8),
/* 0x46 */ res(8),
/* 0x47 */ res(8),
/* 0x48 */ { "frameSameRRect", 0, "rect" },
/* 0x49 */ { "paintSameRRect", 0, "rect" },
/* 0x4a */ { "eraseSameRRect", 0, "rect" },
/* 0x4b */ { "invertSameRRect", 0, "rect" },
/* 0x4c */ { "fillSameRRect", 0, "rect" },
/* 0x4d */ res(0),
/* 0x4e */ res(0),
/* 0x4f */ res(0),
/* 0x50 */ { "frameOval", 8, "rect" },
/* 0x51 */ { "paintOval", 8, "rect" },
/* 0x52 */ { "eraseOval", 8, "rect" },
/* 0x53 */ { "invertOval", 8, "rect" },
/* 0x54 */ { "fillOval", 8, "rect" },
/* 0x55 */ res(8),
/* 0x56 */ res(8),
/* 0x57 */ res(8),
/* 0x58 */ { "frameSameOval", 0, "rect" },
/* 0x59 */ { "paintSameOval", 0, "rect" },
/* 0x5a */ { "eraseSameOval", 0, "rect" },
/* 0x5b */ { "invertSameOval", 0, "rect" },
/* 0x5c */ { "fillSameOval", 0, "rect" },
/* 0x5d */ res(0),
/* 0x5e */ res(0),
/* 0x5f */ res(0),
/* 0x60 */ { "frameArc", 12, "rect, startAngle, arcAngle" },
( run in 0.932 second using v1.01-cache-2.11-cpan-411bb0df24b )