diff options
author | Kai Ahrens <ka@openoffice.org> | 2001-07-04 11:57:32 +0000 |
---|---|---|
committer | Kai Ahrens <ka@openoffice.org> | 2001-07-04 11:57:32 +0000 |
commit | 910e1e5118ea9384dea3f3c9ce8ff41da9b3825c (patch) | |
tree | daa85cd743014bcd73c557d69e3acc07a4d0db44 /vcl/source/gdi/print2.cxx | |
parent | 55371e7da771ab73161a2bd7c96dc49ed330cc7a (diff) |
#89103#: watch for bitmaps with alpha channel, too
Diffstat (limited to 'vcl/source/gdi/print2.cxx')
-rw-r--r-- | vcl/source/gdi/print2.cxx | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 1c3e89483b9f..0bdff0337f8d 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: print2.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: ka $ $Date: 2001-07-04 11:38:56 $ + * last change: $Author: ka $ $Date: 2001-07-04 12:57:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -425,11 +425,16 @@ void Printer::GetPreparedMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutM // watch for transparent drawing actions for( pAct = ( (GDIMetaFile&) rInMtf ).FirstAction(); pAct && !bTransparent; pAct = ( (GDIMetaFile&) rInMtf ).NextAction() ) { - if( ( META_TRANSPARENT_ACTION == pAct->GetType() ) || - ( META_FLOATTRANSPARENT_ACTION == pAct->GetType() ) ) - { + if( META_TRANSPARENT_ACTION == pAct->GetType() ) bTransparent = TRUE; - } + else if( META_FLOATTRANSPARENT_ACTION == pAct->GetType() ) + bTransparent = TRUE; + else if( META_BMPEX_ACTION == pAct->GetType() ) + bTransparent = ( (MetaBmpExAction*) pAct )->GetBitmapEx().IsAlpha(); + else if( META_BMPEXSCALE_ACTION == pAct->GetType() ) + bTransparent = ( (MetaBmpExScaleAction*) pAct )->GetBitmapEx().IsAlpha(); + else if( META_BMPEXSCALEPART_ACTION == pAct->GetType() ) + bTransparent = ( (MetaBmpExScalePartAction*) pAct )->GetBitmapEx().IsAlpha(); } } @@ -456,9 +461,19 @@ void Printer::GetPreparedMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutM for( i = 0, pO = pRects, pAct = ( (GDIMetaFile&) rInMtf ).FirstAction(); pAct; pAct = ( (GDIMetaFile&) rInMtf ).NextAction(), i++, pO++ ) { - // is it a special action - bTransparent = ( ( META_TRANSPARENT_ACTION == pAct->GetType() ) || - ( META_FLOATTRANSPARENT_ACTION == pAct->GetType() ) ); + // set transparency flag + if( META_TRANSPARENT_ACTION == pAct->GetType() ) + bTransparent = TRUE; + else if( META_FLOATTRANSPARENT_ACTION == pAct->GetType() ) + bTransparent = TRUE; + else if( META_BMPEX_ACTION == pAct->GetType() ) + bTransparent = ( (MetaBmpExAction*) pAct )->GetBitmapEx().IsAlpha(); + else if( META_BMPEXSCALE_ACTION == pAct->GetType() ) + bTransparent = ( (MetaBmpExScaleAction*) pAct )->GetBitmapEx().IsAlpha(); + else if( META_BMPEXSCALEPART_ACTION == pAct->GetType() ) + bTransparent = ( (MetaBmpExScalePartAction*) pAct )->GetBitmapEx().IsAlpha(); + else + bTransparent = FALSE; // execute action to get correct MapMode's etc. pAct->Execute( &aPaintVDev ); |