]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/dcclipper.tex
Added wxRect::Intersect() documentation (patch 1868322 from Laurent Humbertclaude).
[wxWidgets.git] / docs / latex / wx / dcclipper.tex
... / ...
CommitLineData
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: dcclipper.tex
3%% Purpose: wxDCClipper documentation
4%% Author: Vadim Zeitlin
5%% Created: 2006-04-10
6%% RCS-ID: $Id$
7%% Copyright: (c) 2006 Vadim Zeitlin
8%% License: wxWindows license
9%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10
11\section{\class{wxDCClipper}}\label{wxdcclipper}
12
13wxDCClipper is a small helper class for setting a clipping region on a
14\helpref{wxDC}{wxdc} and unsetting it automatically. An object of wxDCClipper
15class is typically created on the stack so that it is automatically destroyed
16when the object goes out of scope. A typical usage example:
17
18\begin{verbatim}
19 void MyFunction(wxDC& dc)
20 {
21 wxDCClipper clip(rect);
22 ... drawing functions here are affected by clipping rect ...
23 }
24
25 void OtherFunction()
26 {
27 wxDC dc;
28 MyFunction(dc);
29 ... drawing functions here are not affected by clipping rect ...
30 }
31\end{verbatim}
32
33\wxheading{Derived from}
34
35No base class
36
37\wxheading{Include files}
38
39<wx/dc.h>
40
41\wxheading{Library}
42
43\helpref{wxCore}{librarieslist}
44
45\wxheading{See also}
46
47\helpref{wxDC::SetClippingRegion}{wxdcsetclippingregion}
48
49
50
51\latexignore{\rtfignore{\wxheading{Members}}}
52
53\membersection{wxDCClipper::wxDCClipper}\label{wxdcclipperctor}
54
55\func{}{wxDCClipper}{\param{wxDC\& }{dc}, \param{const wxRegion\& }{r}}
56
57\func{}{wxDCClipper}{\param{wxDC\& }{dc}, \param{const wxRect\& }{rect}}
58
59\func{}{wxDCClipper}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}, \param{int }{w}, \param{int }{h}}
60
61Sets the clipping region to the specified region \arg{r} or rectangle specified
62by either a single \arg{rect} parameter or its position (\arg{x} and \arg{y})
63and size (\arg{w} ad \arg{h}).
64
65The clipping region is automatically unset when this object is destroyed.
66