]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/dcclipper.tex
Spacing tweak
[wxWidgets.git] / docs / latex / wx / dcclipper.tex
CommitLineData
fc298ea7
VZ
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{See also}
42
43\helpref{wxDC::SetClippingRegion}{wxdcsetclippingregion}
44
45
46
47\latexignore{\rtfignore{\wxheading{Members}}}
48
49\membersection{wxDCClipper::wxDCClipper}\label{wxdcclipperctor}
50
51\func{}{wxDCClipper}{\param{wxDC\& }{dc}, \param{const wxRegion\& }{r}}
52
53\func{}{wxDCClipper}{\param{wxDC\& }{dc}, \param{const wxRect\& }{rect}}
54
55\func{}{wxDCClipper}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}, \param{int }{w}, \param{int }{h}}
56
57Sets the clipping region to the specified region \arg{r} or rectangle specified
58by either a single \arg{rect} parameter or its position (\arg{x} and \arg{y})
59and size (\arg{w} ad \arg{h}).
60
61The clipping region is automatically unset when this object is destroyed.
62
63