]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxDCClipper ctor overload taking a wxRegion and documented it
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 10 Apr 2006 15:08:10 +0000 (15:08 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 10 Apr 2006 15:08:10 +0000 (15:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/classes.tex
docs/latex/wx/dcclipper.tex [new file with mode: 0644]
include/wx/dc.h

index 221ce99e7d1688a54bf3553b4b61288af17fc5c8..f5215e9d22ddb38466b32512adb5da23efea0927 100644 (file)
@@ -72,6 +72,7 @@
 \input datetime.tex
 \input db.tex
 \input dc.tex
+\input dcclipper.tex
 \input ddeclint.tex
 \input ddeconn.tex
 \input ddeservr.tex
diff --git a/docs/latex/wx/dcclipper.tex b/docs/latex/wx/dcclipper.tex
new file mode 100644 (file)
index 0000000..e5dfdce
--- /dev/null
@@ -0,0 +1,63 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name:        dcclipper.tex
+%% Purpose:     wxDCClipper documentation
+%% Author:      Vadim Zeitlin
+%% Created:     2006-04-10
+%% RCS-ID:      $Id$
+%% Copyright:   (c) 2006 Vadim Zeitlin
+%% License:     wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{\class{wxDCClipper}}\label{wxdcclipper}
+
+wxDCClipper is a small helper class for setting a clipping region on a 
+\helpref{wxDC}{wxdc} and unsetting it automatically. An object of wxDCClipper
+class is typically created on the stack so that it is automatically destroyed
+when the object goes out of scope. A typical usage example:
+
+\begin{verbatim}
+    void MyFunction(wxDC& dc)
+    {
+        wxDCClipper clip(rect);
+        ... drawing functions here are affected by clipping rect ...
+    }
+
+    void OtherFunction()
+    {
+        wxDC dc;
+        MyFunction(dc);
+        ... drawing functions here are not affected by clipping rect ...
+    }
+\end{verbatim}
+
+\wxheading{Derived from}
+
+No base class
+
+\wxheading{Include files}
+
+<wx/dc.h>
+
+\wxheading{See also}
+
+\helpref{wxDC::SetClippingRegion}{wxdcsetclippingregion}
+
+
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxDCClipper::wxDCClipper}\label{wxdcclipperctor}
+
+\func{}{wxDCClipper}{\param{wxDC\& }{dc}, \param{const wxRegion\& }{r}}
+
+\func{}{wxDCClipper}{\param{wxDC\& }{dc}, \param{const wxRect\& }{rect}}
+
+\func{}{wxDCClipper}{\param{wxDC\& }{dc}, \param{int }{x}, \param{int }{y}, \param{int }{w}, \param{int }{h}}
+
+Sets the clipping region to the specified region \arg{r} or rectangle specified
+by either a single \arg{rect} parameter or its position (\arg{x} and \arg{y})
+and size (\arg{w} ad \arg{h}).
+
+The clipping region is automatically unset when this object is destroyed.
+
+
index acb004af104f0376e72162d9b92cdcbfcd6fa161..af5ebf450131ac6b574dae56652d8d06c00cc7ef 100644 (file)
@@ -876,6 +876,8 @@ private:
 class WXDLLEXPORT wxDCClipper
 {
 public:
+    wxDCClipper(wxDC& dc, const wxRegion& r) : m_dc(dc)
+        { dc.SetClippingRegion(r); }
     wxDCClipper(wxDC& dc, const wxRect& r) : m_dc(dc)
         { dc.SetClippingRegion(r.x, r.y, r.width, r.height); }
     wxDCClipper(wxDC& dc, wxCoord x, wxCoord y, wxCoord w, wxCoord h) : m_dc(dc)