diff options
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/vcl/canvashelper.cxx | 6 | ||||
-rw-r--r-- | canvas/source/vcl/spritehelper.cxx | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index d31a45286dc3..5a0a74e389d2 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -46,6 +46,7 @@ #include <vcl/bitmapaccess.hxx> #include <vcl/canvastools.hxx> #include <vcl/window.hxx> +#include <vcl/BitmapMonochromeFilter.hxx> #include <canvas/canvastools.hxx> @@ -720,8 +721,9 @@ namespace vclcanvas if( aBmpEx.IsAlpha() ) { Bitmap aMask( aBmpEx.GetAlpha().GetBitmap() ); - aMask.MakeMonochrome(253); - aBmpEx = BitmapEx( aBmpEx.GetBitmap(), aMask ); + BitmapEx aMaskEx(aMask); + BitmapFilter::Filter(aMaskEx, BitmapMonochromeFilter(253)); + aMask = aMaskEx.GetBitmap(); } else if( aBmpEx.IsTransparent() ) { diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx index 366d0a5b9829..9424d4ec54b9 100644 --- a/canvas/source/vcl/spritehelper.cxx +++ b/canvas/source/vcl/spritehelper.cxx @@ -36,6 +36,7 @@ #include <vcl/bitmapex.hxx> #include <vcl/canvastools.hxx> #include <vcl/outdev.hxx> +#include <vcl/BitmapMonochromeFilter.hxx> #include <canvas/canvastools.hxx> @@ -153,7 +154,9 @@ namespace vclcanvas { OSL_FAIL("CanvasCustomSprite::redraw(): Mask bitmap is not " "monochrome (performance!)"); - aMask.MakeMonochrome(255); + BitmapEx aMaskEx(aMask); + BitmapFilter::Filter(aMaskEx, BitmapMonochromeFilter(255)); + aMask = aMaskEx.GetBitmap(); } #endif |