.. include:: headings.inc .. _Mask: ========================================================================================================================================== |phoenix_title| **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. .. seealso:: :ref:`Bitmap`, :meth:`DC.Blit` , :ref:`MemoryDC` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **Mask** .. raw:: html

Inheritance diagram of Mask

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~Mask.__init__` Default constructor. :meth:`~Mask.Create` Constructs a mask from a bitmap and a palette index that indicates the background. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: Mask(Object) This class encapsulates a monochrome mask bitmap, where the masked area is black and the unmasked area is white. **Possible constructors**:: Mask() Mask(bitmap, index) Mask(bitmap) Mask(bitmap, colour) .. method:: __init__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__init__** `(self)` Default constructor. **~~~** **__init__** `(self, bitmap, index)` Constructs a mask from a bitmap and a palette index that indicates the background. Not yet implemented for GTK. :param `bitmap`: A valid bitmap. :type `bitmap`: Bitmap :param `index`: Index into a palette, specifying the transparency colour. :type `index`: int **~~~** **__init__** `(self, bitmap)` Constructs a mask from a monochrome bitmap. :param `bitmap`: :type `bitmap`: Bitmap **~~~** **__init__** `(self, bitmap, colour)` Constructs a mask from a bitmap and a colour that indicates the background. :param `bitmap`: :type `bitmap`: Bitmap :param `colour`: :type `colour`: Colour **~~~** .. method:: Create(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **Create** `(self, bitmap, index)` Constructs a mask from a bitmap and a palette index that indicates the background. Not yet implemented for GTK. :param `bitmap`: A valid bitmap. :type `bitmap`: Bitmap :param `index`: Index into a palette, specifying the transparency colour. :type `index`: int :rtype: `bool` **~~~** **Create** `(self, bitmap)` Constructs a mask from a monochrome bitmap. :param `bitmap`: :type `bitmap`: Bitmap :rtype: `bool` **~~~** **Create** `(self, bitmap, colour)` Constructs a mask from a bitmap and a colour that indicates the background. :param `bitmap`: :type `bitmap`: Bitmap :param `colour`: :type `colour`: Colour :rtype: `bool` **~~~**