28 #ifndef __WPG2PARSER_H__
29 #define __WPG2PARSER_H__
31 #include "WPGXParser.h"
47 element[0][0] = element[1][1] = 1; element[2][2] = 1;
48 element[0][1] = element[0][2] = 0;
49 element[1][0] = element[1][2] = 0;
50 element[2][0] = element[2][1] = 0;
53 void transform(
long& x,
long& y)
const
55 long rx = (long)(element[0][0]*x + element[1][0]*y + element[2][0]);
56 long ry = (long)(element[0][1]*x + element[1][1]*y + element[2][1]);
64 point.x = element[0][0]*p.x + element[1][0]*p.y + element[2][0];
65 point.y = element[0][1]*p.x + element[1][1]*p.y + element[2][1];
72 rect.x1 = element[0][0]*r.x1 + element[1][0]*r.y1 + element[2][0];
73 rect.y1 = element[0][1]*r.x1 + element[1][1]*r.y1 + element[2][1];
74 rect.x2 = element[0][0]*r.x2 + element[1][0]*r.y2 + element[2][0];
75 rect.y2 = element[0][1]*r.x2 + element[1][1]*r.y2 + element[2][1];
83 for(
int i = 0; i < 3; i++)
84 for(
int j = 0; j < 3; j++)
87 for(
int k = 0; k < 3; k++)
88 result[i][j] += m.element[i][k]*element[k][j];
91 for(
int x = 0; x < 3; x++)
92 for(
int y = 0; y < 3; y++)
93 element[x][y] = result[x][y];
117 bool compoundWindingRule;
123 compoundPath(), compoundMatrix(), compoundWindingRule(
false),
124 compoundFilled(
false), compoundFramed(
true), compoundClosed(
false) {}
126 bool isCompoundPolygon()
const {
return parentType == 0x1a; }
132 double x1, y1, x2, y2;
140 double x1, y1, x2, y2;
141 int numObjects, objectIndex;
142 std::vector<libwpg::WPGString> mimeTypes;
143 WPGBinaryDataContext(): x1(0), y1(0), x2(0), y2(0), numObjects(0), objectIndex(0), mimeTypes() {}
153 void handleStartWPG();
155 void handleFormSettings();
157 void handleCompoundPolygon();
159 void handlePenStyleDefinition();
160 void handlePatternDefinition();
161 void handleColorPalette();
162 void handleDPColorPalette();
163 void handlePenForeColor();
164 void handleDPPenForeColor();
165 void handlePenBackColor();
166 void handleDPPenBackColor();
167 void handlePenStyle();
168 void handlePenSize();
169 void handleDPPenSize();
170 void handleLineCap();
171 void handleLineJoin();
172 void handleBrushGradient();
173 void handleDPBrushGradient();
174 void handleBrushForeColor();
175 void handleDPBrushForeColor();
176 void handleBrushBackColor();
177 void handleDPBrushBackColor();
178 void handleBrushPattern();
180 void handlePolyline();
181 void handlePolyspline();
182 void handlePolycurve();
183 void handleRectangle();
187 void handleBitmapData();
189 void handleObjectCapsule();
190 void handleObjectImage();
193 void flushCompoundPolygon();
200 bool m_graphicsStarted;
207 bool m_doublePrecision;
210 std::map<unsigned int,libwpg::WPGDashArray> m_penStyles;
212 unsigned int m_layerId;
214 double m_gradientAngle;
216 std::stack<WPGGroupContext> m_groupStack;
218 bool m_compoundWindingRule;
219 bool m_compoundFilled;
220 bool m_compoundFramed;
221 bool m_compoundClosed;
224 bool m_hFlipped, m_vFlipped;
230 #endif // __WPG2PARSER_H__
Definition: WPGXParser.h:37
Definition: WPGPoint.h:34
Definition: WPGPaintInterface.h:41
Definition: WPG2Parser.h:137
Definition: WPG2Parser.h:99
Definition: WPG2Parser.h:146
Definition: WPGBrush.h:35
Definition: WPG2Parser.h:110
Definition: WPG2Parser.h:129
Definition: WPG2Parser.cpp:148