summaryrefslogtreecommitdiffstats
path: root/src/svg/qsvgstructure.cpp
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2010-03-08 15:15:44 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2010-03-08 16:15:53 (GMT)
commitea9f2aeba6f18d19d6a82b3a829373ec032af14f (patch)
treea90af7f1061a3d7623c2969bdf1f628d99045e0a /src/svg/qsvgstructure.cpp
parent7b500ed543bb86429ef6fdb82b103784d6cc6a0c (diff)
downloadQt-ea9f2aeba6f18d19d6a82b3a829373ec032af14f.zip
Qt-ea9f2aeba6f18d19d6a82b3a829373ec032af14f.tar.gz
Qt-ea9f2aeba6f18d19d6a82b3a829373ec032af14f.tar.bz2
Fixed bounds calculation in QtSvg.
This commit fixes an auto-test failure after fixing QTBUG-8733. The calculated element bounds should now be much tighter and respect the width of non-cosmetic pens. Task-number: QTBUG-8733 Reviewed-by: Trond
Diffstat (limited to 'src/svg/qsvgstructure.cpp')
-rw-r--r--src/svg/qsvgstructure.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/svg/qsvgstructure.cpp b/src/svg/qsvgstructure.cpp
index 34426b7..db5cb9e 100644
--- a/src/svg/qsvgstructure.cpp
+++ b/src/svg/qsvgstructure.cpp
@@ -357,15 +357,12 @@ void QSvgSwitch::init()
m_systemLanguagePrefix = m_systemLanguage.mid(0, idx);
}
-QRectF QSvgStructureNode::bounds() const
+QRectF QSvgStructureNode::bounds(QPainter *p, QSvgExtraStates &states) const
{
- if (m_bounds.isEmpty()) {
- foreach(QSvgNode *node, m_renderers) {
- m_bounds |= node->transformedBounds(QTransform());
- }
- }
-
- return m_bounds;
+ QRectF bounds;
+ foreach(QSvgNode *node, m_renderers)
+ bounds |= node->transformedBounds(p, states);
+ return bounds;
}
QSvgNode * QSvgStructureNode::previousSiblingNode(QSvgNode *n) const