37 QSvgVisitorImpl(
const QString svgFileName, QQuickGenerator *generator,
bool assumeTrustedSource);
42 void visitNode(
const QSvgNode *node)
override;
82 typedef std::pair<
const QSvgAbstractAnimation *,
const QSvgAbstractAnimatedProperty *> AnimationPair;
83 QList<AnimationPair> collectAnimations(
const QSvgNode *node,
const QString &propertyName);
84 void applyAnimationsToProperty(
const QList<AnimationPair> &animations,
85 QQuickAnimatedProperty *property,
86 std::function<QVariant(
const QSvgAbstractAnimatedProperty *,
int index,
int subtype)> calculateValue);
87 QBezier easingForAnimation(
const QSvgAbstractAnimation *animation);
88 void fillCommonNodeInfo(
const QSvgNode *node,
NodeInfo &info,
const QString &idSuffix = QString{});
89 void fillPathAnimationInfo(
const QSvgNode *node,
PathNodeInfo &info);
90 void fillAnimationInfo(
const QSvgNode *node,
NodeInfo &info);
91 void fillColorAnimationInfo(
const QSvgNode *node,
PathNodeInfo &info);
92 void fillTransformAnimationInfo(
const QSvgNode *node,
NodeInfo &info);
93 void fillMotionPathAnimationInfo(
const QSvgNode *node,
NodeInfo &info);
94 void fillFilterPrimitiveInfo(
const QSvgFilterContainer *node,
95 const QSvgFeFilterPrimitive *filterPrimitive,
98 void handleBaseNodeSetup(
const QSvgNode *node);
99 void handleBaseNode(
const QSvgNode *node);
100 void handleBaseNodeEnd(
const QSvgNode *node);
101 void handlePathNode(
const QSvgNode *node,
const QPainterPath &path);
102 void outputShapePath(QPainterPath pathCopy,
const PathNodeInfo &info);
103 QString nextNodeId()
const;
104 QString findOrCreateId(
const QString &id);
105 QString findOrCreateId(
const QSvgNode *node,
const QString &nodeId);
106 static QString gradientCssDescription(
const QGradient *gradient);
107 static QString colorCssDescription(QColor color);
109 bool startDefsBlock(
const QSvgNode *node);
110 void endDefsBlock(
const QSvgNode *node);
112 void pregenerateReferencedNodes(
const QSvgNode *doc);
115 QString m_svgFileName;
116 QQuickGenerator *m_generator;
117 bool m_assumeTrustedSource;
118 mutable int m_nodeIdCounter = 0;
119 QHash<QString, QString> m_idForNodeId;
120 QList<
const QSvgFeFilterPrimitive *> m_filterPrimitives;
122 bool m_pregeneratingReferencedNodes =
false;
124 QString m_linkSuffix;
125 std::unique_ptr<QSvgStyleResolver> m_styleResolver;
126 QHash<
const QString,
const QSvgNode *> m_nodesForKeys;