diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-06-21 16:50:34 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-06-21 16:50:34 +0200 |
commit | b590d0e6941257bf6205959dbe7a80f4d4f50080 (patch) | |
tree | ee396734862f31d28fe78204fb05ab8c4f96ca8c /src/lib/VSD6Parser.cpp | |
parent | a0d54d1210491cceadded9baaece076f0885850d (diff) |
Fix Ellipse shape + implement page scaling
Diffstat (limited to 'src/lib/VSD6Parser.cpp')
-rw-r--r-- | src/lib/VSD6Parser.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/VSD6Parser.cpp b/src/lib/VSD6Parser.cpp index 911f8d9..a2905fc 100644 --- a/src/lib/VSD6Parser.cpp +++ b/src/lib/VSD6Parser.cpp @@ -285,12 +285,12 @@ void libvisio::VSD6Parser::handlePage(VSDInternalStream &stream, libwpg::WPGPain binaryData.append(buffer, tmpBytesRead); WPXPropertyList foreignProps; - foreignProps.insert("svg:width", xform.width); - foreignProps.insert("svg:height", xform.height); - foreignProps.insert("svg:x", xform.pinX - xform.pinLocX); + foreignProps.insert("svg:width", m_scale*xform.width); + foreignProps.insert("svg:height", m_scale*xform.height); + foreignProps.insert("svg:x", m_scale*(xform.pinX - xform.pinLocX)); // Y axis starts at the bottom not top - foreignProps.insert("svg:y", pageProps["svg:height"]->getDouble() - - xform.pinY + xform.pinLocY - xform.height); + foreignProps.insert("svg:y", m_scale*(pageProps["svg:height"]->getDouble() + - xform.pinY + xform.pinLocY - xform.height)); if (foreignType == 1) { @@ -321,12 +321,12 @@ void libvisio::VSD6Parser::handlePage(VSDInternalStream &stream, libwpg::WPGPain { // Skip bytes representing unit to *display* (value is always inches) stream.seek(1, WPX_SEEK_CUR); - double width = readDouble(&stream); + m_pageWidth = readDouble(&stream); stream.seek(1, WPX_SEEK_CUR); - double height = readDouble(&stream); + m_pageHeight = readDouble(&stream); - pageProps.insert("svg:width", width); - pageProps.insert("svg:height", height); + pageProps.insert("svg:width", m_scale*m_pageWidth); + pageProps.insert("svg:height", m_scale*m_pageHeight); if (m_isPageStarted) painter->endGraphics(); painter->startGraphics(pageProps); |