wxMask

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

wxObject

Include files

<wx/bitmap.h>

Remarks

A mask may be associated with a wxBitmap. It is used in wxDC::Blit when the source device context is a wxMemoryDC with wxBitmap selected into it that contains a mask.

See also

wxBitmap, wxDC::Blit, wxMemoryDC



wxMask::wxMask



wxMask(void)

Default constructor.



wxMask(const wxBitmap& bitmap)

Constructs a mask from a monochrome bitmap.

wxPython での注意点: This is the default constructor for wxMask in wxPython.



wxMask(const wxBitmap& bitmap, const wxColour& colour)

Constructs a mask from a bitmap and a colour that indicates the background.

wxPython での注意点: wxPython has an alternate wxMask constructor matching this form called wxMaskColour.



wxMask(const wxBitmap& bitmap, int index)

Constructs a mask from a bitmap and a palette index that indicates the background. Not yet implemented for GTK.

Parameters

bitmap
A valid bitmap.

colour
A colour specifying the transparency RGB values.

index
Index into a palette, specifying the transparency colour.



wxMask::~wxMask



~wxMask(void)

Destroys the wxMask object and the underlying bitmap data.



wxMask::Create



bool Create(const wxBitmap& bitmap)

Constructs a mask from a monochrome bitmap.



bool Create(const wxBitmap& bitmap, const wxColour& colour)

Constructs a mask from a bitmap and a colour that indicates the background.



bool Create(const wxBitmap& bitmap, int index)

Constructs a mask from a bitmap and a palette index that indicates the background. Not yet implemented for GTK.

Parameters

bitmap
A valid bitmap.

colour
A colour specifying the transparency RGB values.

index
Index into a palette, specifying the transparency colour.

ymasuda 平成17年11月19日