diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-04-13 08:16:43 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-04-13 13:42:37 (GMT) |
commit | da55c1ea92474e989e5582b02815936bbf584405 (patch) | |
tree | 9ba1bfe0c45bced1528128984b75d6407172af77 /src/gui/painting/qbrush.h | |
parent | 5b74a70ac630073582be56f8a0539624a1080185 (diff) | |
download | Qt-da55c1ea92474e989e5582b02815936bbf584405.zip Qt-da55c1ea92474e989e5582b02815936bbf584405.tar.gz Qt-da55c1ea92474e989e5582b02815936bbf584405.tar.bz2 |
Added support for six-parameter radial gradients.
The extended radial gradients conform to the radial gradient
specification in HTML 5 canvas.
Task-number: QTBUG-14075
Reviewed-by: Andreas Kling
Diffstat (limited to 'src/gui/painting/qbrush.h')
-rw-r--r-- | src/gui/painting/qbrush.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h index 8b31319..d914c8c 100644 --- a/src/gui/painting/qbrush.h +++ b/src/gui/painting/qbrush.h @@ -255,6 +255,7 @@ private: friend class QLinearGradient; friend class QRadialGradient; friend class QConicalGradient; + friend class QBrush; Type m_type; Spread m_spread; @@ -264,7 +265,7 @@ private: qreal x1, y1, x2, y2; } linear; struct { - qreal cx, cy, fx, fy, radius; + qreal cx, cy, fx, fy, cradius; } radial; struct { qreal cx, cy, angle; @@ -303,6 +304,9 @@ public: QRadialGradient(const QPointF ¢er, qreal radius); QRadialGradient(qreal cx, qreal cy, qreal radius); + QRadialGradient(const QPointF ¢er, qreal centerRadius, const QPointF &focalPoint, qreal focalRadius); + QRadialGradient(qreal cx, qreal cy, qreal centerRadius, qreal fx, qreal fy, qreal focalRadius); + QPointF center() const; void setCenter(const QPointF ¢er); inline void setCenter(qreal x, qreal y) { setCenter(QPointF(x, y)); } @@ -313,6 +317,12 @@ public: qreal radius() const; void setRadius(qreal radius); + + qreal centerRadius() const; + void setCenterRadius(qreal radius); + + qreal focalRadius() const; + void setFocalRadius(qreal radius); }; |