diff options
author | Armin Le Grand <alg@apache.org> | 2014-04-02 11:21:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-02 15:19:38 +0100 |
commit | 4520973ccf0ab042b09b4233d54a1779625b0093 (patch) | |
tree | dff4c899dd6e3d6bda3f62cdcc8e40d451a8b2a9 /vcl/source/gdi | |
parent | 0635918c5153116a22eebec12d1b5de9d6e83e01 (diff) |
Resolves: #i124580# corrected some conversions of scale values...
to integer positions
(cherry picked from commit d3c4a0c2a87504007a30e6944f52da4654cfa784)
Change-Id: Iae4c16250e95938999d60d1c60e1163dfba243cf
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/outdev2.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 6506095b8873..74236bb18034 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -786,8 +786,11 @@ void OutputDevice::DrawTransformedBitmapEx( { // with no rotation, shear or mirroring it can be mapped to DrawBitmapEx // do *not* execute the mirroring here, it's done in the fallback + // #i124580# the correct DestSize needs to be calculated based on MaxXY values const Point aDestPt(basegfx::fround(aTranslate.getX()), basegfx::fround(aTranslate.getY())); - const Size aDestSize(basegfx::fround(aScale.getX()), basegfx::fround(aScale.getY())); + const Size aDestSize( + basegfx::fround(aScale.getX() + aTranslate.getX()) - aDestPt.X(), + basegfx::fround(aScale.getY() + aTranslate.getY()) - aDestPt.Y()); DrawBitmapEx(aDestPt, aDestSize, rBitmapEx); return; @@ -814,8 +817,11 @@ void OutputDevice::DrawTransformedBitmapEx( { // with no rotation or shear it can be mapped to DrawBitmapEx // do *not* execute the mirroring here, it's done in the fallback + // #i124580# the correct DestSize needs to be calculated based on MaxXY values const Point aDestPt(basegfx::fround(aTranslate.getX()), basegfx::fround(aTranslate.getY())); - const Size aDestSize(basegfx::fround(aScale.getX()), basegfx::fround(aScale.getY())); + const Size aDestSize( + basegfx::fround(aScale.getX() + aTranslate.getX()) - aDestPt.X(), + basegfx::fround(aScale.getY() + aTranslate.getY()) - aDestPt.Y()); DrawBitmapEx(aDestPt, aDestSize, rBitmapEx); return; @@ -879,8 +885,11 @@ void OutputDevice::DrawTransformedBitmapEx( aTargetRange.getMinimum())); // extract point and size; do not remove size, the bitmap may have been prepared reduced by purpose + // #i124580# the correct DestSize needs to be calculated based on MaxXY values const Point aDestPt(basegfx::fround(aVisibleRange.getMinX()), basegfx::fround(aVisibleRange.getMinY())); - const Size aDestSize(basegfx::fround(aVisibleRange.getWidth()), basegfx::fround(aVisibleRange.getHeight())); + const Size aDestSize( + basegfx::fround(aVisibleRange.getMaxX()) - aDestPt.X(), + basegfx::fround(aVisibleRange.getMaxY()) - aDestPt.Y()); DrawBitmapEx(aDestPt, aDestSize, aTransformed); } |