WPG2Parser.h Source File documentation

WPG2Parser.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2/* libwpg
3 * Version: MPL 2.0 / LGPLv2.1+
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * Major Contributor(s):
10 * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
11 * Copyright (C) 2005 Fridrich Strba (fridrich.strba@bluewin.ch)
12 * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl)
13 *
14 * For minor contributions see the git repository.
15 *
16 * Alternatively, the contents of this file may be used under the terms
17 * of the GNU Lesser General Public License Version 2.1 or later
18 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
19 * applicable instead of those above.
20 *
21 * For further information visit http://libwpg.sourceforge.net
22 */
23
24/* "This product is not manufactured, approved, or supported by
25 * Corel Corporation or Corel Corporation Limited."
26 */
27
28#ifndef __WPG2PARSER_H__
29#define __WPG2PARSER_H__
30
31#include <limits>
32#include <map>
33#include <stack>
34#include <vector>
35
36#include <librevenge/librevenge.h>
37
38#include "WPGBitmap.h"
39#include "WPGDashArray.h"
40#include "WPGXParser.h"
41
42 class WPG2TransformMatrix
43{
44public:
45 double element[3][3];
46
47 WPG2TransformMatrix()
48 {
49 // identity transformation
50 element[0][0] = element[1][1] = 1;
51 element[2][2] = 1;
52 element[0][1] = element[0][2] = 0;
53 element[1][0] = element[1][2] = 0;
54 element[2][0] = element[2][1] = 0;
55 }
56
57 void transform(long &x, long &y) const
58 {
59 const double rx = element[0][0]*x + element[1][0]*y + element[2][0];
60 const double ry = element[0][1]*x + element[1][1]*y + element[2][1];
61 x = toLong(rx);
62 y = toLong(ry);
63 }
64
65 librevenge::RVNGPropertyList transformPoint(const ::librevenge::RVNGPropertyList &p) const
66 {
67 librevenge::RVNGPropertyList propList;
68 propList.insert("svg:x", (element[0][0]*p["svg:x"]->getDouble() + element[1][0]*p["svg:y"]->getDouble() + element[2][0]));
69 propList.insert("svg:y", (element[0][1]*p["svg:x"]->getDouble() + element[1][1]*p["svg:y"]->getDouble() + element[2][1]));
70 return propList;
71 }
72
73 librevenge::RVNGPropertyList transformRect(const ::librevenge::RVNGPropertyList &r) const
74 {
75 librevenge::RVNGPropertyList propList;
76 double oldx1 = r["svg:x"]->getDouble();
77 double oldy1 = r["svg:y"]->getDouble();
78 double oldx2 = r["svg:x"]->getDouble() + r["svg:width"]->getDouble();
79 double oldy2 = r["svg:y"]->getDouble() + r["svg:height"]->getDouble();
80
81 double newx1 = element[0][0]*oldx1 + element[1][0]*oldy1 + element[2][0];
82 double newy1 = element[0][1]*oldx1 + element[1][1]*oldy1 + element[2][1];
83 double newx2 = element[0][0]*oldx2 + element[1][0]*oldy2 + element[2][0];
84 double newy2 = element[0][1]*oldx2 + element[1][1]*oldy2 + element[2][1];
85
86 propList.insert("svg:x", (double)newx1);
87 propList.insert("svg:y", (double)newy1);
88 propList.insert("svg:width", (newx2-newx1));
89 propList.insert("svg:height", (newy2-newy1));
90 return propList;
91 }
92
93 WPG2TransformMatrix &transformBy(const WPG2TransformMatrix &m)
94 {
95 double result[3][3];
96
97 for (int i = 0; i < 3; i++)
98 for (int j = 0; j < 3; j++)
99 {
100 result[i][j] = 0;
101 for (int k = 0; k < 3; k++)
102 result[i][j] += m.element[i][k]*element[k][j];
103 }
104
105 for (int x = 0; x < 3; x++)
106 for (int y = 0; y < 3; y++)
107 element[x][y] = result[x][y];
108
109 return *this;
110 }
111
112private:
113 static long toLong(double d)
114 {
115 if (d > double(std::numeric_limits<long>::max()))
116 return std::numeric_limits<long>::max();
117 else if (d < double(std::numeric_limits<long>::min()))
118 return std::numeric_limits<long>::min();
119 else
120 return long(d);
121 }
122};
123
124 class WPGCompoundPolygon
125{
126public:
127 WPG2TransformMatrix matrix;
128 bool isFilled;
129 bool isFramed;
130 bool isClosed;
131
132 WPGCompoundPolygon(): matrix(), isFilled(true), isFramed(true), isClosed(true) {}
133};
134
135 class WPGGroupContext
136{
137public:
138 unsigned subIndex;
139 int parentType;
140 librevenge::RVNGPropertyListVector compoundPath;
141 WPG2TransformMatrix compoundMatrix;
142 bool compoundWindingRule;
143 bool compoundFilled;
144 bool compoundFramed;
145 bool compoundClosed;
146
147 WPGGroupContext(): subIndex(0), parentType(0),
148 compoundPath(), compoundMatrix(), compoundWindingRule(false),
149 compoundFilled(false), compoundFramed(true), compoundClosed(false) {}
150
151 bool isCompoundPolygon() const
152 {
153 return parentType == 0x1a;
154 }
155};
156
157 class WPGBitmapContext
158{
159public:
160 double x1, y1, x2, y2;
161 long hres, vres;
162 WPGBitmapContext(): x1(0), y1(0), x2(0), y2(0), hres(100), vres(100) {}
163};
164
165 class WPGBinaryDataContext
166{
167public:
168 double x1, y1, x2, y2;
169 int numObjects, objectIndex;
170 std::vector<librevenge::RVNGString> mimeTypes;
171 WPGBinaryDataContext(): x1(0), y1(0), x2(0), y2(0), numObjects(0), objectIndex(0), mimeTypes() {}
172};
173
174 class WPGTextDataContext
175{
176public:
177 double x1, y1, x2, y2;
178 unsigned short flags;
179 unsigned char vertAlign;
180 unsigned char horAlign;
181 double baseLineAngle;
182 WPGTextDataContext(): x1(0), y1(0), x2(0), y2(0), flags(), vertAlign(), horAlign(), baseLineAngle(0.0) {}
183};
184
185 class WPG2Parser : public WPGXParser
186{
187public:
188 WPG2Parser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter, bool isEmbedded = false);
189 bool parse() override;
190
191private:
192 void handleStartWPG();
193 void handleEndWPG();
194 void handleFormSettings();
195 void handleLayer();
196 void handleCompoundPolygon();
197
198 void handlePenStyleDefinition();
199 void handlePatternDefinition();
200 void handleColorPalette();
201 void handleDPColorPalette();
202 void handlePenForeColor();
203 void handleDPPenForeColor();
204 void handlePenBackColor();
205 void handleDPPenBackColor();
206 void handlePenStyle();
207 void handlePenSize();
208 void handleDPPenSize();
209 void handleLineCap();
210 void handleLineJoin();
211 void handleBrushGradient();
212 void handleDPBrushGradient();
213 void handleBrushForeColor();
214 void handleDPBrushForeColor();
215 void handleBrushBackColor();
216 void handleDPBrushBackColor();
217 void handleBrushPattern();
218
219 void handlePolyline();
220 void handlePolyspline();
221 void handlePolycurve();
222 void handleRectangle();
223 void handleArc();
224
225 void handleBitmap();
226 void handleBitmapData();
227
228 void handleTextData();
229 void handleTextLine();
230 void handleTextBlock();
231 void handleTextPath();
232
233 void handleObjectCapsule();
234 void handleObjectImage();
235
236 void resetPalette();
237 void flushCompoundPolygon();
238 void setPenStyle();
239
240 unsigned int getRemainingRecordLength() const;
241 bool checkRLESize(unsigned bytes) const;
242
243 double toDouble(long x) const;
244 void transformXY(long &x, long &y) const;
245
246 // parsing context
247 int m_recordLength;
248 long m_recordEnd;
249 bool m_success;
250 bool m_exit;
251 bool m_graphicsStarted;
252 unsigned int m_xres;
253 unsigned int m_yres;
254 long m_xofs;
255 long m_yofs;
256 long m_width;
257 long m_height;
258 bool m_doublePrecision;
259 librevenge::RVNGPropertyList m_style;
260 libwpg::WPGColor m_penForeColor;
261 libwpg::WPGColor m_penBackColor;
262 libwpg::WPGColor m_brushForeColor;
263 libwpg::WPGColor m_brushBackColor;
264 libwpg::WPGDashArray m_dashArray;
265 librevenge::RVNGPropertyListVector m_gradient;
266 std::map<unsigned int,libwpg::WPGDashArray> m_dashArrayStyles;
267 bool m_layerOpened;
268#ifdef DEBUG
269 unsigned int m_layerId;
270#endif
271 WPG2TransformMatrix m_matrix;
272 double m_gradientAngle;
273 librevenge::RVNGPropertyList m_gradientRef;
274 std::stack<WPGGroupContext> m_groupStack;
275 WPG2TransformMatrix m_compoundMatrix;
276 bool m_compoundWindingRule;
277 bool m_compoundFilled;
278 bool m_compoundFramed;
279 bool m_compoundClosed;
280 WPGBitmapContext m_bitmap;
281 WPGBinaryDataContext m_binaryData;
282 bool m_hFlipped, m_vFlipped;
283 WPGTextDataContext m_textData;
284 bool m_drawTextData;
285
286 class ObjectCharacterization;
287 void parseCharacterization(ObjectCharacterization *);
288#if DUMP_BINARY_DATA
289 unsigned m_binaryId;
290#endif
291};
292
293#endif // __WPG2PARSER_H__
294/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPGBitmap.h
WPGDashArray.h
WPGXParser.h
WPG2Parser::ObjectCharacterization
Definition WPG2Parser.cpp:199
WPG2Parser::handleDPBrushForeColor
void handleDPBrushForeColor()
Definition WPG2Parser.cpp:1190
WPG2Parser::m_textData
WPGTextDataContext m_textData
Definition WPG2Parser.h:283
WPG2Parser::m_compoundFramed
bool m_compoundFramed
Definition WPG2Parser.h:278
WPG2Parser::m_bitmap
WPGBitmapContext m_bitmap
Definition WPG2Parser.h:280
WPG2Parser::handleLineCap
void handleLineCap()
Definition WPG2Parser.cpp:997
WPG2Parser::m_width
long m_width
Definition WPG2Parser.h:256
WPG2Parser::handleRectangle
void handleRectangle()
Definition WPG2Parser.cpp:1630
WPG2Parser::handleObjectCapsule
void handleObjectCapsule()
Definition WPG2Parser.cpp:2191
WPG2Parser::parseCharacterization
void parseCharacterization(ObjectCharacterization *)
Definition WPG2Parser.cpp:1351
WPG2Parser::m_xofs
long m_xofs
Definition WPG2Parser.h:254
WPG2Parser::handleBrushGradient
void handleBrushGradient()
Definition WPG2Parser.cpp:1025
WPG2Parser::handleBrushBackColor
void handleBrushBackColor()
Definition WPG2Parser.cpp:1286
WPG2Parser::WPG2Parser
WPG2Parser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter, bool isEmbedded=false)
Definition WPG2Parser.cpp:258
WPG2Parser::m_style
librevenge::RVNGPropertyList m_style
Definition WPG2Parser.h:259
WPG2Parser::m_matrix
WPG2TransformMatrix m_matrix
Definition WPG2Parser.h:271
WPG2Parser::handlePolyline
void handlePolyline()
Definition WPG2Parser.cpp:1437
WPG2Parser::handleDPColorPalette
void handleDPColorPalette()
Definition WPG2Parser.cpp:812
WPG2Parser::m_vFlipped
bool m_vFlipped
Definition WPG2Parser.h:282
WPG2Parser::m_groupStack
std::stack< WPGGroupContext > m_groupStack
Definition WPG2Parser.h:274
WPG2Parser::flushCompoundPolygon
void flushCompoundPolygon()
Definition WPG2Parser.cpp:727
WPG2Parser::m_gradient
librevenge::RVNGPropertyListVector m_gradient
Definition WPG2Parser.h:265
WPG2Parser::handleDPPenForeColor
void handleDPPenForeColor()
Definition WPG2Parser.cpp:855
WPG2Parser::m_xres
unsigned int m_xres
Definition WPG2Parser.h:252
WPG2Parser::handleTextLine
void handleTextLine()
Definition WPG2Parser.cpp:2329
WPG2Parser::handlePolyspline
void handlePolyspline()
Definition WPG2Parser.cpp:1531
WPG2Parser::m_graphicsStarted
bool m_graphicsStarted
Definition WPG2Parser.h:251
WPG2Parser::handleBitmap
void handleBitmap()
Definition WPG2Parser.cpp:1769
WPG2Parser::handlePenSize
void handlePenSize()
Definition WPG2Parser.cpp:960
WPG2Parser::handleBrushForeColor
void handleBrushForeColor()
Definition WPG2Parser.cpp:1095
WPG2Parser::handleTextData
void handleTextData()
Definition WPG2Parser.cpp:2411
WPG2Parser::handleEndWPG
void handleEndWPG()
Definition WPG2Parser.cpp:661
WPG2Parser::m_recordLength
int m_recordLength
Definition WPG2Parser.h:247
WPG2Parser::handleArc
void handleArc()
Definition WPG2Parser.cpp:1683
WPG2Parser::handleStartWPG
void handleStartWPG()
Definition WPG2Parser.cpp:554
WPG2Parser::handlePenStyleDefinition
void handlePenStyleDefinition()
Definition WPG2Parser.cpp:760
WPG2Parser::handlePenStyle
void handlePenStyle()
Definition WPG2Parser.cpp:935
WPG2Parser::m_layerOpened
bool m_layerOpened
Definition WPG2Parser.h:267
WPG2Parser::m_drawTextData
bool m_drawTextData
Definition WPG2Parser.h:284
WPG2Parser::m_compoundWindingRule
bool m_compoundWindingRule
Definition WPG2Parser.h:276
WPG2Parser::handleCompoundPolygon
void handleCompoundPolygon()
Definition WPG2Parser.cpp:713
WPG2Parser::handleDPBrushGradient
void handleDPBrushGradient()
Definition WPG2Parser.cpp:1060
WPG2Parser::transformXY
void transformXY(long &x, long &y) const
Definition WPG2Parser.cpp:2477
WPG2Parser::m_success
bool m_success
Definition WPG2Parser.h:249
WPG2Parser::handlePenForeColor
void handlePenForeColor()
Definition WPG2Parser.cpp:831
WPG2Parser::handleTextPath
void handleTextPath()
Definition WPG2Parser.cpp:2403
WPG2Parser::m_yres
unsigned int m_yres
Definition WPG2Parser.h:253
WPG2Parser::parse
bool parse() override
Definition WPG2Parser.cpp:317
WPG2Parser::m_dashArray
libwpg::WPGDashArray m_dashArray
Definition WPG2Parser.h:264
WPG2Parser::handleLayer
void handleLayer()
Definition WPG2Parser.cpp:696
WPG2Parser::m_brushBackColor
libwpg::WPGColor m_brushBackColor
Definition WPG2Parser.h:263
WPG2Parser::m_yofs
long m_yofs
Definition WPG2Parser.h:255
WPG2Parser::getRemainingRecordLength
unsigned int getRemainingRecordLength() const
Definition WPG2Parser.cpp:2458
WPG2Parser::m_compoundFilled
bool m_compoundFilled
Definition WPG2Parser.h:277
WPG2Parser::m_brushForeColor
libwpg::WPGColor m_brushForeColor
Definition WPG2Parser.h:262
WPG2Parser::handleBrushPattern
void handleBrushPattern()
Definition WPG2Parser.cpp:1331
WPG2Parser::handleLineJoin
void handleLineJoin()
Definition WPG2Parser.cpp:1011
WPG2Parser::handlePatternDefinition
void handlePatternDefinition()
Definition WPG2Parser.cpp:786
WPG2Parser::handleBitmapData
void handleBitmapData()
Definition WPG2Parser.cpp:1819
WPG2Parser::handleDPPenSize
void handleDPPenSize()
Definition WPG2Parser.cpp:978
WPG2Parser::m_recordEnd
long m_recordEnd
Definition WPG2Parser.h:248
WPG2Parser::m_compoundClosed
bool m_compoundClosed
Definition WPG2Parser.h:279
WPG2Parser::toDouble
double toDouble(long x) const
Definition WPG2Parser.cpp:2472
WPG2Parser::resetPalette
void resetPalette()
Definition WPG2Parser.cpp:2445
WPG2Parser::m_gradientAngle
double m_gradientAngle
Definition WPG2Parser.h:272
WPG2Parser::setPenStyle
void setPenStyle()
Definition WPG2Parser.cpp:921
WPG2Parser::handleTextBlock
void handleTextBlock()
Definition WPG2Parser.cpp:2366
WPG2Parser::handleColorPalette
void handleColorPalette()
Definition WPG2Parser.cpp:793
WPG2Parser::m_binaryData
WPGBinaryDataContext m_binaryData
Definition WPG2Parser.h:281
WPG2Parser::m_doublePrecision
bool m_doublePrecision
Definition WPG2Parser.h:258
WPG2Parser::handlePolycurve
void handlePolycurve()
Definition WPG2Parser.cpp:1544
WPG2Parser::m_penForeColor
libwpg::WPGColor m_penForeColor
Definition WPG2Parser.h:260
WPG2Parser::m_height
long m_height
Definition WPG2Parser.h:257
WPG2Parser::handleFormSettings
void handleFormSettings()
Definition WPG2Parser.cpp:674
WPG2Parser::m_compoundMatrix
WPG2TransformMatrix m_compoundMatrix
Definition WPG2Parser.h:275
WPG2Parser::handleDPPenBackColor
void handleDPPenBackColor()
Definition WPG2Parser.cpp:900
WPG2Parser::handleDPBrushBackColor
void handleDPBrushBackColor()
Definition WPG2Parser.cpp:1308
WPG2Parser::m_hFlipped
bool m_hFlipped
Definition WPG2Parser.h:282
WPG2Parser::m_dashArrayStyles
std::map< unsigned int, libwpg::WPGDashArray > m_dashArrayStyles
Definition WPG2Parser.h:266
WPG2Parser::m_penBackColor
libwpg::WPGColor m_penBackColor
Definition WPG2Parser.h:261
WPG2Parser::handleObjectImage
void handleObjectImage()
Definition WPG2Parser.cpp:2281
WPG2Parser::m_exit
bool m_exit
Definition WPG2Parser.h:250
WPG2Parser::checkRLESize
bool checkRLESize(unsigned bytes) const
Definition WPG2Parser.cpp:2465
WPG2Parser::handlePenBackColor
void handlePenBackColor()
Definition WPG2Parser.cpp:880
WPG2Parser::m_gradientRef
librevenge::RVNGPropertyList m_gradientRef
Definition WPG2Parser.h:273
WPG2TransformMatrix
Definition WPG2Parser.h:43
WPG2TransformMatrix::transformBy
WPG2TransformMatrix & transformBy(const WPG2TransformMatrix &m)
Definition WPG2Parser.h:93
WPG2TransformMatrix::toLong
static long toLong(double d)
Definition WPG2Parser.h:113
WPG2TransformMatrix::transformPoint
librevenge::RVNGPropertyList transformPoint(const ::librevenge::RVNGPropertyList &p) const
Definition WPG2Parser.h:65
WPG2TransformMatrix::transform
void transform(long &x, long &y) const
Definition WPG2Parser.h:57
WPG2TransformMatrix::transformRect
librevenge::RVNGPropertyList transformRect(const ::librevenge::RVNGPropertyList &r) const
Definition WPG2Parser.h:73
WPG2TransformMatrix::element
double element[3][3]
Definition WPG2Parser.h:45
WPG2TransformMatrix::WPG2TransformMatrix
WPG2TransformMatrix()
Definition WPG2Parser.h:47
WPGBinaryDataContext
Definition WPG2Parser.h:166
WPGBinaryDataContext::numObjects
int numObjects
Definition WPG2Parser.h:169
WPGBinaryDataContext::y1
double y1
Definition WPG2Parser.h:168
WPGBinaryDataContext::x2
double x2
Definition WPG2Parser.h:168
WPGBinaryDataContext::x1
double x1
Definition WPG2Parser.h:168
WPGBinaryDataContext::mimeTypes
std::vector< librevenge::RVNGString > mimeTypes
Definition WPG2Parser.h:170
WPGBinaryDataContext::WPGBinaryDataContext
WPGBinaryDataContext()
Definition WPG2Parser.h:171
WPGBinaryDataContext::y2
double y2
Definition WPG2Parser.h:168
WPGBinaryDataContext::objectIndex
int objectIndex
Definition WPG2Parser.h:169
WPGBitmapContext
Definition WPG2Parser.h:158
WPGBitmapContext::y2
double y2
Definition WPG2Parser.h:160
WPGBitmapContext::y1
double y1
Definition WPG2Parser.h:160
WPGBitmapContext::vres
long vres
Definition WPG2Parser.h:161
WPGBitmapContext::x1
double x1
Definition WPG2Parser.h:160
WPGBitmapContext::x2
double x2
Definition WPG2Parser.h:160
WPGBitmapContext::WPGBitmapContext
WPGBitmapContext()
Definition WPG2Parser.h:162
WPGBitmapContext::hres
long hres
Definition WPG2Parser.h:161
WPGCompoundPolygon::isFilled
bool isFilled
Definition WPG2Parser.h:128
WPGCompoundPolygon::WPGCompoundPolygon
WPGCompoundPolygon()
Definition WPG2Parser.h:132
WPGCompoundPolygon::isClosed
bool isClosed
Definition WPG2Parser.h:130
WPGCompoundPolygon::matrix
WPG2TransformMatrix matrix
Definition WPG2Parser.h:127
WPGCompoundPolygon::isFramed
bool isFramed
Definition WPG2Parser.h:129
WPGGroupContext::compoundMatrix
WPG2TransformMatrix compoundMatrix
Definition WPG2Parser.h:141
WPGGroupContext::compoundFilled
bool compoundFilled
Definition WPG2Parser.h:143
WPGGroupContext::compoundPath
librevenge::RVNGPropertyListVector compoundPath
Definition WPG2Parser.h:140
WPGGroupContext::isCompoundPolygon
bool isCompoundPolygon() const
Definition WPG2Parser.h:151
WPGGroupContext::subIndex
unsigned subIndex
Definition WPG2Parser.h:138
WPGGroupContext::compoundWindingRule
bool compoundWindingRule
Definition WPG2Parser.h:142
WPGGroupContext::compoundFramed
bool compoundFramed
Definition WPG2Parser.h:144
WPGGroupContext::WPGGroupContext
WPGGroupContext()
Definition WPG2Parser.h:147
WPGGroupContext::compoundClosed
bool compoundClosed
Definition WPG2Parser.h:145
WPGGroupContext::parentType
int parentType
Definition WPG2Parser.h:139
WPGTextDataContext
Definition WPG2Parser.h:175
WPGTextDataContext::baseLineAngle
double baseLineAngle
Definition WPG2Parser.h:181
WPGTextDataContext::y2
double y2
Definition WPG2Parser.h:177
WPGTextDataContext::x1
double x1
Definition WPG2Parser.h:177
WPGTextDataContext::y1
double y1
Definition WPG2Parser.h:177
WPGTextDataContext::horAlign
unsigned char horAlign
Definition WPG2Parser.h:180
WPGTextDataContext::x2
double x2
Definition WPG2Parser.h:177
WPGTextDataContext::vertAlign
unsigned char vertAlign
Definition WPG2Parser.h:179
WPGTextDataContext::WPGTextDataContext
WPGTextDataContext()
Definition WPG2Parser.h:182
WPGTextDataContext::flags
unsigned short flags
Definition WPG2Parser.h:178
WPGXParser::WPGXParser
WPGXParser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter)
Definition WPGXParser.cpp:30
libwpg::WPGColor
Definition WPGColor.h:35
libwpg::WPGDashArray
Definition WPGDashArray.h:37