Make all wxMask constructors use the C++ (bitmap, colour) ctor, and
then just default in BLACK to simulate the default (monobitmap) behaviour. It's too tricky to make true monochome bitmaps in a platform independent way from the Python wrappers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -201,19 +201,29 @@ DocStr(wxMask,
|
||||
|
||||
class wxMask : public wxObject {
|
||||
public:
|
||||
#if 0
|
||||
DocCtorStr(
|
||||
wxMask(const wxBitmap& bitmap),
|
||||
"Constructs a mask from a monochrome bitmap.");
|
||||
#endif
|
||||
|
||||
DocCtorStrName(
|
||||
wxMask(const wxBitmap& bitmap, const wxColour& colour),
|
||||
"Constructs a mask from a bitmap and a colour in that bitmap that indicates the\n"
|
||||
"background.",
|
||||
MaskColour);
|
||||
DocStr(wxMask,
|
||||
"Constructs a mask from a bitmap and a colour in that bitmap that indicates\n"
|
||||
"the transparent portions of the mask, by default BLACK is used.");
|
||||
|
||||
%extend {
|
||||
wxMask(const wxBitmap& bitmap, const wxColour& colour = wxNullColour) {
|
||||
if ( !colour.Ok() )
|
||||
return new wxMask(bitmap, *wxBLACK);
|
||||
else
|
||||
return new wxMask(bitmap, colour);
|
||||
}
|
||||
}
|
||||
|
||||
//~wxMask();
|
||||
|
||||
};
|
||||
|
||||
%pythoncode { MaskColour = Mask }
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user