Public Member Functions

# wxMask Class Reference
[Graphics Device Interface (GDI)]

`#include <wx/bitmap.h>`

Inheritance diagram for wxMask:
[legend]

## Detailed 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.

##

Library: wxCore
Category: Graphics Device Interface (GDI)

See also:
  wxBitmap, wxDC::Blit, wxMemoryDC

## Public Member Functions
| wxMask ()
| Default constructor.
| wxMask (const wxBitmap &bitmap, int index)
| Constructs a mask from a bitmap and a palette index that indicates the background.
| wxMask (const wxBitmap &bitmap)
| Constructs a mask from a monochrome bitmap.
| wxMask (const wxBitmap &bitmap, const wxColour &colour)
| Constructs a mask from a bitmap and a colour that indicates the background.
virtual | ~wxMask ()
| Destroys the wxMask object and the underlying bitmap data.
bool | Create (const wxBitmap &bitmap, int index)
| Constructs a mask from a bitmap and a palette index that indicates the background.
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.

List of all members.

## Constructor & Destructor Documentation

wxMask::wxMask | ( |  | ) |

Default constructor.

wxMask::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.
  | index | Index into a palette, specifying the transparency colour.

wxMask::wxMask | ( | const wxBitmap & | bitmap | ) |

Constructs a mask from a monochrome bitmap.

wxPython Note: This is the default constructor for wxMask in wxPython.

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

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

wxPython Note: wxPython has an alternate wxMask constructor matching this form called wxMaskColour.

virtual wxMask::~wxMask | ( |  | ) | `[virtual]`

Destroys the wxMask object and the underlying bitmap data.

## Member Function Documentation

bool wxMask::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.
  | index | Index into a palette, specifying the transparency colour.

bool wxMask::Create | ( | const wxBitmap & | bitmap,
|  | const wxColour & | colour |
| ) |  |  |

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

bool wxMask::Create | ( | const wxBitmap & | bitmap | ) |

Constructs a mask from a monochrome bitmap.

|  | [ top ]