From 3821ccfaa62a4765c87dfaf5efd9359fe7bd1f16 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 7 May 2009 08:58:54 +0000 Subject: [PATCH] document that setting an empty clipping region destroys the existing one git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/dc.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/interface/wx/dc.h b/interface/wx/dc.h index da232bc282..a9ebbb3eab 100644 --- a/interface/wx/dc.h +++ b/interface/wx/dc.h @@ -602,13 +602,20 @@ public: /** Sets the clipping region for this device context to the intersection of the given region described by the parameters of this method and the - previously set clipping region. You should call DestroyClippingRegion() - if you want to set the clipping region exactly to the region specified. + previously set clipping region. The clipping region is an area to which drawing is restricted. Possible uses for the clipping region are for clipping text or for speeding up window redraws when only a known area of the screen is damaged. + Notice that you need to call DestroyClippingRegion() if you want to set + the clipping region exactly to the region specified. + + Also note that if the clipping region is empty, any previously set + clipping region is destroyed, i.e. it is equivalent to calling + DestroyClippingRegion(), and not to clipping out all drawing on the DC + as might be expected. + @see DestroyClippingRegion(), wxRegion */ void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height); -- 2.45.2