From f79c283c535148c793781c23f22fdf8b41dab377 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sat, 19 Apr 2014 18:39:53 +1000 Subject: Unify IOS/OS X code in OutputDevice::DrawTransformedBitmapEx() The way that we apply the alpha mask in DrawTransformedBitmapEx should be handled in the same way, regardless of the platform. As it turns out, the OS X/iOS way is quite correct and, as a bonus, the code is far more clear. There is no need to do things differently, so let's use the OS X approach. Change-Id: Ib0ac72ddc549367462e84639b74e4bb148128cd5 --- vcl/source/outdev/bitmap.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'vcl/source/outdev') diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 973a604705b3..3bbf39234252 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -519,13 +519,10 @@ void OutputDevice::DrawTransformedBitmapEx( { // parts will be uncovered, extend aTransformed with a mask bitmap const Bitmap aContent(aTransformed.GetBitmap()); -#if defined(MACOSX) || defined(IOS) + AlphaMask aMaskBmp(aContent.GetSizePixel()); aMaskBmp.Erase(0); -#else - Bitmap aMaskBmp(aContent.GetSizePixel(), 1); - aMaskBmp.Erase(Color(COL_BLACK)); // #122758# Initialize to non-transparent -#endif + aTransformed = BitmapEx(aContent, aMaskBmp); } -- cgit