summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Mathog <mathog@caltech.edu>2013-10-25 19:36:57 +0000
committer~suv <suv-sf@users.sourceforge.net>2013-10-25 19:36:57 +0000
commit4d1c93817e978cd43c61428e6b527de24163a776 (patch)
tree42c4b559331b55e39ed808e1ca201d9290aff80b /src
parentWMF import: fix scaling of files without ViewPort record (diff)
downloadinkscape-4d1c93817e978cd43c61428e6b527de24163a776.tar.gz
inkscape-4d1c93817e978cd43c61428e6b527de24163a776.zip
Fix for Bug 1241783 (WMF image output size)
Fixed bugs: - https://launchpad.net/bugs/1241783 (bzr r12726)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/wmf-print.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/extension/internal/wmf-print.cpp b/src/extension/internal/wmf-print.cpp
index cf0302b38..3bb17146c 100644
--- a/src/extension/internal/wmf-print.cpp
+++ b/src/extension/internal/wmf-print.cpp
@@ -1120,6 +1120,9 @@ unsigned int PrintWmf::image(
Geom::Point pLL(x1, y1);
Geom::Point pLL2 = pLL * tf; //location of LL corner in Inkscape coordinates
+ Geom::Point pWH(dw, dh);
+ Geom::Point pWH2 = pWH * tf.withoutTranslation(); //adjust scale
+
char *px;
uint32_t cbPx;
uint32_t colortype;
@@ -1133,7 +1136,7 @@ unsigned int PrintWmf::image(
Bmi = bitmapinfo_set(Bmih, ct);
U_POINT16 Dest = point16_set(round(pLL2[Geom::X] * PX2WORLD), round(pLL2[Geom::Y] * PX2WORLD));
- U_POINT16 cDest = point16_set(round(dw * PX2WORLD), round(dh * PX2WORLD));
+ U_POINT16 cDest = point16_set(round(pWH2[Geom::X] * PX2WORLD), round(pWH2[Geom::Y] * PX2WORLD));
U_POINT16 Src = point16_set(0, 0);
U_POINT16 cSrc = point16_set(w, h);
rec = U_WMRSTRETCHDIB_set(