Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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 "QtGui/qpainter.h"
19#include "QtGui/qpen.h"
20#include "QtGui/qbrush.h"
21#include "QtGui/qtransform.h"
22#include "QtGui/qcolor.h"
23#include "QtGui/qfont.h"
24#include <qdebug.h>
25#include "qtsvgglobal_p.h"
26
28
29class QPainter;
30class QSvgNode;
31class QSvgFont;
33class QSvgPattern;
34
35template <class T> class QSvgRefCounter
36{
37public:
38 QSvgRefCounter() { t = nullptr; }
40 {
41 t = _t;
42 if (t)
43 t->ref();
44 }
46 {
47 t = other.t;
48 if (t)
49 t->ref();
50 }
52 {
53 if(_t)
54 _t->ref();
55 if (t)
56 t->deref();
57 t = _t;
58 return *this;
59 }
61 {
62 if(other.t)
63 other.t->ref();
64 if (t)
65 t->deref();
66 t = other.t;
67 return *this;
68 }
70 {
71 if (t)
72 t->deref();
73 }
74
75 inline T *operator->() const { return t; }
76 inline operator T*() const { return t; }
77
78 inline bool isDefault() const { return !t || t->isDefault(); }
79
80private:
81 T *t;
82};
83
84class Q_SVG_EXPORT QSvgRefCounted
85{
86public:
87 QSvgRefCounted() { _ref = 0; }
88 virtual ~QSvgRefCounted() {}
89 void ref() {
90 ++_ref;
91// qDebug() << this << ": adding ref, now " << _ref;
92 }
93 void deref() {
94// qDebug() << this << ": removing ref, now " << _ref;
95 if(!--_ref) {
96// qDebug(" deleting");
97 delete this;
98 }
99 }
100private:
101 int _ref;
102};
103
104struct Q_SVG_EXPORT QSvgExtraStates
105{
107
111 Qt::Alignment textAnchor;
115 int nestedUseLevel = 0;
116 int nestedUseCount = 0;
117 bool vectorEffect; // true if pen is cosmetic
118 qint8 imageRendering; // QSvgQualityStyle::ImageRendering
119 bool inUse = false; // true if currently in QSvgUseNode
120};
121
122class Q_SVG_EXPORT QSvgStyleProperty : public QSvgRefCounted
123{
124public:
141public:
142 virtual ~QSvgStyleProperty();
143 virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) = 0;
145 virtual Type type() const=0;
146 bool isDefault() const { return false; } // [not virtual since called from templated class]
147};
148
149class Q_SVG_EXPORT QSvgPaintStyleProperty : public QSvgStyleProperty
150{
151public:
152 virtual QBrush brush(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) = 0;
153 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
154 void revert(QPainter *p, QSvgExtraStates &states) override;
155};
156
157class Q_SVG_EXPORT QSvgQualityStyle : public QSvgStyleProperty
158{
159public:
161 ImageRenderingAuto = 0,
162 ImageRenderingOptimizeSpeed = 1,
163 ImageRenderingOptimizeQuality = 2,
164 };
165
167 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
168 void revert(QPainter *p, QSvgExtraStates &states) override;
169 Type type() const override;
170
171 void setImageRendering(ImageRendering);
172private:
173 // color-render ing v v 'auto' | 'optimizeSpeed' |
174 // 'optimizeQuality' | 'inherit'
175 //int m_colorRendering;
176
177 // shape-rendering v v 'auto' | 'optimizeSpeed' | 'crispEdges' |
178 // 'geometricPrecision' | 'inherit'
179 //QSvgShapeRendering m_shapeRendering;
180
181
182 // text-rendering v v 'auto' | 'optimizeSpeed' | 'optimizeLegibility'
183 // | 'geometricPrecision' | 'inherit'
184 //QSvgTextRendering m_textRendering;
185
186
187 // vector-effect v x 'default' | 'non-scaling-stroke' | 'inherit'
188 //QSvgVectorEffect m_vectorEffect;
189
190 // image-rendering v v 'auto' | 'optimizeSpeed' | 'optimizeQuality' |
191 // 'inherit'
192 qint32 m_imageRendering: 4;
193 qint32 m_oldImageRendering: 4;
194 quint32 m_imageRenderingSet: 1;
195};
196
197
198
199class Q_SVG_EXPORT QSvgOpacityStyle : public QSvgStyleProperty
200{
201public:
202 QSvgOpacityStyle(qreal opacity);
203 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
204 void revert(QPainter *p, QSvgExtraStates &states) override;
205 Type type() const override;
206 qreal opacity() const { return m_opacity; }
207 bool isDefault() const { return qFuzzyCompare(m_opacity, 1.0); }
208
209private:
210 qreal m_opacity;
211 qreal m_oldOpacity;
212};
213
214class Q_SVG_EXPORT QSvgFillStyle : public QSvgStyleProperty
215{
216public:
218 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
219 void revert(QPainter *p, QSvgExtraStates &states) override;
220 Type type() const override;
221
222 void setFillRule(Qt::FillRule f);
223 void setFillOpacity(qreal opacity);
224 void setFillStyle(QSvgPaintStyleProperty* style);
225 void setBrush(QBrush brush);
226
227 const QBrush & qbrush() const
228 {
229 return m_fill;
230 }
231
233 {
234 return m_fillOpacity;
235 }
236
238 {
239 return m_fillRule;
240 }
241
243 {
244 return m_style;
245 }
246
247 void setPaintStyleId(const QString &Id)
248 {
249 m_paintStyleId = Id;
250 }
251
253 {
254 return m_paintStyleId;
255 }
256
257 void setPaintStyleResolved(bool resolved)
258 {
259 m_paintStyleResolved = resolved;
260 }
261
263 {
264 return m_paintStyleResolved;
265 }
266
267private:
268 // fill v v 'inherit' | <Paint.datatype>
269 // fill-opacity v v 'inherit' | <OpacityValue.datatype>
270 QBrush m_fill;
271 QBrush m_oldFill;
272 QSvgPaintStyleProperty *m_style;
273
274 Qt::FillRule m_fillRule;
275 Qt::FillRule m_oldFillRule;
276 qreal m_fillOpacity;
277 qreal m_oldFillOpacity;
278
279 QString m_paintStyleId;
280 uint m_paintStyleResolved : 1;
281
282 uint m_fillRuleSet : 1;
283 uint m_fillOpacitySet : 1;
284 uint m_fillSet : 1;
285};
286
287class Q_SVG_EXPORT QSvgViewportFillStyle : public QSvgStyleProperty
288{
289public:
291 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
292 void revert(QPainter *p, QSvgExtraStates &states) override;
293 Type type() const override;
294
295 const QBrush & qbrush() const
296 {
297 return m_viewportFill;
298 }
299private:
300 // viewport-fill v x 'inherit' | <Paint.datatype>
301 // viewport-fill-opacity v x 'inherit' | <OpacityValue.datatype>
302 QBrush m_viewportFill;
303
304 QBrush m_oldFill;
305};
306
307class Q_SVG_EXPORT QSvgFontStyle : public QSvgStyleProperty
308{
309public:
310 static const int LIGHTER = -1;
311 static const int BOLDER = 1;
312
315 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
316 void revert(QPainter *p, QSvgExtraStates &states) override;
317 Type type() const override;
318
320 {
321 // Store the _pixel_ size in the font. Since QFont::setPixelSize() only takes an int, call
322 // QFont::SetPointSize() instead. Set proper font size just before rendering.
323 m_qfont.setPointSizeF(size);
324 m_sizeSet = 1;
325 }
326
327 void setTextAnchor(Qt::Alignment anchor)
328 {
329 m_textAnchor = anchor;
330 m_textAnchorSet = 1;
331 }
332
333 void setFamily(const QString &family)
334 {
335 m_qfont.setFamilies({family});
336 m_familySet = 1;
337 }
338
340 m_qfont.setStyle(fontStyle);
341 m_styleSet = 1;
342 }
343
345 {
346 m_qfont.setCapitalization(fontVariant);
347 m_variantSet = 1;
348 }
349
351 {
352 m_weight = weight;
353 m_weightSet = 1;
354 }
355
357 {
358 return m_svgFont;
359 }
360
361 const QFont &qfont() const
362 {
363 return m_qfont;
364 }
365
366 QSvgTinyDocument *doc() const {return m_doc;}
367
368private:
369 QSvgFont *m_svgFont;
370 QSvgTinyDocument *m_doc;
371 QFont m_qfont;
372
373 int m_weight;
374 Qt::Alignment m_textAnchor;
375
376 QSvgFont *m_oldSvgFont;
377 QFont m_oldQFont;
378 Qt::Alignment m_oldTextAnchor;
379 int m_oldWeight;
380
381 uint m_familySet : 1;
382 uint m_sizeSet : 1;
383 uint m_styleSet : 1;
384 uint m_variantSet : 1;
385 uint m_weightSet : 1;
386 uint m_textAnchorSet : 1;
387};
388
389class Q_SVG_EXPORT QSvgStrokeStyle : public QSvgStyleProperty
390{
391public:
393 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
394 void revert(QPainter *p, QSvgExtraStates &states) override;
395 Type type() const override;
396
398 {
399 m_stroke.setBrush(brush);
400 m_style = nullptr;
401 m_strokeSet = 1;
402 }
403
405 {
406 m_style = style;
407 m_strokeSet = 1;
408 }
409
410 void setDashArray(const QList<qreal> &dashes);
411
413 {
414 m_stroke.setStyle(Qt::SolidLine);
415 m_strokeDashArraySet = 1;
416 }
417
419 {
420 m_strokeDashOffset = offset;
421 m_strokeDashOffsetSet = 1;
422 }
423
425 {
426 m_stroke.setCapStyle(cap);
427 m_strokeLineCapSet = 1;
428 }
429
431 {
432 m_stroke.setJoinStyle(join);
433 m_strokeLineJoinSet = 1;
434 }
435
437 {
438 m_stroke.setMiterLimit(limit);
439 m_strokeMiterLimitSet = 1;
440 }
441
442 void setOpacity(qreal opacity)
443 {
444 m_strokeOpacity = opacity;
445 m_strokeOpacitySet = 1;
446 }
447
449 {
450 m_stroke.setWidthF(width);
451 m_strokeWidthSet = 1;
452 Q_ASSERT(!m_strokeDashArraySet); // set width before dash array.
453 }
454
456 {
457 return m_stroke.widthF();
458 }
459
460 void setVectorEffect(bool nonScalingStroke)
461 {
462 m_vectorEffect = nonScalingStroke;
463 m_vectorEffectSet = 1;
464 }
465
467 {
468 return m_style;
469 }
470
471 void setPaintStyleId(const QString &Id)
472 {
473 m_paintStyleId = Id;
474 }
475
477 {
478 return m_paintStyleId;
479 }
480
481 void setPaintStyleResolved(bool resolved)
482 {
483 m_paintStyleResolved = resolved;
484 }
485
487 {
488 return m_paintStyleResolved;
489 }
490
491 QPen stroke() const
492 {
493 return m_stroke;
494 }
495
496private:
497 // stroke v v 'inherit' | <Paint.datatype>
498 // stroke-dasharray v v 'inherit' | <StrokeDashArrayValue.datatype>
499 // stroke-dashoffset v v 'inherit' | <StrokeDashOffsetValue.datatype>
500 // stroke-linecap v v 'butt' | 'round' | 'square' | 'inherit'
501 // stroke-linejoin v v 'miter' | 'round' | 'bevel' | 'inherit'
502 // stroke-miterlimit v v 'inherit' | <StrokeMiterLimitValue.datatype>
503 // stroke-opacity v v 'inherit' | <OpacityValue.datatype>
504 // stroke-width v v 'inherit' | <StrokeWidthValue.datatype>
505 QPen m_stroke;
506 QPen m_oldStroke;
507 qreal m_strokeOpacity;
508 qreal m_oldStrokeOpacity;
509 qreal m_strokeDashOffset;
510 qreal m_oldStrokeDashOffset;
511
512 QSvgPaintStyleProperty *m_style;
513 QString m_paintStyleId;
514 uint m_paintStyleResolved : 1;
515 uint m_vectorEffect : 1;
516 uint m_oldVectorEffect : 1;
517
518 uint m_strokeSet : 1;
519 uint m_strokeDashArraySet : 1;
520 uint m_strokeDashOffsetSet : 1;
521 uint m_strokeLineCapSet : 1;
522 uint m_strokeLineJoinSet : 1;
523 uint m_strokeMiterLimitSet : 1;
524 uint m_strokeOpacitySet : 1;
525 uint m_strokeWidthSet : 1;
526 uint m_vectorEffectSet : 1;
527};
528
530{
531public:
533 Type type() const override;
534
535 const QColor & qcolor() const
536 {
537 return m_solidColor;
538 }
539
541 {
542 return m_solidColor;
543 }
544
545private:
546 // solid-color v x 'inherit' | <SVGColor.datatype>
547 // solid-opacity v x 'inherit' | <OpacityValue.datatype>
548 QColor m_solidColor;
549
550 QBrush m_oldFill;
551 QPen m_oldStroke;
552};
553
554class Q_SVG_EXPORT QSvgGradientStyle : public QSvgPaintStyleProperty
555{
556public:
558 ~QSvgGradientStyle() { delete m_gradient; }
559 Type type() const override;
560
561 void setStopLink(const QString &link, QSvgTinyDocument *doc);
562 QString stopLink() const { return m_link; }
563 void resolveStops();
564 void resolveStops_helper(QStringList *visited);
565
566 void setTransform(const QTransform &transform);
568 {
569 return m_transform;
570 }
571
573 {
574 return m_gradient;
575 }
576
577 bool gradientStopsSet() const
578 {
579 return m_gradientStopsSet;
580 }
581
583 {
584 m_gradientStopsSet = set;
585 }
586
587 QBrush brush(QPainter *, const QSvgNode *, QSvgExtraStates &) override;
588private:
589 QGradient *m_gradient;
590 QTransform m_transform;
591
592 QSvgTinyDocument *m_doc;
593 QString m_link;
594 bool m_gradientStopsSet;
595};
596
597class Q_SVG_EXPORT QSvgPatternStyle : public QSvgPaintStyleProperty
598{
599public:
601 ~QSvgPatternStyle() = default;
602 Type type() const override;
603
604 QBrush brush(QPainter *, const QSvgNode *, QSvgExtraStates &) override;
605 QSvgPattern *patternNode() { return m_pattern; }
606private:
607 QSvgPattern *m_pattern;
608 QImage m_patternImage;
609 QRectF m_parentBound;
610};
611
612
613class Q_SVG_EXPORT QSvgTransformStyle : public QSvgStyleProperty
614{
615public:
617 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
618 void revert(QPainter *p, QSvgExtraStates &states) override;
619 Type type() const override;
620
621 const QTransform & qtransform() const
622 {
623 return m_transform;
624 }
625 bool isDefault() const { return m_transform.isIdentity(); }
626private:
627 //7.6 The transform attribute
628 QTransform m_transform;
629 QTransform m_oldWorldTransform;
630};
631
632
633class Q_SVG_EXPORT QSvgAnimateTransform : public QSvgStyleProperty
634{
635public:
646 {
648 Replace
649 };
650public:
651 QSvgAnimateTransform(int startMs, int endMs, int by = 0);
652 void setArgs(TransformType type, Additive additive, const QList<qreal> &args);
653 void setFreeze(bool freeze);
654 void setRepeatCount(qreal repeatCount);
655 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
656 void revert(QPainter *p, QSvgExtraStates &states) override;
657 Type type() const override;
659 {
660 return m_additive;
661 }
662
663 bool animActive(qreal totalTimeElapsed)
664 {
665 if (totalTimeElapsed < m_from)
666 return false;
667 if (m_freeze || m_repeatCount < 0) // fill="freeze" or repeat="indefinite"
668 return true;
669 if (m_totalRunningTime == 0)
670 return false;
671 qreal animationFrame = (totalTimeElapsed - m_from) / m_totalRunningTime;
672 if (animationFrame > m_repeatCount)
673 return false;
674 return true;
675 }
676
677 bool transformApplied() const
678 {
679 return m_transformApplied;
680 }
681
682 // Call this instead of revert if you know that revert is unnecessary.
684 {
685 m_transformApplied = false;
686 }
687
688protected:
689 void resolveMatrix(const QSvgNode *node);
690private:
691 qreal m_from;
692 qreal m_totalRunningTime;
693 TransformType m_type;
694 Additive m_additive;
695 QList<qreal> m_args;
696 int m_count;
697 QTransform m_transform;
698 QTransform m_oldWorldTransform;
699 bool m_finished;
700 bool m_freeze;
701 qreal m_repeatCount;
702 bool m_transformApplied;
703};
704
705
706class Q_SVG_EXPORT QSvgAnimateColor : public QSvgStyleProperty
707{
708public:
709 QSvgAnimateColor(int startMs, int endMs, int by = 0);
710 void setArgs(bool fill, const QList<QColor> &colors);
711 void setFreeze(bool freeze);
712 void setRepeatCount(qreal repeatCount);
713 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
714 void revert(QPainter *p, QSvgExtraStates &states) override;
715 Type type() const override;
716private:
717 qreal m_from;
718 qreal m_totalRunningTime;
719 QList<QColor> m_colors;
720 QBrush m_oldBrush;
721 QPen m_oldPen;
722 bool m_fill;
723 bool m_finished;
724 bool m_freeze;
725 qreal m_repeatCount;
726};
727
728
729class Q_SVG_EXPORT QSvgCompOpStyle : public QSvgStyleProperty
730{
731public:
733 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override;
734 void revert(QPainter *p, QSvgExtraStates &states) override;
735 Type type() const override;
736
738 {
739 return m_mode;
740 }
741private:
742 //comp-op attribute
744
746};
747
748
749class Q_SVG_EXPORT QSvgStyle
750{
751public:
753 : quality(0),
754 fill(0),
755 viewportFill(0),
756 font(0),
757 stroke(0),
758 solidColor(0),
759 gradient(0),
760 pattern(0),
761 transform(0),
762 animateColor(0),
763 opacity(0),
764 compop(0)
765 {}
766 ~QSvgStyle();
767
768 void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
769 void revert(QPainter *p, QSvgExtraStates &states);
770 QSvgRefCounter<QSvgQualityStyle> quality;
771 QSvgRefCounter<QSvgFillStyle> fill;
772 QSvgRefCounter<QSvgViewportFillStyle> viewportFill;
773 QSvgRefCounter<QSvgFontStyle> font;
774 QSvgRefCounter<QSvgStrokeStyle> stroke;
775 QSvgRefCounter<QSvgSolidColorStyle> solidColor;
776 QSvgRefCounter<QSvgGradientStyle> gradient;
777 QSvgRefCounter<QSvgPatternStyle> pattern;
778 QSvgRefCounter<QSvgTransformStyle> transform;
779 QSvgRefCounter<QSvgAnimateColor> animateColor;
780 QList<QSvgRefCounter<QSvgAnimateTransform> > animateTransforms;
781 QSvgRefCounter<QSvgOpacityStyle> opacity;
782 QSvgRefCounter<QSvgCompOpStyle> compop;
783};
784
785/********************************************************/
786// NOT implemented:
787
788// color v v 'inherit' | <Color.datatype>
789//QColor m_color;
790
791// display v x 'inline' | 'block' | 'list-item'
792// | 'run-in' | 'compact' | 'marker' |
793// 'table' | 'inline-table' |
794// 'table-row-group' | 'table-header-group' |
795// 'table-footer-group' | 'table-row' |
796// 'table-column-group' | 'table-column' |
797// 'table-cell' | 'table-caption' |
798// 'none' | 'inherit'
799//QSvgDisplayStyle m_display;
800
801// display-align v v 'auto' | 'before' | 'center' | 'after' | 'inherit'
802//QSvgDisplayAlign m_displayAlign;
803
804// line-increment v v 'auto' | 'inherit' | <Number.datatype>
805//int m_lineIncrement;
806
807// text-anchor v v 'start' | 'middle' | 'end' | 'inherit'
808//QSvgTextAnchor m_textAnchor;
809
810// visibility v v 'visible' | 'hidden' | 'inherit'
811//QSvgVisibility m_visibility;
812
813/******************************************************/
814// the following do not make sense for us
815
816// pointer-events v v 'visiblePainted' | 'visibleFill' | 'visibleStroke' |
817// 'visible' | 'painted' | 'fill' | 'stroke' | 'all' |
818// 'none' | 'inherit'
819//QSvgPointEvents m_pointerEvents;
820
821// audio-level v x 'inherit' | <Number.datatype>
822
824
825#endif // QSVGSTYLE_P_H
\inmodule QtGui
Definition qbrush.h:30
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\reentrant
Definition qfont.h:22
Capitalization
Definition qfont.h:97
Style
This enum describes the different styles of glyphs that are used to display text.
Definition qfont.h:76
\inmodule QtGui
Definition qbrush.h:135
\inmodule QtGui
Definition qimage.h:37
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
CompositionMode
Defines the modes supported for digital image compositing.
Definition qpainter.h:97
\inmodule QtGui
Definition qpen.h:28
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QSvgAnimateTransform::Additive additiveType() const
bool transformApplied() const
bool animActive(qreal totalTimeElapsed)
const QPainter::CompositionMode & compOp() const
QString paintStyleId() const
qreal fillOpacity() const
bool isPaintStyleResolved() const
void setPaintStyleResolved(bool resolved)
void setPaintStyleId(const QString &Id)
const QBrush & qbrush() const
Qt::FillRule fillRule() const
QSvgPaintStyleProperty * style() const
QSvgTinyDocument * doc() const
void setStyle(QFont::Style fontStyle)
void setSize(qreal size)
QSvgFont * svgFont() const
void setTextAnchor(Qt::Alignment anchor)
void setWeight(int weight)
const QFont & qfont() const
void setVariant(QFont::Capitalization fontVariant)
void setFamily(const QString &family)
bool gradientStopsSet() const
QString stopLink() const
QGradient * qgradient() const
QTransform qtransform() const
void setGradientStopsSet(bool set)
bool isDefault() const
qreal opacity() const
virtual QBrush brush(QPainter *p, const QSvgNode *node, QSvgExtraStates &states)=0
QSvgPattern * patternNode()
~QSvgPatternStyle()=default
virtual ~QSvgRefCounted()
Definition qsvgstyle_p.h:88
T * operator->() const
Definition qsvgstyle_p.h:75
QSvgRefCounter(T *_t)
Definition qsvgstyle_p.h:39
bool isDefault() const
Definition qsvgstyle_p.h:78
QSvgRefCounter(const QSvgRefCounter &other)
Definition qsvgstyle_p.h:45
QSvgRefCounter & operator=(T *_t)
Definition qsvgstyle_p.h:51
const QColor & qcolor() const
QBrush brush(QPainter *, const QSvgNode *, QSvgExtraStates &) override
bool isPaintStyleResolved() const
QString paintStyleId() const
void setMiterLimit(qreal limit)
void setDashArrayNone()
QSvgPaintStyleProperty * style() const
void setStroke(QBrush brush)
void setPaintStyleResolved(bool resolved)
void setWidth(qreal width)
void setPaintStyleId(const QString &Id)
void setDashOffset(qreal offset)
void setLineCap(Qt::PenCapStyle cap)
void setVectorEffect(bool nonScalingStroke)
QPen stroke() const
void setOpacity(qreal opacity)
void setStyle(QSvgPaintStyleProperty *style)
void setLineJoin(Qt::PenJoinStyle join)
virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states)=0
virtual void revert(QPainter *p, QSvgExtraStates &states)=0
bool isDefault() const
virtual Type type() const =0
QSvgRefCounter< QSvgSolidColorStyle > solidColor
QSvgRefCounter< QSvgOpacityStyle > opacity
QSvgRefCounter< QSvgPatternStyle > pattern
QSvgRefCounter< QSvgViewportFillStyle > viewportFill
QList< QSvgRefCounter< QSvgAnimateTransform > > animateTransforms
QSvgRefCounter< QSvgFontStyle > font
QSvgRefCounter< QSvgTransformStyle > transform
QSvgRefCounter< QSvgStrokeStyle > stroke
QSvgRefCounter< QSvgAnimateColor > animateColor
QSvgRefCounter< QSvgQualityStyle > quality
QSvgRefCounter< QSvgFillStyle > fill
QSvgRefCounter< QSvgCompOpStyle > compop
QSvgRefCounter< QSvgGradientStyle > gradient
const QTransform & qtransform() const
bool isDefault() const
const QBrush & qbrush() const
The QTransform class specifies 2D transformations of a coordinate system.
Definition qtransform.h:20
Combined button and popup list for selecting options.
@ SolidLine
PenJoinStyle
PenCapStyle
Definition brush.cpp:5
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
Definition qfloat16.h:333
#define LIGHTER(group, role, lighter)
GLenum mode
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLfloat GLfloat f
GLuint GLuint GLfloat weight
GLint GLsizei width
GLuint color
[2]
GLenum type
GLenum const void GLbitfield fontStyle
GLenum GLuint GLintptr offset
GLuint GLenum GLenum transform
GLint limit
GLdouble GLdouble t
Definition qopenglext.h:243
GLfloat GLfloat p
[1]
GLubyte * pattern
GLenum cap
GLuint * states
GLbyte by
static QT_BEGIN_NAMESPACE const QRgb colors[][14]
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
unsigned int quint32
Definition qtypes.h:50
int qint32
Definition qtypes.h:49
unsigned int uint
Definition qtypes.h:34
QT_BEGIN_NAMESPACE typedef signed char qint8
Definition qtypes.h:45
double qreal
Definition qtypes.h:187
QFuture< QSet< QChar > > set
[10]
ba fill(true)
QSharedPointer< T > other(t)
[5]
QJSValueList args
QSvgFont * svgFont
Qt::Alignment textAnchor
Qt::FillRule fillRule
Definition moc.h:23