diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2006-11-14 14:22:58 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2006-11-14 14:22:58 +0000 |
commit | ed61578b3f9109bbf01af12b43a03cabefc47acd (patch) | |
tree | df370d32306b7e4b70eb3df2c44f4b2cbc16561c /vcl/source/gdi/outdev2.cxx | |
parent | e85f21f2cec4d00601d300adfeee70f3b70e63a2 (diff) |
INTEGRATION: CWS aw024 (1.30.32); FILE MERGED
2006/11/10 15:52:19 aw 1.30.32.3: RESYNC: (1.31-1.32); FILE MERGED
2006/09/22 03:12:37 aw 1.30.32.2: RESYNC: (1.30-1.31); FILE MERGED
2006/07/20 15:50:40 thb 1.30.32.1: #i66849# Join from CWS xralpha; OutDev::DrawTransparent() now uses drawAlphaRect(), if polygon is rectangular; fixed order of fast bail-out & outdev state modification in DrawTransparent; added DrawAlphaBitmap() mirror wrapper for xralpha join
Diffstat (limited to 'vcl/source/gdi/outdev2.cxx')
-rw-r--r-- | vcl/source/gdi/outdev2.cxx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 60883275aa45..23d0087cf31b 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -4,9 +4,9 @@ * * $RCSfile: outdev2.cxx,v $ * - * $Revision: 1.32 $ + * $Revision: 1.33 $ * - * last change: $Author: kz $ $Date: 2006-11-06 14:49:09 $ + * last change: $Author: ihi $ $Date: 2006-11-14 15:22:58 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1960,11 +1960,26 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha, if( !aDstRect.Intersection( Rectangle( aOutPt, aOutSz ) ).IsEmpty() ) { + bool bNativeAlpha = false; + static const char* pDisableNative = getenv( "SAL_DISABLE_NATIVE_ALPHA"); + if( !pDisableNative && !bHMirr && !bVMirr ) { + Point aRelPt = aOutPt + Point( mnOutOffX, mnOutOffY ); + SalTwoRect aTR = { + rSrcPtPixel.X(), rSrcPtPixel.Y(), + rSrcSizePixel.Width(), rSrcSizePixel.Height(), + aRelPt.X(), aRelPt.Y(), + aOutSz.Width(), aOutSz.Height() + }; + SalBitmap* pSalSrcBmp = rBmp.ImplGetImpBitmap()->ImplGetSalBitmap(); + SalBitmap* pSalAlphaBmp = rAlpha.ImplGetImpBitmap()->ImplGetSalBitmap(); + bNativeAlpha = mpGraphics->DrawAlphaBitmap( aTR, *pSalSrcBmp, *pSalAlphaBmp, this ); + } + VirtualDevice* pOldVDev = mpAlphaVDev; Rectangle aBmpRect( aNullPt, rBmp.GetSizePixel() ); - - if( !aBmpRect.Intersection( Rectangle( rSrcPtPixel, rSrcSizePixel ) ).IsEmpty() ) + if( !bNativeAlpha + && !aBmpRect.Intersection( Rectangle( rSrcPtPixel, rSrcSizePixel ) ).IsEmpty() ) { GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = NULL; const BOOL bOldMap = mbMap; mbMap = FALSE; |