summaryrefslogtreecommitdiffstats
path: root/src/svg/qsvgstyle.cpp
diff options
context:
space:
mode:
authorSuneel BS <suneel.b-s@nokia.com>2009-05-08 14:47:36 +0530
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-06-22 15:26:13 +0200
commit2dcb97ff789dd7a9b7534348ca49c96c09783055 (patch)
treec74ba42af8bd8d7a66d395978bf5e464f43b7a35 /src/svg/qsvgstyle.cpp
parent51aba60ca75f6f094951d3ffaea803072db75d29 (diff)
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/qsvgstyle.cpp')
-rw-r--r--src/svg/qsvgstyle.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp
index fa996f4cd2..9d46649877 100644
--- a/src/svg/qsvgstyle.cpp
+++ b/src/svg/qsvgstyle.cpp
@@ -107,6 +107,9 @@ static void recursivelySetFill(QSvgNode *node, Qt::FillRule f)
if (node->type() == QSvgNode::PATH) {
QSvgPath *path = static_cast<QSvgPath*>(node);
path->qpath()->setFillRule(f);
+ } else if (node->type() == QSvgNode::POLYGON) {
+ QSvgPolygon *polygon = static_cast<QSvgPolygon*>(node);
+ polygon->setFillRule(f);
} else if (node->type() == QSvgNode::G) {
QList<QSvgNode*> renderers = static_cast<QSvgG*>(node)->renderers();
foreach(QSvgNode *n, renderers) {