diff options
author | Thorsten Behrens <thb@openoffice.org> | 2002-09-17 12:45:03 +0000 |
---|---|---|
committer | Thorsten Behrens <thb@openoffice.org> | 2002-09-17 12:45:03 +0000 |
commit | 5960f0ae40ed8cb9c5ee94474cea326e9b4de832 (patch) | |
tree | 2fd628094c8639e1265f70f6bda9991a1e351e3c | |
parent | 68ce5d35834826453e89609cc07c91f453223b2a (diff) |
#103209# Handling negative sizes
-rw-r--r-- | vcl/source/gdi/print2.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 1c040e7d6bbb..ac5c8c6968e9 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: print2.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: hdu $ $Date: 2002-02-26 15:57:28 $ + * last change: $Author: thb $ $Date: 2002-09-17 13:45:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -722,7 +722,11 @@ Bitmap Printer::GetPreparedBitmap( const Point& rDstPt, const Size& rDstSz, if( !aBmp.IsEmpty() ) { // do downsampling if neccessary - const Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) ); + Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) ); + + // #103209# Normalize size (mirroring has to happen outside of this method) + aDstSizeTwip = Size( labs(aDstSizeTwip.Width()), labs(aDstSizeTwip.Height()) ); + const Size aBmpSize( aBmp.GetSizePixel() ); const double fBmpPixelX = aBmpSize.Width(); const double fBmpPixelY = aBmpSize.Height(); @@ -787,7 +791,11 @@ BitmapEx Printer::GetPreparedBitmapEx( const Point& rDstPt, const Size& rDstSz, if( !aBmpEx.IsEmpty() ) { // do downsampling if neccessary - const Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) ); + Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) ); + + // #103209# Normalize size (mirroring has to happen outside of this method) + aDstSizeTwip = Size( labs(aDstSizeTwip.Width()), labs(aDstSizeTwip.Height()) ); + const Size aBmpSize( aBmpEx.GetSizePixel() ); const double fBmpPixelX = aBmpSize.Width(); const double fBmpPixelY = aBmpSize.Height(); |