summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2011-01-17 13:55:56 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2011-01-17 13:55:56 +0100
commit9e0397f5e07102c5a9e29e16dda4d7608db32231 (patch)
tree5f01b302ae248cdca757abffcb35bdcfb3bc95fb
parentb92bf2eb811f9599c1d43b472911f5006945025e (diff)
Trying to stuff-up the Pict2 opcode array
-rw-r--r--src/lib/Pict2Parser.cpp98
-rw-r--r--src/lib/Pict2Parser.h10
2 files changed, 90 insertions, 18 deletions
diff --git a/src/lib/Pict2Parser.cpp b/src/lib/Pict2Parser.cpp
index 084c1f0..ed46c49 100644
--- a/src/lib/Pict2Parser.cpp
+++ b/src/lib/Pict2Parser.cpp
@@ -84,90 +84,130 @@ bool Pict2Parser::parse()
{ 0x21, "line from", &Pict2Parser::handleLineFrom, 5 },
{ 0x22, "short line", &Pict2Parser::handleShortLine, 7 },
{ 0x23, "short line from", &Pict2Parser::handleShortLineFrom, 3 },
-
+ { 0x24, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x25, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x26, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x27, "Reserved", &Pict2Parser::skipData, -1 },
{ 0x28, "long text", &Pict2Parser::handleLongText, -1 },
{ 0x29, "DH text", &Pict2Parser::handleDHText, -1 },
{ 0x2a, "DV text", &Pict2Parser::handleDVText, -1 },
{ 0x2b, "DHDV text", &Pict2Parser::handleDHDVText, -1 },
-
+ { 0x2c, "fontName", &Pict2Parser::handleFontName, -1 },
+ { 0x2d, "lineJustify", &Pict2Parser::handleLineJustify, 11 },
+ { 0x2e, "glyphState", &Pict2Parser::handleGlyphState, 9 },
+ { 0x2f, "Reserved", &Pict2Parser::skipData, -1 },
{ 0x30, "frameRect", &Pict2Parser::handleFrameRect, 9 },
{ 0x31, "paintRect", &Pict2Parser::handlePaintRect, 9 },
{ 0x32, "eraseRect", &Pict2Parser::handleEraseRect, 9 },
{ 0x33, "invertRect", &Pict2Parser::handleInvertRect, 9 },
{ 0x34, "fillRect", &Pict2Parser::handleFillRect, 9 },
-
+ { 0x35, "Reserved", &Pict2Parser::handleNOP, 9 },
+ { 0x36, "Reserved", &Pict2Parser::handleNOP, 9 },
+ { 0x37, "Reserved", &Pict2Parser::handleNOP, 9 },
{ 0x38, "frameSameRect", &Pict2Parser::handleFrameSameRect, 1 },
{ 0x39, "paintSameRect", &Pict2Parser::handlePaintSameRect, 1 },
{ 0x3a, "eraseSameRect", &Pict2Parser::handleEraseSameRect, 1 },
{ 0x3b, "invertSameRect", &Pict2Parser::handleInvertSameRect, 1 },
{ 0x3c, "fillSameRect", &Pict2Parser::handleFillSameRect, 1 },
-
+ { 0x3d, "Reserved", &Pict2Parser::handleNOP, 1 },
+ { 0x3e, "Reserved", &Pict2Parser::handleNOP, 1 },
+ { 0x3f, "Reserved", &Pict2Parser::handleNOP, 1 },
{ 0x40, "frameRRect", &Pict2Parser::handleFrameRRect, 9 },
{ 0x41, "paintRRect", &Pict2Parser::handlePaintRRect, 9 },
{ 0x42, "eraseRRect", &Pict2Parser::handleEraseRRect, 9 },
{ 0x43, "invertRRect", &Pict2Parser::handleInvertRRect, 9 },
{ 0x44, "fillRRect", &Pict2Parser::handleFillRRect, 9 },
-
+ { 0x45, "Reserved", &Pict2Parser::handleNOP, 9 },
+ { 0x46, "Reserved", &Pict2Parser::handleNOP, 9 },
+ { 0x47, "Reserved", &Pict2Parser::handleNOP, 9 },
{ 0x48, "frameSameRRect", &Pict2Parser::handleFrameSameRRect, 1 },
{ 0x49, "paintSameRRect", &Pict2Parser::handlePaintSameRRect, 1 },
{ 0x4a, "eraseSameRRect", &Pict2Parser::handleEraseSameRRect, 1 },
{ 0x4b, "invertSameRRect", &Pict2Parser::handleInvertSameRRect, 1 },
{ 0x4c, "fillSameRRect", &Pict2Parser::handleFillSameRRect, 1 },
-
+ { 0x4d, "Reserved", &Pict2Parser::handleNOP, 1 },
+ { 0x4e, "Reserved", &Pict2Parser::handleNOP, 1 },
+ { 0x4f, "Reserved", &Pict2Parser::handleNOP, 1 },
{ 0x50, "frameOval", &Pict2Parser::handleFrameOval, 9 },
{ 0x51, "paintOval", &Pict2Parser::handlePaintOval, 9 },
{ 0x52, "eraseOval", &Pict2Parser::handleEraseOval, 9 },
{ 0x53, "invertOval", &Pict2Parser::handleInsertOval, 9 },
{ 0x54, "fillOval", &Pict2Parser::handleFillOval, 9 },
-
+ { 0x55, "Reserved", &Pict2Parser::handleNOP, 9 },
+ { 0x56, "Reserved", &Pict2Parser::handleNOP, 9 },
+ { 0x57, "Reserved", &Pict2Parser::handleNOP, 9 },
{ 0x58, "frameSameOval", &Pict2Parser::handleFrameSameOval, 1 },
{ 0x59, "paintSameOval", &Pict2Parser::handlePaintSameOval, 1 },
{ 0x5a, "eraseSameOval", &Pict2Parser::handleEraseSameOval, 1 },
{ 0x5b, "invertSameOval", &Pict2Parser::handleInsertSameOval, 1 },
{ 0x5c, "fillSameOval", &Pict2Parser::handleFillSameOval, 1 },
-
+ { 0x5d, "Reserved", &Pict2Parser::handleNOP, 1 },
+ { 0x5e, "Reserved", &Pict2Parser::handleNOP, 1 },
+ { 0x5f, "Reserved", &Pict2Parser::handleNOP, 1 },
{ 0x60, "frameArc", &Pict2Parser::handleFrameArc, 13 },
{ 0x61, "paintArc", &Pict2Parser::handlePaintArc, 13 },
{ 0x62, "eraseArc", &Pict2Parser::handleEraseArc, 13 },
{ 0x63, "invertArc", &Pict2Parser::handleInsertArc, 13 },
{ 0x64, "fillArc", &Pict2Parser::handleFillArc, 13 },
-
+ { 0x65, "Reserved", &Pict2Parser::handleNOP, 13 },
+ { 0x66, "Reserved", &Pict2Parser::handleNOP, 13 },
+ { 0x67, "Reserved", &Pict2Parser::handleNOP, 13 },
{ 0x68, "frameSameArc", &Pict2Parser::handleFrameSameArc, 5 },
{ 0x69, "paintSameArc", &Pict2Parser::handlePaintSameArc, 5 },
{ 0x6a, "eraseSameArc", &Pict2Parser::handleEraseSameArc, 5 },
{ 0x6b, "inverSameArc", &Pict2Parser::handleInsertSameArc, 5 },
{ 0x6c, "fillSameArc", &Pict2Parser::handleFillSameArc, 5 },
-
+ { 0x6d, "Reserved", &Pict2Parser::handleNOP, 5 },
+ { 0x6e, "Reserved", &Pict2Parser::handleNOP, 5 },
+ { 0x6f, "Reserved", &Pict2Parser::handleNOP, 5 },
{ 0x70, "framePoly", &Pict2Parser::handleFramePoly, -1 },
{ 0x71, "paintPoly", &Pict2Parser::handlePaintPoly, -1 },
{ 0x72, "erasePoly", &Pict2Parser::handleErasePoly, -1 },
{ 0x73, "invertPoly", &Pict2Parser::handleInvertPoly, -1 },
{ 0x74, "fillPoly", &Pict2Parser::handleFillPoly, -1 },
-
+ { 0x75, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x76, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x77, "Reserved", &Pict2Parser::skipData, -1 },
{ 0x78, "frameSamePoly", &Pict2Parser::handleFrameSamePoly, 1 },
{ 0x79, "paintSamePoly", &Pict2Parser::handlePaintSamePoly, 1 },
{ 0x7a, "eraseSamePoly", &Pict2Parser::handleEraseSamePoly, 1 },
{ 0x7b, "invertSamePoly", &Pict2Parser::handleInvertSamePoly, 1 },
{ 0x7c, "fillSamePoly", &Pict2Parser::handleFillSamePoly, 1 },
-
+ { 0x7d, "Reserved", &Pict2Parser::handleNOP, 1 },
+ { 0x7e, "Reserved", &Pict2Parser::handleNOP, 1 },
+ { 0x7f, "Reserved", &Pict2Parser::handleNOP, 1 },
{ 0x80, "frameRgn", &Pict2Parser::handleFrameRgn, -1 },
{ 0x81, "paintRgn", &Pict2Parser::handlePaintRgn, -1 },
{ 0x82, "eraseRgn", &Pict2Parser::handleEraseRgn, -1 },
{ 0x83, "invertRgn", &Pict2Parser::handleInvertRgn, -1 },
{ 0x84, "fillRgn", &Pict2Parser::handleFillRgn, -1 },
-
+ { 0x85, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x86, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x87, "Reserved", &Pict2Parser::skipData, -1 },
{ 0x88, "frameSameRgn", &Pict2Parser::handleFrameSameRgn, 1 },
{ 0x89, "paintSameRgn", &Pict2Parser::handlePaintSameRgn, 1 },
{ 0x8a, "eraseSameRgn", &Pict2Parser::handleEraseSameRgn, 1 },
{ 0x8b, "invertSameRgn", &Pict2Parser::handleInvertSameRgn, 1 },
{ 0x8c, "fillSameRgn", &Pict2Parser::handleFillSameRgn, 1 },
-
+ { 0x8d, "Reserved", &Pict2Parser::handleNOP, 1 },
+ { 0x8e, "Reserved", &Pict2Parser::handleNOP, 1 },
+ { 0x8f, "Reserved", &Pict2Parser::handleNOP, 1 },
{ 0x90, "BitsRect", &Pict2Parser::handleBitsRect, -1 },
{ 0x91, "BitsRgn", &Pict2Parser::handleBitsRgn, -1 },
-
+ { 0x92, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x93, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x94, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x95, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x96, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x97, "Reserved", &Pict2Parser::skipData, -1 },
{ 0x98, "PackBitsRect", &Pict2Parser::handlePackBitsRect, -1 },
{ 0x99, "PackBitsRgn", &Pict2Parser::handlePackBitsRgn, -1 },
-
+ { 0x9a, "DirectBitsRect", &Pict2Parser::handleDirectBitsRect, -1 },
+ { 0x9b, "DirectBitsRgn", &Pict2Parser::handleDirectBitsRgn, -1 },
+ { 0x9c, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x9d, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x9e, "Reserved", &Pict2Parser::skipData, -1 },
+ { 0x9f, "Reserved", &Pict2Parser::skipData, -1 },
{ 0xa0, "shortComment", &Pict2Parser::handleShortComment, 3 },
{ 0xa1, "longComment", &Pict2Parser::handleLongComment, -1 },
@@ -720,3 +760,29 @@ void Pict2Parser::handleLongComment()
void Pict2Parser::handleEndOfPicture()
{
}
+
+void Pict2Parser::handleFontName()
+{
+}
+
+void Pict2Parser::handleLineJustify()
+{
+}
+
+void Pict2Parser::handleGlyphState()
+{
+}
+
+void Pict2Parser::handleDirectBitsRect()
+{
+}
+
+void Pict2Parser::handleDirectBitsRgn()
+{
+}
+
+void Pict2Parser::skipData()
+{
+ m_recordSize = (int)readU16() + 1;
+ PICT_DEBUG_MSG(("Size of the data: %i\n", m_recordSize));
+}
diff --git a/src/lib/Pict2Parser.h b/src/lib/Pict2Parser.h
index 1a4f3ab..26c7762 100644
--- a/src/lib/Pict2Parser.h
+++ b/src/lib/Pict2Parser.h
@@ -73,7 +73,6 @@ private:
void handleHiliteColor();
void handleDefHilite();
void handleOpColor();
-
void handleLine();
void handleLineFrom();
void handleShortLine();
@@ -83,7 +82,10 @@ private:
void handleDHText();
void handleDVText();
void handleDHDVText();
-
+ void handleFontName();
+ void handleLineJustify();
+ void handleGlyphState();
+
void handleFrameRect();
void handlePaintRect();
void handleEraseRect();
@@ -161,11 +163,15 @@ private:
void handlePackBitsRect();
void handlePackBitsRgn();
+ void handleDirectBitsRect();
+ void handleDirectBitsRgn();
void handleShortComment();
void handleLongComment();
void handleEndOfPicture();
+
+ void skipData();
int m_recordSize;
};