46 static QDomDocument createDocumentFromSvg(QIODevice *device, QString *errorMsg = 0,
int *errorLine = 0,
int *errorColumn = 0);
47 static QDomDocument createDocumentFromSvg(
const QByteArray &data, QString *errorMsg = 0,
int *errorLine = 0,
int *errorColumn = 0);
48 static QDomDocument createDocumentFromSvg(
const QString &data, QString *errorMsg = 0,
int *errorLine = 0,
int *errorColumn = 0);
49 static QDomDocument createDocumentFromSvg(QXmlStreamReader reader, QString *errorMsg = 0,
int *errorLine = 0,
int *errorColumn = 0);
52 QList<KoShape*> parseSvg(
const QDomElement &e, QSizeF * fragmentSize = 0);
55 void setXmlBaseDir(
const QString &baseDir);
57 void setResolution(
const QRectF boundsInPixels, qreal pixelsPerInch);
58 void setDefaultKraTextVersion(
int version);
62 void setFillStrokeInheritByDefault(
const bool enable);
68 void setResolveTextPropertiesForTopLevel(
const bool enable);
77 QString documentTitle()
const;
78 QString documentDescription()
const;
82 void setFileFetcher(FileFetcherFunc func);
86 void parseDefsElement(
const QDomElement &e);
94 KoShape* parseGroup(
const QDomElement &e,
const QDomElement &overrideChildrenFrom = QDomElement(),
bool createContext =
true);
97 KoShape* getTextPath(
const QDomElement &e,
bool hideShapesFromDefs =
true);
100 void parseTextChildren(
const QDomElement &e,
KoSvgTextLoader &textLoader,
bool hideShapesFromDefs =
true);
111 KoShape* resolveUse(
const QDomElement &e,
const QString& key);
126 bool parseFilter(
const QDomElement &,
const QDomElement &referencedBy = QDomElement());
129 bool parseClipPath(
const QDomElement &);
130 bool parseClipMask(
const QDomElement &e);
132 bool parseMarker(
const QDomElement &e);
134 bool parseSymbol(
const QDomElement &e);
137 void parseMetadataApplyToShape(
const QDomElement &e,
KoShape *shape);
140 qreal parseUnit(
const QString &,
bool horiz =
false,
bool vert =
false,
const QRectF &bbox = QRectF());
143 qreal parseUnitX(
const QString &unit);
146 qreal parseUnitY(
const QString &unit);
149 qreal parseUnitXY(
const QString &unit);
152 qreal parseAngular(
const QString &unit);
154 KoShape *createObjectDirect(
const QDomElement &b);
160 KoShape * createPath(
const QDomElement &);
175 KoShape * createShape(
const QString &shapeID);
189 void uploadStyleToContext(
const QDomElement &e);
190 void applyCurrentStyle(
KoShape *shape,
const QPointF &shapeToOriginalUserCoordinates);
191 void applyCurrentBasicStyle(
KoShape *shape);
194 void applyStyle(
KoShape *,
const QDomElement &,
const QPointF &shapeToOriginalUserCoordinates);
197 void applyStyle(
KoShape *,
const SvgStyles &,
const QPointF &shapeToOriginalUserCoordinates);
200 void applyFillStyle(
KoShape * shape);
203 void applyStrokeStyle(
KoShape * shape);
206 void applyClipping(
KoShape *shape,
const QPointF &shapeToOriginalUserCoordinates);
207 void applyMaskClipping(
KoShape *shape,
const QPointF &shapeToOriginalUserCoordinates);
210 void applyPaintOrder(
KoShape *shape);
213 void applyId(
const QString &
id,
KoShape *shape);
217 void applyViewBoxTransform(
const QDomElement &element);
219 QDomText getTheOnlyTextChild(
const QDomElement &e);
222 bool shapeInDefs(
const KoShape *shape);
229 QMap<QString, QExplicitlySharedDataPointer<KoMarker>>
m_markers;
234 bool m_isInsideTextSubtree =
false;
239 bool m_inheritStrokeFillByDefault =
false;
240 bool m_resolveTextPropertiesForTopLevel =
true;
Contains data used for loading svg.