wx.Mask

Inheritance diagram for wx.Mask:



Description

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.

Derived From

Remarks

A mask may be associated with a wx.Bitmap. It is used in wx.DC.Blit when the source device context is a wx.MemoryDC with wx.Bitmap selected into it that contains a mask.

Methods Summary

Class API

Methods

__init__(bitmap, colour=wx.NullColour)

Constructs a mask from a wx.Bitmap and a wx.Colour in that bitmap that indicates the transparent portions of the mask. In other words, the pixels in bitmap that match colour will be the transparent portions of the mask. If no colour or an invalid colour is passed then wx.BLACK is used.

Parameters:


Returns:

wx.Mask

See also

wx.Bitmap, wx.Colour