Added ConvertColourToAlpha

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-11-19 19:57:21 +00:00
parent 18342f1993
commit 6f7ecb3bee

View File

@ -146,6 +146,17 @@ If the image image doesn't have alpha channel, ConvertAlphaToMask does
nothing.", "");
DocDeclStr(
bool , ConvertColourToAlpha( unsigned char r, unsigned char g, unsigned char b ),
"This method converts an image where the original alpha information is
only available as a shades of a colour (actually shades of grey)
typically when you draw anti-aliased text into a bitmap. The DC
drawing routines draw grey values on the black background although
they actually mean to draw white with differnt alpha values. This
method reverses it, assuming a black (!) background and white text.
The method will then fill up the whole image with the colour given.", "");
// Set image's mask to the area of 'mask' that has <mr,mg,mb> colour
bool SetMaskFromImage(const wxImage & mask,