Package wx :: Class Mask
[frames | no frames]

Type Mask

object --+    
         |    
    Object --+
             |
            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.

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


Method Summary
Mask __init__(self, bitmap, colour)
Constructs a mask from a wx.Bitmap and a wx.Colour in that bitmap that indicates the transparent portions of the mask.
  __repr__(self)
    Inherited from Object
  Destroy(self)
Deletes the C++ object this Python object is a proxy for.
String GetClassName(self)
Returns the class name of the C++ class using wxRTTI.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Method Details

__init__(self, bitmap, colour=NullColour)
(Constructor)

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 BLACK is used.

Parameters:
bitmap
           (type=Bitmap)

colour
           (type=Colour)

Returns:
Mask
Overrides:
wx.Object.__init__

See Also:

wx.Bitmap, wx.Colour


Generated by Epydoc 2.1.20050511.rpd on Sat Jun 16 17:00:58 2007 http://epydoc.sf.net