Author: alg
Date: Wed Apr  2 11:21:46 2014
New Revision: 1583969

URL: http://svn.apache.org/r1583969
Log:
i124580 corrected some conversions of scale values to integer positions

Modified:
    openoffice/trunk/main/vcl/source/gdi/outdev2.cxx

Modified: openoffice/trunk/main/vcl/source/gdi/outdev2.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/gdi/outdev2.cxx?rev=1583969&r1=1583968&r2=1583969&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/source/gdi/outdev2.cxx (original)
+++ openoffice/trunk/main/vcl/source/gdi/outdev2.cxx Wed Apr  2 11:21:46 2014
@@ -825,8 +825,11 @@ void OutputDevice::DrawTransformedBitmap
     {
         // 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::DrawTransformedBitmap
         {
             // 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::DrawTransformedBitmap
                     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);
         }


Reply via email to