Commit a5cfde0b authored by Dmitry Kazakov's avatar Dmitry Kazakov Committed by Ashwin Dhakaita

Try to estimate SVG document size by reading toplevel 'viewBox' tag

It seem to be a general convention in other applications, like
Firefox and QtSVG. The main purpose of such estimation is to
read correct aspect ratio.

parent f5f72e18
......@@ -1357,7 +1357,7 @@ QList<KoShape*> SvgParser::parseSvg(const KoXmlElement &e, QSizeF *fragmentSize)
QTransform viewTransform_unused;
QRectF fakeBoundingRect(0.0, 0.0, 1.0, 1.0);
if (SvgUtil::parseViewBox(e, fakeBoundingRect,
if (SvgUtil::parseViewBox(gc, e, fakeBoundingRect,
&viewRect, &viewTransform_unused)) {
QSizeF estimatedSize = viewRect.size();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment