38 QSvgVisitorImpl(
const QQuickVectorImageSource &source, QQuickGenerator *generator,
39 bool assumeTrustedSource);
44 void visitNode(
const QSvgNode *node)
override;
84 typedef std::pair<
const QSvgAbstractAnimation *,
const QSvgAbstractAnimatedProperty *> AnimationPair;
85 QList<AnimationPair> collectAnimations(
const QSvgNode *node,
const QString &propertyName);
86 void applyAnimationsToProperty(
const QList<AnimationPair> &animations,
87 QQuickAnimatedProperty *property,
88 std::function<QVariant(
const QSvgAbstractAnimatedProperty *,
int index,
int subtype)> calculateValue);
89 QBezier easingForAnimation(
const QSvgEasingInterface *easingInterface, QSvgAbstractAnimation::AnimationType type);
90 void fillCommonNodeInfo(
const QSvgNode *node,
NodeInfo &info,
const QString &idSuffix = QString{});
91 void fillPathAnimationInfo(
const QSvgNode *node,
PathNodeInfo &info);
92 void fillAnimationInfo(
const QSvgNode *node,
NodeInfo &info);
93 void fillColorAnimationInfo(
const QSvgNode *node,
PathNodeInfo &info);
94 void fillTransformAnimationInfo(
const QSvgNode *node,
NodeInfo &info);
95 void fillMotionPathAnimationInfo(
const QSvgNode *node,
NodeInfo &info);
96 void fillFilterPrimitiveInfo(
const QSvgFilterContainer *node,
97 const QSvgFeFilterPrimitive *filterPrimitive,
100 void handleBaseNodeSetup(
const QSvgNode *node);
101 void handleBaseNode(
const QSvgNode *node);
102 void handleBaseNodeEnd(
const QSvgNode *node);
103 void handlePathNode(
const QSvgNode *node,
const QPainterPath &path);
104 void outputShapePath(QPainterPath pathCopy,
const PathNodeInfo &info);
105 QString nextNodeId()
const;
106 QString findOrCreateId(
const QString &id);
107 QString findOrCreateId(
const QSvgNode *node,
const QString &nodeId);
108 static QString gradientCssDescription(
const QGradient *gradient);
109 static QString colorCssDescription(QColor color);
111 bool startDefsBlock(
const QSvgNode *node);
112 void endDefsBlock(
const QSvgNode *node);
114 void pregenerateReferencedNodes(
const QSvgNode *doc);
117 QQuickVectorImageSource m_source;
118 QQuickGenerator *m_generator;
119 bool m_assumeTrustedSource;
120 mutable int m_nodeIdCounter = 0;
121 QHash<QString, QString> m_idForNodeId;
122 QList<
const QSvgFeFilterPrimitive *> m_filterPrimitives;
124 bool m_pregeneratingReferencedNodes =
false;
126 QString m_linkSuffix;
127 std::unique_ptr<QSvgStyleResolver> m_styleResolver;
128 QHash<
const QString,
const QSvgNode *> m_nodesForKeys;
129 QSvgDocument *m_doc =
nullptr;