Kaydet (Commit) f79c283c authored tarafından Chris Sherlock's avatar Chris Sherlock

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
üst 58be5bad
...@@ -519,13 +519,10 @@ void OutputDevice::DrawTransformedBitmapEx( ...@@ -519,13 +519,10 @@ void OutputDevice::DrawTransformedBitmapEx(
{ {
// parts will be uncovered, extend aTransformed with a mask bitmap // parts will be uncovered, extend aTransformed with a mask bitmap
const Bitmap aContent(aTransformed.GetBitmap()); const Bitmap aContent(aTransformed.GetBitmap());
#if defined(MACOSX) || defined(IOS)
AlphaMask aMaskBmp(aContent.GetSizePixel()); AlphaMask aMaskBmp(aContent.GetSizePixel());
aMaskBmp.Erase(0); aMaskBmp.Erase(0);
#else
Bitmap aMaskBmp(aContent.GetSizePixel(), 1);
aMaskBmp.Erase(Color(COL_BLACK)); // #122758# Initialize to non-transparent
#endif
aTransformed = BitmapEx(aContent, aMaskBmp); aTransformed = BitmapEx(aContent, aMaskBmp);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment