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