diff options
author | Suneel BS <suneel.b-s@nokia.com> | 2009-05-08 09:17:36 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-06-22 13:26:13 (GMT) |
commit | 2dcb97ff789dd7a9b7534348ca49c96c09783055 (patch) | |
tree | c74ba42af8bd8d7a66d395978bf5e464f43b7a35 /src/svg/qsvggraphics.cpp | |
parent | 51aba60ca75f6f094951d3ffaea803072db75d29 (diff) | |
download | Qt-2dcb97ff789dd7a9b7534348ca49c96c09783055.zip Qt-2dcb97ff789dd7a9b7534348ca49c96c09783055.tar.gz Qt-2dcb97ff789dd7a9b7534348ca49c96c09783055.tar.bz2 |
Fixed fill-rule for polygon SVG element.
Polygon element should apply the fill rule which is specified in its
fill-rule attribute. Default fill rule is 'WindingFill' (nonzero).
Modified and autotest added by Kim.
Reviewed-by: Kim
Diffstat (limited to 'src/svg/qsvggraphics.cpp')
-rw-r--r-- | src/svg/qsvggraphics.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/svg/qsvggraphics.cpp b/src/svg/qsvggraphics.cpp index 6782429..e09f382 100644 --- a/src/svg/qsvggraphics.cpp +++ b/src/svg/qsvggraphics.cpp @@ -198,9 +198,8 @@ QRectF QSvgPath::bounds() const } QSvgPolygon::QSvgPolygon(QSvgNode *parent, const QPolygonF &poly) - : QSvgNode(parent), m_poly(poly) + : QSvgNode(parent), m_poly(poly), m_fillRule(Qt::WindingFill) { - } QRectF QSvgPolygon::bounds() const @@ -217,7 +216,7 @@ QRectF QSvgPolygon::bounds() const void QSvgPolygon::draw(QPainter *p, QSvgExtraStates &states) { - QT_SVG_DRAW_SHAPE(p->drawPolygon(m_poly)); + QT_SVG_DRAW_SHAPE(p->drawPolygon(m_poly, m_fillRule)); } |