17 #include "pluginapi.h"
20 #include "fpointarray.h"
21 #include "commonstrings.h"
31 class MultiProgressDialog;
41 penStyle(Qt::SolidLine),
43 penJoin(Qt::RoundJoin),
75 gradientPath.resize(0);
76 gradientPath.svgInit();
82 Qt::PenStyle penStyle;
83 Qt::PenCapStyle penCap;
84 Qt::PenJoinStyle penJoin;
86 QVector<double> dashArray;
90 QPointF gradientStart;
113 quint32 imagePixelFormat;
114 QByteArray imageData;
144 bool import(QString fn,
const TransactionSettings& trSettings,
int flags,
bool showProgress =
true);
145 QImage readThumbnail(QString fn);
148 void parseHeader(QString fName,
double &x,
double &y,
double &b,
double &h);
149 bool convert(QString fn);
151 void aligntoQuadWord(QDataStream &ds);
152 double convertLogical2Pts(
double in);
153 QPointF convertLogical2Pts(QPointF in);
154 FPointArray getPolyPolygonPoints(QDataStream &ds, quint16 version);
155 FPointArray getPolyPoints(QDataStream &ds, quint32 count,
bool closed);
156 QPointF getPoint(QDataStream &ds);
157 void getColor(QDataStream &ds, QString &colorN);
158 QPointF intersectBoundingRect(
PageItem *item, QLineF gradientVector);
159 void finishItem(
PageItem* ite,
bool fill =
true);
160 void handleEllipse(QDataStream &ds);
161 void handleRectangle(QDataStream &ds);
162 void handleRoundRect(QDataStream &ds);
163 void handlePolyline(QDataStream &ds);
164 void handleLine(QDataStream &ds);
165 void handleArc(QDataStream &ds);
166 void handleArcTo(QDataStream &ds);
167 void handleChord(QDataStream &ds);
168 void handlePie(QDataStream &ds);
169 void handleFontDef(QDataStream &ds);
170 void handleSmallText(QDataStream &ds);
171 void handleText(QDataStream &ds, quint16 version);
172 void handleImage(QDataStream &ds, qint64 posi, quint32 totalSize);
173 void handleImageEX(QDataStream &ds, qint64 posi, quint32 totalSize);
174 void handlePolygon(QDataStream &ds);
175 void handlePolyPolygon(QDataStream &ds, quint16 version);
176 void handleTransparent(QDataStream &ds, quint16 version);
177 void handleHatch(QDataStream &ds, quint16 version);
178 void handleGradient(QDataStream &ds);
179 void handleGradientEX(QDataStream &ds, quint16 version);
180 void commonGradient(QDataStream &ds,
PageItem* ite);
181 QString handleColor(QColor col);
182 void handleSetClipRegion(QDataStream &ds);
183 void handleComment(QDataStream &ds);
185 void handleEMFPlus(QDataStream &ds, quint32 dtaSize);
186 void handleEMPObject(QDataStream &ds, quint8 flagsH, quint8 flagsL, quint32 dataSize);
187 quint32 handleEMPBrush(QDataStream &ds, quint16
id,
bool first,
bool cont, quint32 dataSize);
188 void handleEMPPen(QDataStream &ds, quint16
id);
189 void handleEMPPath(QDataStream &ds, quint16
id);
190 void handleEMPRegion(QDataStream &ds, quint16
id);
191 quint32 handleEMPImage(QDataStream &ds, quint16
id,
bool first,
bool cont, quint32 dataSize);
192 quint32 getImageData(QDataStream &ds, quint16
id,
bool first,
bool cont, quint32 dataSize,
emfStyle &sty);
193 void handleEMPFont(QDataStream &ds, quint16
id);
194 void handleEMPSFormat(QDataStream &ds, quint16
id);
195 void handleEMPLineCap(QDataStream &ds, quint16
id);
196 void handleEMFPFillClosedCurve(QDataStream &ds, quint8 flagsL);
197 void handleEMFPFillEllipse(QDataStream &ds, quint8 flagsL);
198 void handleEMFPFillPath(QDataStream &ds, quint8 flagsL, quint8 flagsH);
199 void handleEMFPFillPie(QDataStream &ds, quint8 flagsL);
200 void handleEMFPFillPolygon(QDataStream &ds, quint8 flagsL);
201 void handleEMFPFillRects(QDataStream &ds, quint8 flagsL);
202 void handleEMFPFillRegion(QDataStream &ds, quint8 flagsL, quint8 flagsH);
203 void handleEMFPDrawArc(QDataStream &ds, quint8 flagsL, quint8 flagsH);
204 void handleEMFPDrawBezier(QDataStream &ds, quint8 flagsL, quint8 flagsH);
205 void handleEMFPDrawClosedCurve(QDataStream &ds, quint8 flagsL, quint8 flagsH);
206 void handleEMFPDrawCurve(QDataStream &ds, quint8 flagsL, quint8 flagsH);
207 void handleEMFPDrawEllipse(QDataStream &ds, quint8 flagsL, quint8 flagsH);
208 void handleEMFPDrawImage(QDataStream &ds, quint8 flagsL, quint8 flagsH);
209 void handleEMFPDrawImagePoints(QDataStream &ds, quint8 flagsL, quint8 flagsH);
210 void handleEMFPDrawLines(QDataStream &ds, quint8 flagsL, quint8 flagsH);
211 void handleEMFPDrawPath(QDataStream &ds, quint8 flagsH);
212 void handleEMFPDrawPie(QDataStream &ds, quint8 flagsL, quint8 flagsH);
213 void handleEMFPDrawRects(QDataStream &ds, quint8 flagsL, quint8 flagsH);
214 void handleEMFPDrawDriverString(QDataStream &ds, quint8 flagsL, quint8 flagsH);
215 void handleEMFPDrawString(QDataStream &ds, quint8 flagsL, quint8 flagsH);
216 void handleEMFPSetClipRect(QDataStream &ds, quint8 flagsL);
217 void handleEMFPSetClipRegion(QDataStream &ds, quint8 flagsL, quint8 flagsH);
218 void handleEMFPSetClipPath(QDataStream &ds, quint8 flagsL, quint8 flagsH);
219 void handleEMFPSerializableObject(QDataStream &ds);
220 void getEMFPBrush(quint32 brushID,
bool directBrush);
221 void getEMFPPen(quint32 penID);
222 void getEMFPFont(quint32 fontID);
223 void getEMFPStringFormat(quint32 fontID);
225 QPolygonF getEMFPCurvePoints(QDataStream &ds, quint8 flagsL, quint32 count);
226 QPolygonF getEMFPRect(QDataStream &ds,
bool size);
227 QPointF getEMFPPoint(QDataStream &ds,
bool size);
228 double getEMFPDistance(QDataStream &ds,
bool size);
229 QPointF convertEMFPLogical2Pts(QPointF in, quint16 unit);
230 double convertEMFPLogical2Pts(
double in, quint16 unit);
231 QPolygonF gdip_open_curve_tangents(QPolygonF &points,
double tension);
232 QPolygonF gdip_closed_curve_tangents(QPolygonF &points,
double tension);
233 void append_curve(QPainterPath &path, QPolygonF &points, QPolygonF &tangents,
bool type);
234 void GdipAddPathCurve(QPainterPath &path, QPolygonF &points,
float tension);
235 void GdipAddPathClosedCurve(QPainterPath &path, QPolygonF &points,
float tension);
236 void handleEMFPDrawImageData(QPointF p1, QPointF p2, QPointF p3, quint8 flagsH);
237 QImage getImageDataFromStyle(quint8 flagsH);
242 quint32 textAlignment;
245 QPointF gradientStart;
247 double gradientAngle;
249 QTransform m_WorldMap;
250 QTransform m_WorldMapEMFP;
256 QVector<double> dashArray;
258 Qt::PenStyle penStyle;
259 Qt::PenCapStyle penCap;
260 Qt::PenJoinStyle penJoin;
261 QString CurrColorFill;
262 QString CurrColorStroke;
263 QString CurrColorText;
270 double CurrStrokeTrans;
271 double CurrFillTrans;
277 QPointF currentPoint;
295 QStack<dcState> dcStack;
296 QHash<quint32, dcState> dcStackEMP;
298 QHash<quint32, emfStyle> emfStyleMapEMP;
299 QList<PageItem*> Elements;
305 quint32 EmfPdpiX, EmfPdpiY;
308 qint32 viewPextendX, viewPextendY;
309 qint32 winPextendX, winPextendY;
310 qint32 winOrigX, winOrigY;
311 QStringList importedColors;
312 QStringList importedPatterns;
314 MultiProgressDialog * progressDialog;
332 VersionCompat version;
341 VersionCompat versionCompat;
342 quint32 compressionMode;
350 META_NULL_ACTION = 0,
351 META_PIXEL_ACTION = 100,
352 META_POINT_ACTION = 101,
353 META_LINE_ACTION = 102,
354 META_RECT_ACTION = 103,
355 META_ROUNDRECT_ACTION = 104,
356 META_ELLIPSE_ACTION = 105,
357 META_ARC_ACTION = 106,
358 META_PIE_ACTION = 107,
359 META_CHORD_ACTION = 108,
360 META_POLYLINE_ACTION = 109,
361 META_POLYGON_ACTION = 110,
362 META_POLYPOLYGON_ACTION = 111,
363 META_TEXT_ACTION = 112,
364 META_TEXTARRAY_ACTION = 113,
365 META_STRETCHTEXT_ACTION = 114,
366 META_TEXTRECT_ACTION = 115,
367 META_BMP_ACTION = 116,
368 META_BMPSCALE_ACTION = 117,
369 META_BMPSCALEPART_ACTION = 118,
370 META_BMPEX_ACTION = 119,
371 META_BMPEXSCALE_ACTION = 120,
372 META_BMPEXSCALEPART_ACTION = 121,
373 META_MASK_ACTION = 122,
374 META_MASKSCALE_ACTION = 123,
375 META_MASKSCALEPART_ACTION = 124,
376 META_GRADIENT_ACTION = 125,
377 META_HATCH_ACTION = 126,
378 META_WALLPAPER_ACTION = 127,
379 META_CLIPREGION_ACTION = 128,
380 META_ISECTRECTCLIPREGION_ACTION = 129,
381 META_ISECTREGIONCLIPREGION_ACTION = 130,
382 META_MOVECLIPREGION_ACTION = 131,
383 META_LINECOLOR_ACTION = 132,
384 META_FILLCOLOR_ACTION = 133,
385 META_TEXTCOLOR_ACTION = 134,
386 META_TEXTFILLCOLOR_ACTION = 135,
387 META_TEXTALIGN_ACTION = 136,
388 META_MAPMODE_ACTION = 137,
389 META_FONT_ACTION = 138,
390 META_PUSH_ACTION = 139,
391 META_POP_ACTION = 140,
392 META_RASTEROP_ACTION = 141,
393 META_TRANSPARENT_ACTION = 142,
394 META_EPS_ACTION = 143,
395 META_REFPOINT_ACTION = 144,
396 META_TEXTLINECOLOR_ACTION = 145,
397 META_TEXTLINE_ACTION = 146,
398 META_FLOATTRANSPARENT_ACTION = 147,
399 META_GRADIENTEX_ACTION = 148,
400 META_LAYOUTMODE_ACTION = 149,
401 META_TEXTLANGUAGE_ACTION = 150,
402 META_OVERLINECOLOR_ACTION = 151,
403 META_RENDERGRAPHIC_ACTION = 152,
404 META_COMMENT_ACTION = 512
426 GradientStyle_LINEAR = 0,
427 GradientStyle_AXIAL = 1,
428 GradientStyle_RADIAL = 2,
429 GradientStyle_ELLIPTICAL = 3,
430 GradientStyle_SQUARE = 4,
431 GradientStyle_RECT = 5
463 WIDTH_ULTRA_CONDENSED,
464 WIDTH_EXTRA_CONDENSED,
466 WIDTH_SEMI_CONDENSED,
470 WIDTH_EXTRA_EXPANDED,
493 UNDERLINE_DASHDOTDOT,
496 UNDERLINE_DOUBLEWAVE,
498 UNDERLINE_BOLDDOTTED,
500 UNDERLINE_BOLDLONGDASH,
501 UNDERLINE_BOLDDASHDOT,
502 UNDERLINE_BOLDDASHDOTDOT,
517 bool SerializableObject_Valid;
518 QList<ImageEffect> m_Effects;
520 quint32 m_currObjSize;
522 bool seen_XGRAD_SEQ_BEGIN;
524 void cancelRequested() { cancel =
true; }
Definition: importemf.h:36
SvmPlug(ScribusDoc *doc, int flags)
Create the SVM importer window.
Definition: importsvm.cpp:286
Definition: vgradient.h:78
the Document Class
Definition: scribusdoc.h:90
Definition: undomanager.h:52
Definition: pageitem.h:92
Definition: fpointarray.h:42
A simple common strings class to reduce the string count and ease the translation process a little...
Definition: commonstrings.h:48
Definition: importsvm.h:117
Definition: selection.h:34