]> git.saurik.com Git - wxWidgets.git/commitdiff
Added ConvertColourToAlpha
authorRobin Dunn <robin@alldunn.com>
Fri, 19 Nov 2004 19:57:21 +0000 (19:57 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 19 Nov 2004 19:57:21 +0000 (19:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_image.i

index 7c3ea504671eebe2f56254d198c96cb861b0a8d2..3d216f9a8eb24bc0fc2b09a4910ac4bf87279c8e 100644 (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,