diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/bitmap/BitmapTools.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx index ee0134a90010..2330483bb98b 100644 --- a/vcl/source/bitmap/BitmapTools.cxx +++ b/vcl/source/bitmap/BitmapTools.cxx @@ -376,6 +376,12 @@ BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap, ::basegfx::B2DRectangle const & rDestRect, ::basegfx::B2DHomMatrix const & rLocalTransform ) { + const Size aDestBmpSize( ::basegfx::fround( rDestRect.getWidth() ), + ::basegfx::fround( rDestRect.getHeight() ) ); + + if( aDestBmpSize.IsEmpty() ) + return BitmapEx(); + const Size aBmpSize( rBitmap.GetSizePixel() ); Bitmap aSrcBitmap( rBitmap.GetBitmap() ); Bitmap aSrcAlpha; @@ -416,12 +422,6 @@ BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap, } // else: mapping table is not used - const Size aDestBmpSize( ::basegfx::fround( rDestRect.getWidth() ), - ::basegfx::fround( rDestRect.getHeight() ) ); - - if( aDestBmpSize.IsEmpty() ) - return BitmapEx(); - Bitmap aDstBitmap(aDestBmpSize, aSrcBitmap.getPixelFormat(), &pReadAccess->GetPalette()); Bitmap aDstAlpha( AlphaMask( aDestBmpSize ).GetBitmap() ); |