 
       wx.Mask¶
  wx.Mask¶This class encapsulates a monochrome mask bitmap, where the masked area is black and the unmasked area is white.
When associated with a bitmap and drawn in a device context, the unmasked area of the bitmap will be drawn, and the masked area will not be drawn.
See also
 Methods Summary¶
 Methods Summary¶| __init__ | Default constructor. | 
| Create | Constructs a mask from a bitmap and a palette index that indicates the background. | 
| GetBitmap | Returns the mask as a monochrome bitmap. | 
 Class API¶
 Class API¶wx.Mask(Object)¶Possible constructors:
Mask()
Mask(bitmap, index)
Mask(bitmap)
Mask(bitmap, colour)
This class encapsulates a monochrome mask bitmap, where the masked area is black and the unmasked area is white.
__init__(self, *args, **kw)¶__init__ (self)
Default constructor.
__init__ (self, bitmap, index)
Constructs a mask from a bitmap and a palette index that indicates the background.
Not implemented for GTK.
| Parameters: | 
 | 
|---|
__init__ (self, bitmap)
Constructs a mask from a monochrome bitmap.
| Parameters: | bitmap (wx.Bitmap) – | 
|---|
__init__ (self, bitmap, colour)
Constructs a mask from a bitmap and a colour that indicates the background.
| Parameters: | 
|---|
Create(self, *args, **kw)¶Create (self, bitmap, index)
Constructs a mask from a bitmap and a palette index that indicates the background.
Not implemented for GTK.
| Parameters: | 
 | 
|---|---|
| Return type: | bool | 
Create (self, bitmap)
Constructs a mask from a monochrome bitmap.
| Parameters: | bitmap (wx.Bitmap) – | 
|---|---|
| Return type: | bool | 
Create (self, bitmap, colour)
Constructs a mask from a bitmap and a colour that indicates the background.
| Parameters: | |
|---|---|
| Return type: | bool | 
GetBitmap(self)¶Returns the mask as a monochrome bitmap.
Currently this method is implemented in wxMSW, wxGTK and wxOSX.
| Return type: | wx.Bitmap | 
|---|
New in version 2.9.5.