]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/mask.tex
Fixed to work with the new wxMacControl system.
[wxWidgets.git] / docs / latex / wx / mask.tex
CommitLineData
a660d684
KB
1\section{\class{wxMask}}\label{wxmask}
2
3This class encapsulates a monochrome mask bitmap, where the masked area is black and
d3c7cfeb
JS
4the unmasked area is white. When associated with a bitmap and drawn in a device context,
5the unmasked area of the bitmap will be drawn, and the masked area will not be drawn.
a660d684
KB
6
7\wxheading{Derived from}
8
9\helpref{wxObject}{wxobject}
10
954b8ae6
JS
11\wxheading{Include files}
12
13<wx/bitmap.h>
14
a660d684
KB
15\wxheading{Remarks}
16
17A mask may be associated with a \helpref{wxBitmap}{wxbitmap}. It is used in \helpref{wxDC::Blit}{wxdcblit} when
18the source device context is a \helpref{wxMemoryDC}{wxmemorydc} with wxBitmap selected into it that
19contains a mask.
20
21\wxheading{See also}
22
23\helpref{wxBitmap}{wxbitmap}, \helpref{wxDC::Blit}{wxdcblit}, \helpref{wxMemoryDC}{wxmemorydc}
24
25\latexignore{\rtfignore{\wxheading{Members}}}
26
27\membersection{wxMask::wxMask}\label{wxmaskconstr}
28
29\func{}{wxMask}{\void}
30
31Default constructor.
32
5873607e 33\func{}{wxMask}{\param{const \helpref{wxBitmap}{wxbitmap}\& }{bitmap}}
a660d684
KB
34
35Constructs a mask from a monochrome bitmap.
36
ac1edf35
RD
37\pythonnote{This is the default constructor for wxMask in wxPython.}
38
5873607e 39\func{}{wxMask}{\param{const \helpref{wxBitmap}{wxbitmap}\& }{bitmap}, \param{const \helpref{wxColour}{wxcolour}\& }{colour}}
a660d684 40
f9ee644e 41Constructs a mask from a bitmap and a colour that indicates the background.
a660d684 42
ac1edf35 43\pythonnote{wxPython has an alternate wxMask constructor matching this
c9110876 44form called {\tt wxMaskColour}.}
ac1edf35 45
a660d684
KB
46\func{}{wxMask}{\param{const wxBitmap\& }{bitmap}, \param{int}{ index}}
47
91b8de8d
RR
48Constructs a mask from a bitmap and a palette index that indicates the background. Not
49yet implemented for GTK.
a660d684
KB
50
51\wxheading{Parameters}
52
53\docparam{bitmap}{A valid bitmap.}
54
55\docparam{colour}{A colour specifying the transparency RGB values.}
56
57\docparam{index}{Index into a palette, specifying the transparency colour.}
58
59\membersection{wxMask::\destruct{wxMask}}
60
61\func{}{\destruct{wxMask}}{\void}
62
63Destroys the wxMask object and the underlying bitmap data.
64
65\membersection{wxMask::Create}\label{wxmaskcreate}
66
67\func{bool}{Create}{\param{const wxBitmap\& }{bitmap}}
68
69Constructs a mask from a monochrome bitmap.
70
71\func{bool}{Create}{\param{const wxBitmap\& }{bitmap}, \param{const wxColour\& }{colour}}
72
f9ee644e 73Constructs a mask from a bitmap and a colour that indicates the background.
a660d684
KB
74
75\func{bool}{Create}{\param{const wxBitmap\& }{bitmap}, \param{int}{ index}}
76
91b8de8d
RR
77Constructs a mask from a bitmap and a palette index that indicates the background. Not
78yet implemented for GTK.
a660d684
KB
79
80\wxheading{Parameters}
81
82\docparam{bitmap}{A valid bitmap.}
83
84\docparam{colour}{A colour specifying the transparency RGB values.}
85
86\docparam{index}{Index into a palette, specifying the transparency colour.}
87
88