IsTransparent and etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-04-04 15:28:33 +00:00
parent c96bf2a768
commit 69056570da

View File

@@ -19,6 +19,15 @@
#include "wx/wxPython/pyistream.h" #include "wx/wxPython/pyistream.h"
%} %}
//---------------------------------------------------------------------------
enum {
wxIMAGE_ALPHA_TRANSPARENT,
wxIMAGE_ALPHA_THRESHOLD,
wxIMAGE_ALPHA_OPAQUE
};
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
%newgroup %newgroup
@@ -259,6 +268,13 @@ default initialized to all pixels being fully opaque. But if the image
has a a mask colour, all mask pixels will be completely transparent.", ""); has a a mask colour, all mask pixels will be completely transparent.", "");
DocDeclStr(
bool , IsTransparent(int x, int y,
unsigned char threshold = wxIMAGE_ALPHA_THRESHOLD) const,
"Returns True if this pixel is masked or has an alpha value less than
the spcified threshold.", "");
// find first colour that is not used in the image and has higher // find first colour that is not used in the image and has higher
// RGB values than <startR,startG,startB> // RGB values than <startR,startG,startB>
DocDeclAStr( DocDeclAStr(
@@ -271,7 +287,7 @@ success flag and rgb values.", "");
DocDeclStr( DocDeclStr(
bool , ConvertAlphaToMask(byte threshold = 128), bool , ConvertAlphaToMask(byte threshold = wxIMAGE_ALPHA_THRESHOLD),
"If the image has alpha channel, this method converts it to mask. All pixels "If the image has alpha channel, this method converts it to mask. All pixels
with alpha value less than ``threshold`` are replaced with mask colour and the with alpha value less than ``threshold`` are replaced with mask colour and the
alpha channel is removed. Mask colour is chosen automatically using alpha channel is removed. Mask colour is chosen automatically using