Qt 4.8
qsvgstyle_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtSvg module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QSVGSTYLE_P_H
43 #define QSVGSTYLE_P_H
44 
45 //
46 // W A R N I N G
47 // -------------
48 //
49 // This file is not part of the Qt API. It exists purely as an
50 // implementation detail. This header file may change from version to
51 // version without notice, or even be removed.
52 //
53 // We mean it.
54 //
55 
56 #include "QtGui/qpainter.h"
57 
58 #ifndef QT_NO_SVG
59 
60 #include "QtGui/qpen.h"
61 #include "QtGui/qbrush.h"
62 #include "QtGui/qmatrix.h"
63 #include "QtGui/qcolor.h"
64 #include "QtGui/qfont.h"
65 #include <qdebug.h>
66 
68 
69 class QPainter;
70 class QSvgNode;
71 class QSvgFont;
72 class QSvgTinyDocument;
73 
74 template <class T> class QSvgRefCounter
75 {
76 public:
77  QSvgRefCounter() { t = 0; }
79  {
80  t = _t;
81  if (t)
82  t->ref();
83  }
85  {
86  t = other.t;
87  if (t)
88  t->ref();
89  }
91  {
92  if(_t)
93  _t->ref();
94  if (t)
95  t->deref();
96  t = _t;
97  return *this;
98  }
100  {
101  if(other.t)
102  other.t->ref();
103  if (t)
104  t->deref();
105  t = other.t;
106  return *this;
107  }
109  {
110  if (t)
111  t->deref();
112  }
113 
114  inline T *operator->() const { return t; }
115  inline operator T*() const { return t; }
116 
117 private:
118  T *t;
119 };
120 
122 {
123 public:
124  QSvgRefCounted() { _ref = 0; }
125  virtual ~QSvgRefCounted() {}
126  void ref() {
127  ++_ref;
128 // qDebug() << this << ": adding ref, now " << _ref;
129  }
130  void deref() {
131 // qDebug() << this << ": removing ref, now " << _ref;
132  if(!--_ref) {
133 // qDebug(" deleting");
134  delete this;
135  }
136  }
137 private:
138  int _ref;
139 };
140 
142 {
143  QSvgExtraStates();
144 
148  Qt::Alignment textAnchor;
152  bool vectorEffect; // true if pen is cosmetic
153 };
154 
156 {
157 public:
158  enum Type
159  {
171  COMP_OP
172  };
173 public:
174  virtual ~QSvgStyleProperty();
175  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) = 0;
176  virtual void revert(QPainter *p, QSvgExtraStates &states) =0;
177  virtual Type type() const=0;
178 };
179 
181 {
182 public:
183  virtual QBrush brush(QPainter *p, QSvgExtraStates &states) = 0;
184  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
185  virtual void revert(QPainter *p, QSvgExtraStates &states);
186 };
187 
189 {
190 public:
191  QSvgQualityStyle(int color);
192  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
193  virtual void revert(QPainter *p, QSvgExtraStates &states);
194  virtual Type type() const;
195 private:
196  // color-render ing v v 'auto' | 'optimizeSpeed' |
197  // 'optimizeQuality' | 'inherit'
199 
200  // shape-rendering v v 'auto' | 'optimizeSpeed' | 'crispEdges' |
201  // 'geometricPrecision' | 'inherit'
202  //QSvgShapeRendering m_shapeRendering;
203 
204 
205  // text-rendering v v 'auto' | 'optimizeSpeed' | 'optimizeLegibility'
206  // | 'geometricPrecision' | 'inherit'
207  //QSvgTextRendering m_textRendering;
208 
209 
210  // vector-effect v x 'default' | 'non-scaling-stroke' | 'inherit'
211  //QSvgVectorEffect m_vectorEffect;
212 
213  // image-rendering v v 'auto' | 'optimizeSpeed' | 'optimizeQuality' |
214  // 'inherit'
215  //QSvgImageRendering m_imageRendering;
216 };
217 
218 
219 
221 {
222 public:
223  QSvgOpacityStyle(qreal opacity);
224  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
225  virtual void revert(QPainter *p, QSvgExtraStates &states);
226  virtual Type type() const;
227 private:
230 };
231 
233 {
234 public:
235  QSvgFillStyle();
236  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
237  virtual void revert(QPainter *p, QSvgExtraStates &states);
238  virtual Type type() const;
239 
240  void setFillRule(Qt::FillRule f);
241  void setFillOpacity(qreal opacity);
242  void setFillStyle(QSvgFillStyleProperty* style);
243  void setBrush(QBrush brush);
244 
245  const QBrush & qbrush() const
246  {
247  return m_fill;
248  }
249 
251  {
252  return m_fillOpacity;
253  }
254 
256  {
257  return m_fillRule;
258  }
259 
261  {
262  return m_style;
263  }
264 
265  void setGradientId(const QString &Id)
266  {
267  m_gradientId = Id;
268  }
269 
271  {
272  return m_gradientId;
273  }
274 
275  void setGradientResolved(bool resolved)
276  {
277  m_gradientResolved = resolved;
278  }
279 
280  bool isGradientResolved() const
281  {
282  return m_gradientResolved;
283  }
284 
285 private:
286  // fill v v 'inherit' | <Paint.datatype>
287  // fill-opacity v v 'inherit' | <OpacityValue.datatype>
291 
296 
299 
303 };
304 
306 {
307 public:
308  QSvgViewportFillStyle(const QBrush &brush);
309  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
310  virtual void revert(QPainter *p, QSvgExtraStates &states);
311  virtual Type type() const;
312 
313  const QBrush & qbrush() const
314  {
315  return m_viewportFill;
316  }
317 private:
318  // viewport-fill v x 'inherit' | <Paint.datatype>
319  // viewport-fill-opacity v x 'inherit' | <OpacityValue.datatype>
321 
323 };
324 
326 {
327 public:
328  static const int LIGHTER = -1;
329  static const int BOLDER = 1;
330 
332  QSvgFontStyle();
333  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
334  virtual void revert(QPainter *p, QSvgExtraStates &states);
335  virtual Type type() const;
336 
337  void setSize(qreal size)
338  {
339  // Store the _pixel_ size in the font. Since QFont::setPixelSize() only takes an int, call
340  // QFont::SetPointSize() instead. Set proper font size just before rendering.
341  m_qfont.setPointSizeF(size);
342  m_sizeSet = 1;
343  }
344 
345  void setTextAnchor(Qt::Alignment anchor)
346  {
347  m_textAnchor = anchor;
348  m_textAnchorSet = 1;
349  }
350 
351  void setFamily(const QString &family)
352  {
353  m_qfont.setFamily(family);
354  m_familySet = 1;
355  }
356 
357  void setStyle(QFont::Style fontStyle) {
358  m_qfont.setStyle(fontStyle);
359  m_styleSet = 1;
360  }
361 
363  {
364  m_qfont.setCapitalization(fontVariant);
365  m_variantSet = 1;
366  }
367 
368  static int SVGToQtWeight(int weight);
369 
370  void setWeight(int weight)
371  {
372  m_weight = weight;
373  m_weightSet = 1;
374  }
375 
376  QSvgFont * svgFont() const
377  {
378  return m_svgFont;
379  }
380 
381  const QFont &qfont() const
382  {
383  return m_qfont;
384  }
385 
386  QSvgTinyDocument *doc() const {return m_doc;}
387 
388 private:
392 
393  int m_weight;
394  Qt::Alignment m_textAnchor;
395 
398  Qt::Alignment m_oldTextAnchor;
400 
407 };
408 
410 {
411 public:
412  QSvgStrokeStyle();
413  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
414  virtual void revert(QPainter *p, QSvgExtraStates &states);
415  virtual Type type() const;
416 
417  void setStroke(QBrush brush)
418  {
419  m_stroke.setBrush(brush);
420  m_style = 0;
421  m_strokeSet = 1;
422  }
423 
425  {
426  m_style = style;
427  m_strokeSet = 1;
428  }
429 
430  void setDashArray(const QVector<qreal> &dashes);
431 
433  {
434  m_stroke.setStyle(Qt::SolidLine);
435  m_strokeDashArraySet = 1;
436  }
437 
438  void setDashOffset(qreal offset)
439  {
440  m_strokeDashOffset = offset;
441  m_strokeDashOffsetSet = 1;
442  }
443 
445  {
446  m_stroke.setCapStyle(cap);
447  m_strokeLineCapSet = 1;
448  }
449 
451  {
452  m_stroke.setJoinStyle(join);
453  m_strokeLineJoinSet = 1;
454  }
455 
456  void setMiterLimit(qreal limit)
457  {
458  m_stroke.setMiterLimit(limit);
459  m_strokeMiterLimitSet = 1;
460  }
461 
462  void setOpacity(qreal opacity)
463  {
464  m_strokeOpacity = opacity;
465  m_strokeOpacitySet = 1;
466  }
467 
468  void setWidth(qreal width)
469  {
470  m_stroke.setWidthF(width);
471  m_strokeWidthSet = 1;
472  Q_ASSERT(!m_strokeDashArraySet); // set width before dash array.
473  }
474 
476  {
477  return m_stroke.widthF();
478  }
479 
480  void setVectorEffect(bool nonScalingStroke)
481  {
482  m_vectorEffect = nonScalingStroke;
483  m_vectorEffectSet = 1;
484  }
485 
487  {
488  return m_style;
489  }
490 
491  void setGradientId(const QString &Id)
492  {
493  m_gradientId = Id;
494  }
495 
497  {
498  return m_gradientId;
499  }
500 
501  void setGradientResolved(bool resolved)
502  {
503  m_gradientResolved = resolved;
504  }
505 
506  bool isGradientResolved() const
507  {
508  return m_gradientResolved;
509  }
510 
511  QPen stroke() const
512  {
513  return m_stroke;
514  }
515 
516 private:
517  // stroke v v 'inherit' | <Paint.datatype>
518  // stroke-dasharray v v 'inherit' | <StrokeDashArrayValue.datatype>
519  // stroke-dashoffset v v 'inherit' | <StrokeDashOffsetValue.datatype>
520  // stroke-linecap v v 'butt' | 'round' | 'square' | 'inherit'
521  // stroke-linejoin v v 'miter' | 'round' | 'bevel' | 'inherit'
522  // stroke-miterlimit v v 'inherit' | <StrokeMiterLimitValue.datatype>
523  // stroke-opacity v v 'inherit' | <OpacityValue.datatype>
524  // stroke-width v v 'inherit' | <StrokeWidthValue.datatype>
531 
537 
547 };
548 
550 {
551 public:
552  QSvgSolidColorStyle(const QColor &color);
553  virtual Type type() const;
554 
555  const QColor & qcolor() const
556  {
557  return m_solidColor;
558  }
559 
561  {
562  return m_solidColor;
563  }
564 
565 private:
566  // solid-color v x 'inherit' | <SVGColor.datatype>
567  // solid-opacity v x 'inherit' | <OpacityValue.datatype>
569 
572 };
573 
575 {
576 public:
578  ~QSvgGradientStyle() { delete m_gradient; }
579  virtual Type type() const;
580 
581  void setStopLink(const QString &link, QSvgTinyDocument *doc);
582  QString stopLink() const { return m_link; }
583  void resolveStops();
584 
585  void setMatrix(const QMatrix &matrix);
586  QMatrix qmatrix() const
587  {
588  return m_matrix;
589  }
590 
592  {
593  return m_gradient;
594  }
595 
596  bool gradientStopsSet() const
597  {
598  return m_gradientStopsSet;
599  }
600 
601  void setGradientStopsSet(bool set)
602  {
603  m_gradientStopsSet = set;
604  }
605 
606  QBrush brush(QPainter *, QSvgExtraStates &);
607 private:
610 
614 };
615 
617 {
618 public:
619  QSvgTransformStyle(const QTransform &transform);
620  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
621  virtual void revert(QPainter *p, QSvgExtraStates &states);
622  virtual Type type() const;
623 
624  const QTransform & qtransform() const
625  {
626  return m_transform;
627  }
628 private:
629  //7.6 The transform attribute
632 };
633 
634 
636 {
637 public:
639  {
645  SkewY
646  };
647  enum Additive
648  {
650  Replace
651  };
652 public:
653  QSvgAnimateTransform(int startMs, int endMs, int by = 0);
654  void setArgs(TransformType type, Additive additive, const QVector<qreal> &args);
655  void setFreeze(bool freeze);
656  void setRepeatCount(qreal repeatCount);
657  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
658  virtual void revert(QPainter *p, QSvgExtraStates &states);
659  virtual Type type() const;
661  {
662  return m_additive;
663  }
664 
665  bool animActive(qreal totalTimeElapsed)
666  {
667  if (totalTimeElapsed < m_from)
668  return false;
669  if (m_freeze || m_repeatCount < 0) // fill="freeze" or repeat="indefinite"
670  return true;
671  if (m_totalRunningTime == 0)
672  return false;
673  qreal animationFrame = (totalTimeElapsed - m_from) / m_totalRunningTime;
674  if (animationFrame > m_repeatCount)
675  return false;
676  return true;
677  }
678 
679  bool transformApplied() const
680  {
681  return m_transformApplied;
682  }
683 
684  // Call this instead of revert if you know that revert is unnecessary.
686  {
687  m_transformApplied = false;
688  }
689 
690 protected:
691  void resolveMatrix(const QSvgNode *node);
692 private:
693  qreal m_from, m_to, m_by;
698  int m_count;
702  bool m_freeze;
705 };
706 
707 
709 {
710 public:
711  QSvgAnimateColor(int startMs, int endMs, int by = 0);
712  void setArgs(bool fill, const QList<QColor> &colors);
713  void setFreeze(bool freeze);
714  void setRepeatCount(qreal repeatCount);
715  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
716  virtual void revert(QPainter *p, QSvgExtraStates &states);
717  virtual Type type() const;
718 private:
719  qreal m_from, m_to, m_by;
724  bool m_fill;
726  bool m_freeze;
728 };
729 
730 
732 {
733 public:
735  virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
736  virtual void revert(QPainter *p, QSvgExtraStates &states);
737  virtual Type type() const;
738 
740  {
741  return m_mode;
742  }
743 private:
744  //comp-op attribute
746 
748 };
749 
750 
752 {
753 public:
755  : quality(0),
756  fill(0),
757  viewportFill(0),
758  font(0),
759  stroke(0),
760  solidColor(0),
761  gradient(0),
762  transform(0),
763  animateColor(0),
764  opacity(0),
765  compop(0)
766  {}
767  ~QSvgStyle();
768 
769  void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states);
770  void revert(QPainter *p, QSvgExtraStates &states);
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 // QT_NO_SVG
826 #endif // QSVGSTYLE_P_H
The QPainter class performs low-level painting on widgets and other paint devices.
Definition: qpainter.h:86
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
qreal m_oldFillOpacity
Definition: qsvgstyle_p.h:295
bool isGradientResolved() const
Definition: qsvgstyle_p.h:506
int type
Definition: qmetatype.cpp:239
void setTextAnchor(Qt::Alignment anchor)
Definition: qsvgstyle_p.h:345
double qreal
Definition: qglobal.h:1193
void setLineJoin(Qt::PenJoinStyle join)
Definition: qsvgstyle_p.h:450
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
qreal m_fillOpacity
Definition: qsvgstyle_p.h:294
QBrush m_oldFill
Definition: qsvgstyle_p.h:289
void setWeight(int weight)
Definition: qsvgstyle_p.h:370
QSvgRefCounter< QSvgGradientStyle > gradient
Definition: qsvgstyle_p.h:777
CompositionMode
Defines the modes supported for digital image compositing.
Definition: qpainter.h:138
void setOpacity(qreal opacity)
Definition: qsvgstyle_p.h:462
The QMatrix class specifies 2D transformations of a coordinate system.
Definition: qmatrix.h:61
uint m_gradientResolved
Definition: qsvgstyle_p.h:534
uint m_fillOpacitySet
Definition: qsvgstyle_p.h:301
void setGradientId(const QString &Id)
Definition: qsvgstyle_p.h:265
QSvgRefCounter< QSvgViewportFillStyle > viewportFill
Definition: qsvgstyle_p.h:773
qreal m_strokeDashOffset
Definition: qsvgstyle_p.h:529
QSvgFillStyleProperty * style() const
Definition: qsvgstyle_p.h:486
FillRule
Definition: qnamespace.h:1485
QString gradientId() const
Definition: qsvgstyle_p.h:270
uint m_strokeDashArraySet
Definition: qsvgstyle_p.h:539
qreal strokeDashOffset
Definition: qsvgstyle_p.h:151
bool animActive(qreal totalTimeElapsed)
Definition: qsvgstyle_p.h:665
QGradient * qgradient() const
Definition: qsvgstyle_p.h:591
QString stopLink() const
Definition: qsvgstyle_p.h:582
QString m_gradientId
Definition: qsvgstyle_p.h:297
void setStyle(QFont::Style fontStyle)
Definition: qsvgstyle_p.h:357
QSvgRefCounter & operator=(T *_t)
Definition: qsvgstyle_p.h:90
QTransform m_oldWorldTransform
Definition: qsvgstyle_p.h:700
QSvgFont * svgFont() const
Definition: qsvgstyle_p.h:376
const QPainter::CompositionMode & compOp() const
Definition: qsvgstyle_p.h:739
QSvgTinyDocument * m_doc
Definition: qsvgstyle_p.h:390
QSvgAnimateTransform::Additive additiveType() const
Definition: qsvgstyle_p.h:660
void setVectorEffect(bool nonScalingStroke)
Definition: qsvgstyle_p.h:480
The QString class provides a Unicode character string.
Definition: qstring.h:83
QList< QSvgRefCounter< QSvgAnimateTransform > > animateTransforms
Definition: qsvgstyle_p.h:780
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
Capitalization
Rendering option for text this font applies to.
Definition: qfont.h:129
Qt::Alignment m_textAnchor
Definition: qsvgstyle_p.h:394
The QPen class defines how a QPainter should draw lines and outlines of shapes.
Definition: qpen.h:64
QMatrix qmatrix() const
Definition: qsvgstyle_p.h:586
QSvgFillStyleProperty * style() const
Definition: qsvgstyle_p.h:260
PenCapStyle
Definition: qnamespace.h:1147
qreal m_oldStrokeDashOffset
Definition: qsvgstyle_p.h:530
Qt::FillRule m_fillRule
Definition: qsvgstyle_p.h:292
uint m_strokeOpacitySet
Definition: qsvgstyle_p.h:544
Qt::Alignment m_oldTextAnchor
Definition: qsvgstyle_p.h:398
QSvgRefCounter< QSvgOpacityStyle > opacity
Definition: qsvgstyle_p.h:781
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
QSvgRefCounter< QSvgCompOpStyle > compop
Definition: qsvgstyle_p.h:782
uint m_strokeDashOffsetSet
Definition: qsvgstyle_p.h:540
void setWidth(qreal width)
Definition: qsvgstyle_p.h:468
QSvgFont * m_oldSvgFont
Definition: qsvgstyle_p.h:396
const QColor & qcolor() const
Definition: qsvgstyle_p.h:555
QFont m_oldQFont
Definition: qsvgstyle_p.h:397
const QTransform & qtransform() const
Definition: qsvgstyle_p.h:624
QSvgRefCounter< QSvgTransformStyle > transform
Definition: qsvgstyle_p.h:778
void setGradientResolved(bool resolved)
Definition: qsvgstyle_p.h:501
TransformType m_type
Definition: qsvgstyle_p.h:695
QSvgRefCounter(const QSvgRefCounter &other)
Definition: qsvgstyle_p.h:84
void setGradientStopsSet(bool set)
Definition: qsvgstyle_p.h:601
QSvgFillStyleProperty * m_style
Definition: qsvgstyle_p.h:290
unsigned int uint
Definition: qglobal.h:996
QSvgFont * svgFont
Definition: qsvgstyle_p.h:147
QSvgRefCounter< QSvgQualityStyle > quality
Definition: qsvgstyle_p.h:771
virtual ~QSvgRefCounted()
Definition: qsvgstyle_p.h:125
PenJoinStyle
Definition: qnamespace.h:1154
QList< QColor > m_colors
Definition: qsvgstyle_p.h:721
QSvgFillStyleProperty * m_style
Definition: qsvgstyle_p.h:532
QSvgRefCounter< QSvgFillStyle > fill
Definition: qsvgstyle_p.h:772
Qt::FillRule fillRule
Definition: qsvgstyle_p.h:150
const QFont & qfont() const
Definition: qsvgstyle_p.h:381
void setMiterLimit(qreal limit)
Definition: qsvgstyle_p.h:456
QGradient * m_gradient
Definition: qsvgstyle_p.h:608
Style
This enum describes the different styles of glyphs that are used to display text. ...
Definition: qfont.h:111
void setVariant(QFont::Capitalization fontVariant)
Definition: qsvgstyle_p.h:362
QSvgRefCounter< QSvgAnimateColor > animateColor
Definition: qsvgstyle_p.h:779
uint m_vectorEffectSet
Definition: qsvgstyle_p.h:546
void setDashOffset(qreal offset)
Definition: qsvgstyle_p.h:438
QString gradientId() const
Definition: qsvgstyle_p.h:496
QString m_gradientId
Definition: qsvgstyle_p.h:533
void setDashArrayNone()
Definition: qsvgstyle_p.h:432
The QBrush class defines the fill pattern of shapes drawn by QPainter.
Definition: qbrush.h:76
QSvgFont * m_svgFont
Definition: qsvgstyle_p.h:389
uint m_strokeLineCapSet
Definition: qsvgstyle_p.h:541
void setFamily(const QString &family)
Definition: qsvgstyle_p.h:351
QSvgTinyDocument * doc() const
Definition: qsvgstyle_p.h:386
const QBrush & qbrush() const
Definition: qsvgstyle_p.h:313
QSvgRefCounter< QSvgStrokeStyle > stroke
Definition: qsvgstyle_p.h:775
qreal m_oldStrokeOpacity
Definition: qsvgstyle_p.h:528
QSvgRefCounter< QSvgFontStyle > font
Definition: qsvgstyle_p.h:774
The QFont class specifies a font used for drawing text.
Definition: qfont.h:64
The QGradient class is used in combination with QBrush to specify gradient fills. ...
Definition: qbrush.h:201
QSvgRefCounter(T *_t)
Definition: qsvgstyle_p.h:78
void setSize(qreal size)
Definition: qsvgstyle_p.h:337
QVector< qreal > m_args
Definition: qsvgstyle_p.h:697
QTransform m_transform
Definition: qsvgstyle_p.h:630
QTransform m_oldWorldTransform
Definition: qsvgstyle_p.h:631
QBrush brush(QPainter *, QSvgExtraStates &)
Definition: qsvgstyle_p.h:560
QSvgRefCounter< QSvgSolidColorStyle > solidColor
Definition: qsvgstyle_p.h:776
void setLineCap(Qt::PenCapStyle cap)
Definition: qsvgstyle_p.h:444
qreal m_strokeOpacity
Definition: qsvgstyle_p.h:527
void setStyle(QSvgFillStyleProperty *style)
Definition: qsvgstyle_p.h:424
Qt::Alignment textAnchor
Definition: qsvgstyle_p.h:148
const QBrush & qbrush() const
Definition: qsvgstyle_p.h:245
void setStroke(QBrush brush)
Definition: qsvgstyle_p.h:417
uint m_gradientResolved
Definition: qsvgstyle_p.h:298
QPen stroke() const
Definition: qsvgstyle_p.h:511
bool gradientStopsSet() const
Definition: qsvgstyle_p.h:596
uint m_fillRuleSet
Definition: qsvgstyle_p.h:300
uint m_strokeMiterLimitSet
Definition: qsvgstyle_p.h:543
QTransform m_transform
Definition: qsvgstyle_p.h:699
bool isGradientResolved() const
Definition: qsvgstyle_p.h:280
Qt::FillRule fillRule() const
Definition: qsvgstyle_p.h:255
qreal fillOpacity() const
Definition: qsvgstyle_p.h:250
void setGradientId(const QString &Id)
Definition: qsvgstyle_p.h:491
bool transformApplied() const
Definition: qsvgstyle_p.h:679
void clearTransformApplied()
Definition: qsvgstyle_p.h:685
QSvgTinyDocument * m_doc
Definition: qsvgstyle_p.h:611
Qt::FillRule m_oldFillRule
Definition: qsvgstyle_p.h:293
QPainter::CompositionMode m_oldMode
Definition: qsvgstyle_p.h:747
T * operator->() const
Definition: qsvgstyle_p.h:114
void setGradientResolved(bool resolved)
Definition: qsvgstyle_p.h:275
uint m_textAnchorSet
Definition: qsvgstyle_p.h:406
QPainter::CompositionMode m_mode
Definition: qsvgstyle_p.h:745
uint m_strokeLineJoinSet
Definition: qsvgstyle_p.h:542
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65
uint m_oldVectorEffect
Definition: qsvgstyle_p.h:536
qreal m_totalRunningTime
Definition: qsvgstyle_p.h:720