diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-03-08 15:15:44 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-03-08 16:15:53 (GMT) |
commit | ea9f2aeba6f18d19d6a82b3a829373ec032af14f (patch) | |
tree | a90af7f1061a3d7623c2969bdf1f628d99045e0a /src/svg/qsvgtinydocument.cpp | |
parent | 7b500ed543bb86429ef6fdb82b103784d6cc6a0c (diff) | |
download | Qt-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/qsvgtinydocument.cpp')
-rw-r--r-- | src/svg/qsvgtinydocument.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp index 17618f7..b21b99f 100644 --- a/src/svg/qsvgtinydocument.cpp +++ b/src/svg/qsvgtinydocument.cpp @@ -277,7 +277,7 @@ void QSvgTinyDocument::draw(QPainter *p, const QString &id, p->save(); - const QRectF elementBounds = node->transformedBounds(QTransform()); + const QRectF elementBounds = node->transformedBounds(); mapSourceToTarget(p, bounds, elementBounds); QTransform originalTransform = p->worldTransform(); @@ -299,7 +299,7 @@ void QSvgTinyDocument::draw(QPainter *p, const QString &id, for (int i = parentApplyStack.size() - 1; i >= 0; --i) parentApplyStack[i]->applyStyle(p, m_states); - + // Reset the world transform so that our parents don't affect // the position QTransform currentTransform = p->worldTransform(); @@ -432,8 +432,7 @@ QRectF QSvgTinyDocument::boundsOnElement(const QString &id) const const QSvgNode *node = scopeNode(id); if (!node) node = this; - - return node->transformedBounds(QTransform()); + return node->transformedBounds(); } bool QSvgTinyDocument::elementExists(const QString &id) const |