X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/477160b73f9f8d9ed0d0d5dc1227651f303fcaf1..c845a1975a3d6d79b19a7ec77bd8e0b8b8850751:/include/wx/image.h diff --git a/include/wx/image.h b/include/wx/image.h index 1789d526c8..153065c764 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -185,7 +185,8 @@ public: void Replace( unsigned char r1, unsigned char g1, unsigned char b1, unsigned char r2, unsigned char g2, unsigned char b2 ); - // convert to monochrome image ( will be replaced by white, everything else by black) + // convert to monochrome image ( will be replaced by white, + // everything else by black) wxImage ConvertToMono( unsigned char r, unsigned char g, unsigned char b ) const; // these routines are slow but safe @@ -206,6 +207,10 @@ public: bool SetMaskFromImage(const wxImage & mask, unsigned char mr, unsigned char mg, unsigned char mb); + // converts image's alpha channel to mask, if it has any, does nothing + // otherwise: + bool ConvertAlphaToMask(unsigned char threshold = 128); + static bool CanRead( const wxString& name ); static int GetImageCount( const wxString& name, long type = wxBITMAP_TYPE_ANY ); virtual bool LoadFile( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 );