47 static QDomDocument createDocumentFromSvg(QIODevice *device, QString *errorMsg = 0,
int *errorLine = 0,
int *errorColumn = 0);
48 static QDomDocument createDocumentFromSvg(
const QByteArray &data, QString *errorMsg = 0,
int *errorLine = 0,
int *errorColumn = 0);
49 static QDomDocument createDocumentFromSvg(
const QString &data, QString *errorMsg = 0,
int *errorLine = 0,
int *errorColumn = 0);
50 static QDomDocument createDocumentFromSvg(QXmlStreamReader reader, QString *errorMsg = 0,
int *errorLine = 0,
int *errorColumn = 0);
53 QList<KoShape*> parseSvg(
const QDomElement &e, QSizeF * fragmentSize = 0);
56 void setXmlBaseDir(
const QString &baseDir);
58 void setResolution(
const QRectF boundsInPixels, qreal pixelsPerInch);
59 void setDefaultKraTextVersion(
int version);
63 void setFillStrokeInheritByDefault(
const bool enable);
69 void setResolveTextPropertiesForTopLevel(
const bool enable);
78 QString documentTitle()
const;
79 QString documentDescription()
const;
83 void setFileFetcher(FileFetcherFunc func);
87 void parseDefsElement(
const QDomElement &e);
95 KoShape* parseGroup(
const QDomElement &e,
const QDomElement &overrideChildrenFrom = QDomElement(),
bool createContext =
true);
98 KoShape* getTextPath(
const QDomElement &e);
101 void parseTextChildren(
const QDomElement &e,
KoSvgTextLoader &textLoader);
112 KoShape* resolveUse(
const QDomElement &e,
const QString& key);
127 bool parseFilter(
const QDomElement &,
const QDomElement &referencedBy = QDomElement());
130 bool parseClipPath(
const QDomElement &);
131 bool parseClipMask(
const QDomElement &e);
133 bool parseMarker(
const QDomElement &e);
135 bool parseSymbol(
const QDomElement &e);
138 void parseMetadataApplyToShape(
const QDomElement &e,
KoShape *shape);
141 qreal parseUnit(
const QString &,
bool horiz =
false,
bool vert =
false,
const QRectF &bbox = QRectF());
144 qreal parseUnitX(
const QString &unit);
147 qreal parseUnitY(
const QString &unit);
150 qreal parseUnitXY(
const QString &unit);
153 qreal parseAngular(
const QString &unit);
155 KoShape *createObjectDirect(
const QDomElement &b);
161 KoShape * createPath(
const QDomElement &);
170 SvgFilterHelper* findFilter(
const QString &
id,
const QString &href = QString());
179 KoShape * createShape(
const QString &shapeID);
193 void uploadStyleToContext(
const QDomElement &e);
194 void applyCurrentStyle(
KoShape *shape,
const QPointF &shapeToOriginalUserCoordinates);
195 void applyCurrentBasicStyle(
KoShape *shape);
198 void applyStyle(
KoShape *,
const QDomElement &,
const QPointF &shapeToOriginalUserCoordinates);
201 void applyStyle(
KoShape *,
const SvgStyles &,
const QPointF &shapeToOriginalUserCoordinates);
204 void applyFillStyle(
KoShape * shape);
207 void applyStrokeStyle(
KoShape * shape);
210 void applyFilter(
KoShape * shape);
213 void applyClipping(
KoShape *shape,
const QPointF &shapeToOriginalUserCoordinates);
214 void applyMaskClipping(
KoShape *shape,
const QPointF &shapeToOriginalUserCoordinates);
217 void applyPaintOrder(
KoShape *shape);
220 void applyId(
const QString &
id,
KoShape *shape);
224 void applyViewBoxTransform(
const QDomElement &element);
226 QDomText getTheOnlyTextChild(
const QDomElement &e);
234 QMap<QString, QExplicitlySharedDataPointer<KoMarker>>
m_markers;
239 bool m_isInsideTextSubtree =
false;
244 bool m_inheritStrokeFillByDefault =
false;
245 bool m_resolveTextPropertiesForTopLevel =
true;
Contains data used for loading svg.