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:
Robin Dunn
2004-02-13 20:09:55 +00:00
parent ccc6783c50
commit 0482c494d3
6 changed files with 39 additions and 56 deletions

View File

@@ -556,9 +556,10 @@ class Mask(core.Object):
return "<%s.%s; proxy of C++ wxMask instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
def __init__(self, *args, **kwargs):
"""
__init__(Bitmap bitmap) -> Mask
__init__(Bitmap bitmap, Colour colour=NullColour) -> Mask
Constructs a mask from a monochrome bitmap.
Constructs a mask from a bitmap and a colour in that bitmap that indicates
the transparent portions of the mask, by default BLACK is used.
"""
newobj = _gdi.new_Mask(*args, **kwargs)
self.this = newobj.this
@@ -572,17 +573,7 @@ class MaskPtr(Mask):
self.__class__ = Mask
_gdi.Mask_swigregister(MaskPtr)
def MaskColour(*args, **kwargs):
"""
MaskColour(Bitmap bitmap, Colour colour) -> Mask
Constructs a mask from a bitmap and a colour in that bitmap that indicates the
background.
"""
val = _gdi.new_MaskColour(*args, **kwargs)
val.thisown = 1
return val
MaskColour = Mask
class Icon(GDIObject):
def __repr__(self):
return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)