diff options
Diffstat (limited to 'vcl/source/gdi/outdev2.cxx')
-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 f13620ad49df..3b442d867625 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -825,8 +825,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 + // #124580# 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 +882,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 + // #124580# 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; @@ -1016,8 +1022,11 @@ void OutputDevice::DrawTransformedBitmapEx( aTargetRange.getMinimum())); // extract point and size; do not remove size, the bitmap may have been prepared reduced by purpose + // #124580# 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); } |