From: Václav Slavík Date: Mon, 25 Sep 2006 19:08:54 +0000 (+0000) Subject: added assert to check for not-yet-implemented behavior of SetClippingRegion X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f87d0500fa6211da6eca95077789c5c55185ee56?ds=inline added assert to check for not-yet-implemented behavior of SetClippingRegion git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/dfb/dc.cpp b/src/dfb/dc.cpp index cf11ae7aaa..5c44c092d4 100644 --- a/src/dfb/dc.cpp +++ b/src/dfb/dc.cpp @@ -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()); }