31 #ifndef VSDXCONTENTCOLLECTOR_H
32 #define VSDXCONTENTCOLLECTOR_H
41 #include <libwpg/libwpg.h>
56 libwpg::WPGPaintInterface *painter,
57 std::vector<std::map<unsigned, XForm> > &groupXFormsSequence,
58 std::vector<std::map<unsigned, unsigned> > &groupMembershipsSequence,
59 std::vector<std::list<unsigned> > &documentPageShapeOrders,
67 void collectEllipticalArcTo(
unsigned id,
unsigned level,
double x3,
double y3,
double x2,
double y2,
double angle,
double ecc);
70 void collectOLEData(
unsigned id,
unsigned level,
const WPXBinaryData &oleData);
71 void collectEllipse(
unsigned id,
unsigned level,
double cx,
double cy,
double xleft,
double yleft,
double xtop,
double ytop);
72 void collectLine(
unsigned id,
unsigned level,
double strokeWidth,
Colour c,
unsigned linePattern,
unsigned char startMarker,
unsigned char endMarker,
unsigned lineCap);
73 void collectFillAndShadow(
unsigned id,
unsigned level,
unsigned colourIndexFG,
unsigned colourIndexBG,
unsigned fillPattern,
74 unsigned fillFGTransparency,
unsigned fillBGTransparency,
unsigned shadowPattern,
Colour shfgc,
75 double shadowOffsetX,
double shadowOffsetY);
76 void collectFillAndShadow(
unsigned id,
unsigned level,
unsigned colourIndexFG,
unsigned colourIndexBG,
unsigned fillPattern,
77 unsigned fillFGTransparency,
unsigned fillBGTransparency,
unsigned shadowPattern,
Colour shfgc);
78 void collectGeometry(
unsigned id,
unsigned level,
unsigned char geomFlags);
79 void collectMoveTo(
unsigned id,
unsigned level,
double x,
double y);
80 void collectLineTo(
unsigned id,
unsigned level,
double x,
double y);
81 void collectArcTo(
unsigned id,
unsigned level,
double x2,
double y2,
double bow);
82 void collectNURBSTo(
unsigned id,
unsigned level,
double x2,
double y2,
unsigned char xType,
unsigned char yType,
unsigned degree,
83 std::vector<std::pair<double, double> > controlPoints, std::vector<double> knotVector, std::vector<double> weights);
84 void collectNURBSTo(
unsigned id,
unsigned level,
double x2,
double y2,
double knot,
double knotPrev,
double weight,
double weightPrev,
unsigned dataID);
85 void collectPolylineTo(
unsigned id ,
unsigned level,
double x,
double y,
unsigned char xType,
unsigned char yType,
86 std::vector<std::pair<double, double> > &points);
87 void collectPolylineTo(
unsigned id ,
unsigned level,
double x,
double y,
unsigned dataID);
88 void collectShapeData(
unsigned id,
unsigned level,
unsigned char xType,
unsigned char yType,
unsigned degree,
double lastKnot,
89 std::vector<std::pair<double, double> > controlPoints, std::vector<double> knotVector, std::vector<double> weights);
90 void collectShapeData(
unsigned id,
unsigned level,
unsigned char xType,
unsigned char yType, std::vector<std::pair<double, double> > points);
93 void collectShapeId(
unsigned id,
unsigned level,
unsigned shapeId);
94 void collectForeignDataType(
unsigned id,
unsigned level,
unsigned foreignType,
unsigned foreignFormat,
double offsetX,
double offsetY,
double width,
double height);
95 void collectPageProps(
unsigned id,
unsigned level,
double pageWidth,
double pageHeight,
double shadowOffsetX,
double shadowOffsetY,
double scale);
96 void collectPage(
unsigned id,
unsigned level,
unsigned backgroundPageID,
unsigned currentPageID);
97 void collectShape(
unsigned id,
unsigned level,
unsigned masterPage,
unsigned masterShape,
unsigned lineStyle,
unsigned fillStyle,
unsigned textStyle);
98 void collectSplineStart(
unsigned id,
unsigned level,
double x,
double y,
double secondKnot,
double firstKnot,
double lastKnot,
unsigned degree);
99 void collectSplineKnot(
unsigned id,
unsigned level,
double x,
double y,
double knot);
101 void collectInfiniteLine(
unsigned id,
unsigned level,
double x1,
double y1,
double x2,
double y2);
108 void collectVSDXCharStyle(
unsigned id ,
unsigned level,
unsigned charCount,
unsigned short fontID,
Colour fontColour,
double fontSize,
109 bool bold,
bool italic,
bool underline,
bool doubleunderline,
bool strikeout,
bool doublestrikeout,
110 bool allcaps,
bool initcaps,
bool smallcaps,
bool superscript,
bool subscript,
VSDXFont fontFace);
111 void collectVSDXParaStyle(
unsigned id ,
unsigned level,
unsigned charCount,
double indFirst,
double indLeft,
double indRight,
112 double spLine,
double spBefore,
double spAfter,
unsigned char align,
unsigned flags);
113 void collectTextBlock(
unsigned id,
unsigned level,
double leftMargin,
double rightMargin,
double topMargin,
double bottomMargin,
unsigned char verticalAlign,
114 unsigned char bgClrId,
const Colour &bgColour,
double defaultTabStop,
unsigned char textDirection);
120 void collectStyleSheet(
unsigned id,
unsigned level,
unsigned parentLineStyle,
unsigned parentFillStyle,
unsigned parentTextStyle);
121 void collectLineStyle(
unsigned id,
unsigned level,
double strokeWidth,
Colour c,
unsigned char linePattern,
unsigned char startMarker,
unsigned char endMarker,
unsigned char lineCap);
122 void collectFillStyle(
unsigned id,
unsigned level,
unsigned char colourIndexFG,
unsigned char colourIndexBG,
unsigned char fillPattern,
123 unsigned char fillFGTransparency,
unsigned char fillBGTransparency,
unsigned char shadowPattern,
Colour shfgc,
124 double shadowOffsetX,
double shadowOffsetY);
125 void collectFillStyle(
unsigned id,
unsigned level,
unsigned char colourIndexFG,
unsigned char colourIndexBG,
unsigned char fillPattern,
126 unsigned char fillFGTransparency,
unsigned char fillBGTransparency,
unsigned char shadowPattern,
Colour shfgc);
127 void collectCharIXStyle(
unsigned id ,
unsigned level,
unsigned charCount,
unsigned short fontID,
Colour fontColour,
double fontSize,
128 bool bold,
bool italic,
bool underline,
bool doubleunderline,
bool strikeout,
bool doublestrikeout,
129 bool allcaps,
bool initcaps,
bool smallcaps,
bool superscript,
bool subscript,
VSDXFont fontFace);
130 void collectParaIXStyle(
unsigned id ,
unsigned level,
unsigned charCount,
double indFirst,
double indLeft,
double indRight,
131 double spLine,
double spBefore,
double spAfter,
unsigned char align,
unsigned flags);
132 void collectTextBlockStyle(
unsigned id,
unsigned level,
double leftMargin,
double rightMargin,
double topMargin,
double bottomMargin,
unsigned char verticalAlign,
133 unsigned char bgClrId,
const Colour &bgColour,
double defaultTabStop,
unsigned char textDirection);
137 void collectTextField(
unsigned id,
unsigned level,
int nameId,
int formatStringId);
138 void collectNumericField(
unsigned id,
unsigned level,
unsigned short format,
double number,
int formatStringId);
142 void endPages(
const std::vector<unsigned> &pageOrder);
156 double _NURBSBasis(
unsigned knot,
unsigned degree,
double point,
const std::vector<double> &knotVector);
173 void _lineProperties(
double strokeWidth,
Colour c,
unsigned linePattern,
unsigned startMarker,
unsigned endMarker,
unsigned lineCap);
178 unsigned fillFGTransparency,
unsigned fillBGTransparency,
179 unsigned shadowPattern,
Colour shfgc,
double shadowOffsetX,
double shadowOffsetY);
182 void appendCharacters(WPXString &text,
const std::vector<unsigned char> &characters);
184 bool parseFormatId(
const char *formatString,
unsigned short &result );