Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsvgstyle_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5
6#ifndef QSVGSTYLE_P_H
7#define QSVGSTYLE_P_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include "QtCore/qstack.h"
21#include "QtGui/qpainter.h"
22#include "QtGui/qpainterpath.h"
23#include "QtGui/qpen.h"
24#include "QtGui/qbrush.h"
25#include "QtGui/qtransform.h"
26#include "QtGui/qcolor.h"
27#include "QtGui/qfont.h"
28#include <qdebug.h>
29#include "qtsvgglobal_p.h"
30
32
33class QPainter;
34class QSvgNode;
35class QSvgFont;
36class QSvgDocument;
37class QSvgPattern;
38
39template <class T> class QSvgRefCounter
40{
41public:
42 QSvgRefCounter() { t = nullptr; }
44 {
45 t = _t;
46 if (t)
47 t->ref();
48 }
50 {
51 t = other.t;
52 if (t)
53 t->ref();
54 }
56 {
57 if(_t)
58 _t->ref();
59 if (t)
60 t->deref();
61 t = _t;
62 return *this;
63 }
65 {
66 if(other.t)
67 other.t->ref();
68 if (t)
69 t->deref();
70 t = other.t;
71 return *this;
72 }
74 {
75 if (t)
76 t->deref();
77 }
78
79 inline T *operator->() const { return t; }
80 inline operator T*() const { return t; }
81
82 inline bool isDefault() const { return !t || t->isDefault(); }
83
84private:
85 T *t;
86};
87
88class Q_SVG_EXPORT QSvgRefCounted
89{
90public:
91 QSvgRefCounted() { _ref = 0; }
92 virtual ~QSvgRefCounted() {}
93 void ref() {
94 ++_ref;
95// qDebug() << this << ": adding ref, now " << _ref;
96 }
97 void deref() {
98// qDebug() << this << ": removing ref, now " << _ref;
99 if(!--_ref) {
100// qDebug(" deleting");
101 delete this;
102 }
103 }
104private:
105 int _ref;
106};
107
108struct Q_SVG_EXPORT QSvgExtraStates
109{
110 QSvgExtraStates();
111
114 QSvgFont *svgFont;
121 bool vectorEffect; // true if pen is cosmetic
122 qint8 imageRendering; // QSvgQualityStyle::ImageRendering
123 bool inUse = false; // true if currently in QSvgUseNode
124};
125
126class Q_SVG_EXPORT QSvgStyleProperty : public QSvgRefCounted
127{
128public:
129 enum Type
130 {
131 QUALITY,
132 FILL,
133 VIEWPORT_FILL,
134 FONT,
135 STROKE,
136 SOLID_COLOR,
137 GRADIENT,
138 PATTERN,
139 TRANSFORM,
140 ANIMATE_TRANSFORM,
141 ANIMATE_COLOR,
142 OPACITY,
143 COMP_OP,
144 OFFSET,
145 };
146public:
147 virtual ~QSvgStyleProperty();
148 virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) = 0;
149 virtual void revert(QPainter *p, QSvgExtraStates &states) =0;
150 virtual Type type() const=0;
151 bool isDefault() const { return false; } // [not virtual since called from templated class]
152};
153
154class Q_SVG_EXPORT QSvgPaintStyleProperty : public QSvgStyleProperty
155{
156public:
157 virtual QBrush brush(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) = 0;
158 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
159 void revert(QPainter *p, QSvgExtraStates &states) override;
160};
161
162class Q_SVG_EXPORT QSvgQualityStyle : public QSvgStyleProperty
163{
164public:
165 enum ImageRendering: qint8 {
166 ImageRenderingAuto = 0,
167 ImageRenderingOptimizeSpeed = 1,
168 ImageRenderingOptimizeQuality = 2,
169 };
170
171 QSvgQualityStyle(int color);
172 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
173 void revert(QPainter *p, QSvgExtraStates &states) override;
174 Type type() const override;
175
176 void setImageRendering(ImageRendering);
177private:
178 // color-render ing v v 'auto' | 'optimizeSpeed' |
179 // 'optimizeQuality' | 'inherit'
180 //int m_colorRendering;
181
182 // shape-rendering v v 'auto' | 'optimizeSpeed' | 'crispEdges' |
183 // 'geometricPrecision' | 'inherit'
184 //QSvgShapeRendering m_shapeRendering;
185
186
187 // text-rendering v v 'auto' | 'optimizeSpeed' | 'optimizeLegibility'
188 // | 'geometricPrecision' | 'inherit'
189 //QSvgTextRendering m_textRendering;
190
191
192 // vector-effect v x 'default' | 'non-scaling-stroke' | 'inherit'
193 //QSvgVectorEffect m_vectorEffect;
194
195 // image-rendering v v 'auto' | 'optimizeSpeed' | 'optimizeQuality' |
196 // 'inherit'
197 qint32 m_imageRendering: 4;
198 qint32 m_oldImageRendering: 4;
199 quint32 m_imageRenderingSet: 1;
200};
201
202
203
204class Q_SVG_EXPORT QSvgOpacityStyle : public QSvgStyleProperty
205{
206public:
207 QSvgOpacityStyle(qreal opacity);
208 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
209 void revert(QPainter *p, QSvgExtraStates &states) override;
210 Type type() const override;
211 qreal opacity() const { return m_opacity; }
212 bool isDefault() const { return qFuzzyCompare(m_opacity, qreal(1.0)); }
213
214private:
215 qreal m_opacity;
216 qreal m_oldOpacity;
217};
218
219class Q_SVG_EXPORT QSvgFillStyle : public QSvgStyleProperty
220{
221public:
222 QSvgFillStyle();
223 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
224 void revert(QPainter *p, QSvgExtraStates &states) override;
225 Type type() const override;
226
227 void setFillRule(Qt::FillRule f);
228 void setFillOpacity(qreal opacity);
229 void setFillStyle(QSvgPaintStyleProperty* style);
230 void setBrush(QBrush brush);
231
232 const QBrush & qbrush() const
233 {
234 return m_fill;
235 }
236
237 qreal fillOpacity() const
238 {
239 return m_fillOpacity;
240 }
241
242 Qt::FillRule fillRule() const
243 {
244 return m_fillRule;
245 }
246
247 QSvgPaintStyleProperty* style() const
248 {
249 return m_style;
250 }
251
252 void setPaintStyleId(const QString &Id)
253 {
254 m_paintStyleId = Id;
255 }
256
257 QString paintStyleId() const
258 {
259 return m_paintStyleId;
260 }
261
262 void setPaintStyleResolved(bool resolved)
263 {
264 m_paintStyleResolved = resolved;
265 }
266
267 bool isPaintStyleResolved() const
268 {
269 return m_paintStyleResolved;
270 }
271
272private:
273 // fill v v 'inherit' | <Paint.datatype>
274 // fill-opacity v v 'inherit' | <OpacityValue.datatype>
275 QBrush m_fill;
276 QBrush m_oldFill;
277 QSvgPaintStyleProperty *m_style;
278
279 Qt::FillRule m_fillRule;
280 Qt::FillRule m_oldFillRule;
281 qreal m_fillOpacity;
282 qreal m_oldFillOpacity;
283
284 QString m_paintStyleId;
285 uint m_paintStyleResolved : 1;
286
287 uint m_fillRuleSet : 1;
288 uint m_fillOpacitySet : 1;
289 uint m_fillSet : 1;
290};
291
292class Q_SVG_EXPORT QSvgViewportFillStyle : public QSvgStyleProperty
293{
294public:
295 QSvgViewportFillStyle(const QBrush &brush);
296 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
297 void revert(QPainter *p, QSvgExtraStates &states) override;
298 Type type() const override;
299
300 const QBrush & qbrush() const
301 {
302 return m_viewportFill;
303 }
304private:
305 // viewport-fill v x 'inherit' | <Paint.datatype>
306 // viewport-fill-opacity v x 'inherit' | <OpacityValue.datatype>
307 QBrush m_viewportFill;
308
309 QBrush m_oldFill;
310};
311
312class Q_SVG_EXPORT QSvgFontStyle : public QSvgStyleProperty
313{
314public:
315 static const int LIGHTER = -1;
316 static const int BOLDER = 1;
317
318 QSvgFontStyle(QSvgFont *font, QSvgDocument *doc);
319 QSvgFontStyle();
320 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
321 void revert(QPainter *p, QSvgExtraStates &states) override;
322 Type type() const override;
323
324 void setSize(qreal size)
325 {
326 // Store the _pixel_ size in the font. Since QFont::setPixelSize() only takes an int, call
327 // QFont::SetPointSize() instead. Set proper font size just before rendering.
328 m_qfont.setPointSizeF(size);
329 m_sizeSet = 1;
330 }
331
332 void setTextAnchor(Qt::Alignment anchor)
333 {
334 m_textAnchor = anchor;
335 m_textAnchorSet = 1;
336 }
337
338 void setFamily(const QString &family)
339 {
340 m_qfont.setFamilies({family});
341 m_familySet = 1;
342 }
343
344 void setStyle(QFont::Style fontStyle) {
345 m_qfont.setStyle(fontStyle);
346 m_styleSet = 1;
347 }
348
349 void setVariant(QFont::Capitalization fontVariant)
350 {
351 m_qfont.setCapitalization(fontVariant);
352 m_variantSet = 1;
353 }
354
355 void setWeight(int weight)
356 {
357 m_weight = weight;
358 m_weightSet = 1;
359 }
360
361 QSvgFont * svgFont() const
362 {
363 return m_svgFont;
364 }
365
366 const QFont &qfont() const
367 {
368 return m_qfont;
369 }
370
371 QSvgDocument *doc() const {return m_doc;}
372
373private:
374 QSvgFont *m_svgFont;
375 QSvgDocument *m_doc;
376 QFont m_qfont;
377
378 int m_weight = 0;
379 Qt::Alignment m_textAnchor;
380
381 QSvgFont *m_oldSvgFont = nullptr;
382 QFont m_oldQFont;
383 Qt::Alignment m_oldTextAnchor;
384 int m_oldWeight = 0;
385
386 uint m_familySet : 1;
387 uint m_sizeSet : 1;
388 uint m_styleSet : 1;
389 uint m_variantSet : 1;
390 uint m_weightSet : 1;
391 uint m_textAnchorSet : 1;
392};
393
394class Q_SVG_EXPORT QSvgStrokeStyle : public QSvgStyleProperty
395{
396public:
397 QSvgStrokeStyle();
398 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
399 void revert(QPainter *p, QSvgExtraStates &states) override;
400 Type type() const override;
401
402 void setStroke(QBrush brush)
403 {
404 m_stroke.setBrush(brush);
405 m_style = nullptr;
406 m_strokeSet = 1;
407 }
408
409 void setStyle(QSvgPaintStyleProperty *style)
410 {
411 m_style = style;
412 m_strokeSet = 1;
413 }
414
415 void setDashArray(const QList<qreal> &dashes);
416
417 void setDashArrayNone()
418 {
419 m_stroke.setStyle(Qt::SolidLine);
420 m_strokeDashArraySet = 1;
421 }
422
423 void setDashOffset(qreal offset)
424 {
425 m_strokeDashOffset = offset;
426 m_strokeDashOffsetSet = 1;
427 }
428
429 void setLineCap(Qt::PenCapStyle cap)
430 {
431 m_stroke.setCapStyle(cap);
432 m_strokeLineCapSet = 1;
433 }
434
435 void setLineJoin(Qt::PenJoinStyle join)
436 {
437 m_stroke.setJoinStyle(join);
438 m_strokeLineJoinSet = 1;
439 }
440
441 void setMiterLimit(qreal limit)
442 {
443 m_stroke.setMiterLimit(limit);
444 m_strokeMiterLimitSet = 1;
445 }
446
447 void setOpacity(qreal opacity)
448 {
449 m_strokeOpacity = opacity;
450 m_strokeOpacitySet = 1;
451 }
452
453 void setWidth(qreal width)
454 {
455 m_stroke.setWidthF(width);
456 m_strokeWidthSet = 1;
457 Q_ASSERT(!m_strokeDashArraySet); // set width before dash array.
458 }
459
460 qreal width()
461 {
462 return m_stroke.widthF();
463 }
464
465 void setVectorEffect(bool nonScalingStroke)
466 {
467 m_vectorEffect = nonScalingStroke;
468 m_vectorEffectSet = 1;
469 }
470
471 QSvgPaintStyleProperty* style() const
472 {
473 return m_style;
474 }
475
476 void setPaintStyleId(const QString &Id)
477 {
478 m_paintStyleId = Id;
479 }
480
481 QString paintStyleId() const
482 {
483 return m_paintStyleId;
484 }
485
486 void setPaintStyleResolved(bool resolved)
487 {
488 m_paintStyleResolved = resolved;
489 }
490
491 bool isPaintStyleResolved() const
492 {
493 return m_paintStyleResolved;
494 }
495
496 QPen stroke() const
497 {
498 return m_stroke;
499 }
500
501private:
502 // stroke v v 'inherit' | <Paint.datatype>
503 // stroke-dasharray v v 'inherit' | <StrokeDashArrayValue.datatype>
504 // stroke-dashoffset v v 'inherit' | <StrokeDashOffsetValue.datatype>
505 // stroke-linecap v v 'butt' | 'round' | 'square' | 'inherit'
506 // stroke-linejoin v v 'miter' | 'round' | 'bevel' | 'inherit'
507 // stroke-miterlimit v v 'inherit' | <StrokeMiterLimitValue.datatype>
508 // stroke-opacity v v 'inherit' | <OpacityValue.datatype>
509 // stroke-width v v 'inherit' | <StrokeWidthValue.datatype>
510 QPen m_stroke;
511 QPen m_oldStroke;
512 qreal m_strokeOpacity;
513 qreal m_oldStrokeOpacity;
514 qreal m_strokeDashOffset;
515 qreal m_oldStrokeDashOffset;
516
517 QSvgPaintStyleProperty *m_style;
518 QString m_paintStyleId;
519 uint m_paintStyleResolved : 1;
520 uint m_vectorEffect : 1;
521 uint m_oldVectorEffect : 1;
522
523 uint m_strokeSet : 1;
524 uint m_strokeDashArraySet : 1;
525 uint m_strokeDashOffsetSet : 1;
526 uint m_strokeLineCapSet : 1;
527 uint m_strokeLineJoinSet : 1;
528 uint m_strokeMiterLimitSet : 1;
529 uint m_strokeOpacitySet : 1;
530 uint m_strokeWidthSet : 1;
531 uint m_vectorEffectSet : 1;
532};
533
534class Q_SVG_EXPORT QSvgSolidColorStyle : public QSvgPaintStyleProperty
535{
536public:
537 QSvgSolidColorStyle(const QColor &color);
538 Type type() const override;
539
540 const QColor & qcolor() const
541 {
542 return m_solidColor;
543 }
544
545 QBrush brush(QPainter *, const QSvgNode *, QSvgExtraStates &) override
546 {
547 return m_solidColor;
548 }
549
550private:
551 // solid-color v x 'inherit' | <SVGColor.datatype>
552 // solid-opacity v x 'inherit' | <OpacityValue.datatype>
553 QColor m_solidColor;
554
555 QBrush m_oldFill;
556 QPen m_oldStroke;
557};
558
559class Q_SVG_EXPORT QSvgGradientStyle : public QSvgPaintStyleProperty
560{
561public:
562 QSvgGradientStyle(QGradient *grad);
563 ~QSvgGradientStyle() { delete m_gradient; }
564 Type type() const override;
565
566 void setStopLink(const QString &link, QSvgDocument *doc);
567 QString stopLink() const { return m_link; }
568 void resolveStops();
569 void resolveStops_helper(QStringList *visited);
570
571 void setTransform(const QTransform &transform);
572 QTransform qtransform() const
573 {
574 return m_transform;
575 }
576
577 QGradient *qgradient() const
578 {
579 return m_gradient;
580 }
581
582 bool gradientStopsSet() const
583 {
584 return m_gradientStopsSet;
585 }
586
587 void setGradientStopsSet(bool set)
588 {
589 m_gradientStopsSet = set;
590 }
591
592 QBrush brush(QPainter *, const QSvgNode *, QSvgExtraStates &) override;
593private:
594 QGradient *m_gradient;
595 QTransform m_transform;
596
597 QSvgDocument *m_doc;
598 QString m_link;
599 bool m_gradientStopsSet;
600};
601
602class Q_SVG_EXPORT QSvgPatternStyle : public QSvgPaintStyleProperty
603{
604public:
605 QSvgPatternStyle(QSvgPattern *pattern);
606 ~QSvgPatternStyle() = default;
607 Type type() const override;
608
609 QBrush brush(QPainter *, const QSvgNode *, QSvgExtraStates &) override;
610 QSvgPattern *patternNode() { return m_pattern; }
611private:
612 QSvgPattern *m_pattern;
613 QRectF m_parentBound;
614};
615
616
617class Q_SVG_EXPORT QSvgTransformStyle : public QSvgStyleProperty
618{
619public:
620 QSvgTransformStyle(const QTransform &transform);
621 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
622 void revert(QPainter *p, QSvgExtraStates &states) override;
623 Type type() const override;
624
625 const QTransform & qtransform() const
626 {
627 return m_transform;
628 }
629 bool isDefault() const { return m_transform.isIdentity(); }
630private:
631 //7.6 The transform attribute
632 QTransform m_transform;
633 QStack<QTransform> m_oldWorldTransform;
634};
635
636class Q_SVG_EXPORT QSvgCompOpStyle : public QSvgStyleProperty
637{
638public:
639 QSvgCompOpStyle(QPainter::CompositionMode mode);
640 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
641 void revert(QPainter *p, QSvgExtraStates &states) override;
642 Type type() const override;
643
644 const QPainter::CompositionMode & compOp() const
645 {
646 return m_mode;
647 }
648private:
649 //comp-op attribute
650 QPainter::CompositionMode m_mode;
651
652 QPainter::CompositionMode m_oldMode;
653};
654
655class Q_SVG_EXPORT QSvgOffsetStyle : public QSvgStyleProperty
656{
657public:
658 QSvgOffsetStyle() = default;
659 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
660 void revert(QPainter *p, QSvgExtraStates &states) override;
661 Type type() const override;
662
663 void setPath(const QPainterPath &path)
664 {
665 m_path = path;
666 }
667
668 const QPainterPath &path() const
669 {
670 return m_path;
671 }
672
673 void setRotateAngle(qreal angle)
674 {
675 m_rotateAngle = angle;
676 }
677
678 qreal rotateAngle() const
679 {
680 return m_rotateAngle;
681 }
682
683 void setRotateType(QtSvg::OffsetRotateType type)
684 {
685 m_rotateType = type;
686 }
687
688 QtSvg::OffsetRotateType rotateType() const
689 {
690 return m_rotateType;
691 }
692
693 void setDistance(qreal distance)
694 {
695 m_distance = distance;
696 }
697
698 qreal distance() const
699 {
700 return m_distance;
701 }
702
703private:
704 QPainterPath m_path;
705 qreal m_distance = 0;
706 qreal m_rotateAngle = 0;
707 QtSvg::OffsetRotateType m_rotateType = QtSvg::OffsetRotateType::Auto;
708};
709
710class Q_SVG_EXPORT QSvgStaticStyle
711{
712public:
713 QSvgStaticStyle();
714 ~QSvgStaticStyle();
715
716 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
717 void revert(QPainter *p, QSvgExtraStates &states);
718 QSvgRefCounter<QSvgQualityStyle> quality;
719 QSvgRefCounter<QSvgFillStyle> fill;
720 QSvgRefCounter<QSvgViewportFillStyle> viewportFill;
721 QSvgRefCounter<QSvgFontStyle> font;
722 QSvgRefCounter<QSvgStrokeStyle> stroke;
723 QSvgRefCounter<QSvgSolidColorStyle> solidColor;
724 QSvgRefCounter<QSvgGradientStyle> gradient;
725 QSvgRefCounter<QSvgPatternStyle> pattern;
726 QSvgRefCounter<QSvgTransformStyle> transform;
727 QSvgRefCounter<QSvgOpacityStyle> opacity;
728 QSvgRefCounter<QSvgCompOpStyle> compop;
729 QSvgRefCounter<QSvgOffsetStyle> offset;
730};
731
732class QSvgAbstractAnimation;
733
747
748class Q_SVG_EXPORT QSvgAnimatedStyle
749{
750public:
751 QSvgAnimatedStyle();
752 ~QSvgAnimatedStyle();
753
754 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
755 void revert(QPainter *p, QSvgExtraStates &states);
756
757private:
758 void savePaintingState(const QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
759 void fetchStyleState(const QSvgAbstractAnimation *animation, QSvgStyleState &currentStyle);
760 void applyStyle(QPainter *p, QSvgExtraStates &states, const QSvgStyleState &currentStyle);
761
762private:
763 QTransform m_worldTransform;
764 QTransform m_transformToNode;
765 QSvgStyleState m_static;
766};
767
768/********************************************************/
769// NOT implemented:
770
771// color v v 'inherit' | <Color.datatype>
772//QColor m_color;
773
774// display v x 'inline' | 'block' | 'list-item'
775// | 'run-in' | 'compact' | 'marker' |
776// 'table' | 'inline-table' |
777// 'table-row-group' | 'table-header-group' |
778// 'table-footer-group' | 'table-row' |
779// 'table-column-group' | 'table-column' |
780// 'table-cell' | 'table-caption' |
781// 'none' | 'inherit'
782//QSvgDisplayStyle m_display;
783
784// display-align v v 'auto' | 'before' | 'center' | 'after' | 'inherit'
785//QSvgDisplayAlign m_displayAlign;
786
787// line-increment v v 'auto' | 'inherit' | <Number.datatype>
788//int m_lineIncrement;
789
790// text-anchor v v 'start' | 'middle' | 'end' | 'inherit'
791//QSvgTextAnchor m_textAnchor;
792
793// visibility v v 'visible' | 'hidden' | 'inherit'
794//QSvgVisibility m_visibility;
795
796/******************************************************/
797// the following do not make sense for us
798
799// pointer-events v v 'visiblePainted' | 'visibleFill' | 'visibleStroke' |
800// 'visible' | 'painted' | 'fill' | 'stroke' | 'all' |
801// 'none' | 'inherit'
802//QSvgPointEvents m_pointerEvents;
803
804// audio-level v x 'inherit' | <Number.datatype>
805
806QT_END_NAMESPACE
807
808#endif // QSVGSTYLE_P_H
friend class QPainter
T * operator->() const
Definition qsvgstyle_p.h:79
operator T*() const
Definition qsvgstyle_p.h:80
QSvgRefCounter(T *_t)
Definition qsvgstyle_p.h:43
bool isDefault() const
Definition qsvgstyle_p.h:82
QSvgRefCounter(const QSvgRefCounter &other)
Definition qsvgstyle_p.h:49
QSvgRefCounter & operator=(const QSvgRefCounter &other)
Definition qsvgstyle_p.h:64
QSvgRefCounter & operator=(T *_t)
Definition qsvgstyle_p.h:55
Combined button and popup list for selecting options.
QSvgFont * svgFont
Qt::Alignment textAnchor
Qt::FillRule fillRule
QTransform transform
QtSvg::OffsetRotateType offsetRotateType
std::optional< QPainterPath > offsetPath