src/svg/qsvgtinydocument.cpp
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
   275     if (node->displayMode() == QSvgNode::NoneMode)
   275     if (node->displayMode() == QSvgNode::NoneMode)
   276         return;
   276         return;
   277 
   277 
   278     p->save();
   278     p->save();
   279 
   279 
   280     const QRectF elementBounds = node->transformedBounds(QTransform());
   280     const QRectF elementBounds = node->transformedBounds();
   281 
   281 
   282     mapSourceToTarget(p, bounds, elementBounds);
   282     mapSourceToTarget(p, bounds, elementBounds);
   283     QTransform originalTransform = p->worldTransform();
   283     QTransform originalTransform = p->worldTransform();
   284 
   284 
   285     //XXX set default style on the painter
   285     //XXX set default style on the painter
   297         parent = parent->parent();
   297         parent = parent->parent();
   298     }
   298     }
   299 
   299 
   300     for (int i = parentApplyStack.size() - 1; i >= 0; --i)
   300     for (int i = parentApplyStack.size() - 1; i >= 0; --i)
   301         parentApplyStack[i]->applyStyle(p, m_states);
   301         parentApplyStack[i]->applyStyle(p, m_states);
   302     
   302 
   303     // Reset the world transform so that our parents don't affect
   303     // Reset the world transform so that our parents don't affect
   304     // the position
   304     // the position
   305     QTransform currentTransform = p->worldTransform();
   305     QTransform currentTransform = p->worldTransform();
   306     p->setWorldTransform(originalTransform);
   306     p->setWorldTransform(originalTransform);
   307 
   307 
   430 QRectF QSvgTinyDocument::boundsOnElement(const QString &id) const
   430 QRectF QSvgTinyDocument::boundsOnElement(const QString &id) const
   431 {
   431 {
   432     const QSvgNode *node = scopeNode(id);
   432     const QSvgNode *node = scopeNode(id);
   433     if (!node)
   433     if (!node)
   434         node = this;
   434         node = this;
   435 
   435     return node->transformedBounds();
   436     return node->transformedBounds(QTransform());
       
   437 }
   436 }
   438 
   437 
   439 bool QSvgTinyDocument::elementExists(const QString &id) const
   438 bool QSvgTinyDocument::elementExists(const QString &id) const
   440 {
   439 {
   441     QSvgNode *node = scopeNode(id);
   440     QSvgNode *node = scopeNode(id);