]> git.saurik.com Git - wxWidgets.git/commitdiff
added assert to check for not-yet-implemented behavior of SetClippingRegion
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 25 Sep 2006 19:08:54 +0000 (19:08 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 25 Sep 2006 19:08:54 +0000 (19:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/dfb/dc.cpp

index cf11ae7aaaf4a5238cc2e5f2dfe6910604186d9e..5c44c092d43bb08cac79c2228c02cc9eca7a5f2e 100644 (file)
@@ -78,22 +78,15 @@ void wxDC::Init(const wxIDirectFBSurfacePtr& surface)
 // clipping
 // ---------------------------------------------------------------------------
 
-
-#define DO_SET_CLIPPING_BOX(rg)                      \
-{                                                    \
-    wxRect rect = rg.GetBox();                       \
-    m_clipX1 = (wxCoord) XDEV2LOG(rect.GetLeft());   \
-    m_clipY1 = (wxCoord) YDEV2LOG(rect.GetTop());    \
-    m_clipX2 = (wxCoord) XDEV2LOG(rect.GetRight());  \
-    m_clipY2 = (wxCoord) YDEV2LOG(rect.GetBottom()); \
-}
-
 void wxDC::DoSetClippingRegion(wxCoord cx, wxCoord cy, wxCoord cw, wxCoord ch)
 {
     wxCHECK_RET( Ok(), wxT("invalid dc") );
 
     wxSize size(GetSize());
 
+    wxASSERT_MSG( !m_clipping,
+                  _T("narrowing clipping region not implemented yet") );
+
     // NB: We intersect the clipping rectangle with surface's area here because
     //     DirectFB will return an error if you try to set clipping rectangle
     //     that is partially outside of the surface.
@@ -115,8 +108,7 @@ void wxDC::DoSetClippingRegion(wxCoord cx, wxCoord cy, wxCoord cw, wxCoord ch)
 
 void wxDC::DoSetClippingRegionAsRegion(const wxRegion& region)
 {
-    // NB: this can be done because wxDFB only supports
-    //     rectangular regions
+    // NB: this can be done because wxDFB only supports rectangular regions
     SetClippingRegion(region.AsRect());
 }