diff options
author | Rüdiger Timm <rt@openoffice.org> | 2003-04-24 13:56:48 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2003-04-24 13:56:48 +0000 |
commit | ca5f4162ca5e00c3444d41a8626d4999d461cc2b (patch) | |
tree | 126b36927adec71bfc8d825a1ced765d6844aed5 /vcl/source/gdi/outdev2.cxx | |
parent | 0519d692c6fd876742beaf0cd0dfedaa5a6f98d0 (diff) |
INTEGRATION: CWS draw9 (1.11.6); FILE MERGED
2003/04/09 10:52:27 thb 1.11.6.1: #107169# Optimited printing of masked and alpha bitmaps, which are now drawn directly on white backgrounds
Diffstat (limited to 'vcl/source/gdi/outdev2.cxx')
-rw-r--r-- | vcl/source/gdi/outdev2.cxx | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 22129fb7323f..936755fb9ca7 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: outdev2.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: rt $ $Date: 2003-04-24 10:31:38 $ + * last change: $Author: rt $ $Date: 2003-04-24 14:56:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -856,9 +856,21 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize if( OUTDEV_PRINTER == meOutDevType ) { - Bitmap aBmp( aBmpEx.GetBitmap() ), aMask( aBmpEx.GetMask() ); - aBmp.Replace( aMask, Color( COL_WHITE ) ); - ImplPrintTransparent( aBmp, aMask, rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel ); + if( rBitmapEx.IsAlpha() ) + { + // #107169# For true alpha bitmaps, no longer masking the + // bitmap, but perform a full alpha blend against a white + // background here. + Bitmap aBmp( aBmpEx.GetBitmap() ); + aBmp.Blend( aBmpEx.GetAlpha(), Color( COL_WHITE) ); + DrawBitmap( rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel, aBmp ); + } + else + { + Bitmap aBmp( aBmpEx.GetBitmap() ), aMask( aBmpEx.GetMask() ); + aBmp.Replace( aMask, Color( COL_WHITE ) ); + ImplPrintTransparent( aBmp, aMask, rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel ); + } return; } #ifndef REMOTE_APPSERVER |