diff options
-rw-r--r-- | vcl/source/outdev/wallpaper.cxx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx index a260af4d9596..2cd655c0e80a 100644 --- a/vcl/source/outdev/wallpaper.cxx +++ b/vcl/source/outdev/wallpaper.cxx @@ -131,17 +131,12 @@ void OutputDevice::DrawBitmapWallpaper( tools::Long nX, tools::Long nY, { assert(!is_double_buffered_window()); - BitmapEx aBmpEx; const BitmapEx* pCached = rWallpaper.ImplGetCachedBitmap(); - Point aPos; - Size aSize; + GDIMetaFile* pOldMetaFile = mpMetaFile; - const WallpaperStyle eStyle = rWallpaper.GetStyle(); const bool bOldMap = mbMap; - bool bDrawn = false; - bool bDrawGradientBackground = false; - bool bDrawColorBackground = false; + BitmapEx aBmpEx; if( pCached ) aBmpEx = *pCached; else @@ -151,6 +146,11 @@ void OutputDevice::DrawBitmapWallpaper( tools::Long nX, tools::Long nY, const tools::Long nBmpHeight = aBmpEx.GetSizePixel().Height(); const bool bTransparent = aBmpEx.IsAlpha(); + const WallpaperStyle eStyle = rWallpaper.GetStyle(); + + bool bDrawGradientBackground = false; + bool bDrawColorBackground = false; + // draw background if( bTransparent ) { @@ -180,13 +180,18 @@ void OutputDevice::DrawBitmapWallpaper( tools::Long nX, tools::Long nY, // background of bitmap? if( bDrawGradientBackground ) + { DrawGradientWallpaper( nX, nY, nWidth, nHeight, rWallpaper ); + } else if( bDrawColorBackground && bTransparent ) { DrawColorWallpaper( nX, nY, nWidth, nHeight, rWallpaper ); bDrawColorBackground = false; } + Point aPos; + Size aSize; + // calc pos and size if( rWallpaper.IsRect() ) { @@ -205,6 +210,8 @@ void OutputDevice::DrawBitmapWallpaper( tools::Long nX, tools::Long nY, Push( vcl::PushFlags::CLIPREGION ); IntersectClipRegion( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); + bool bDrawn = false; + switch( eStyle ) { case WallpaperStyle::Scale: |