From ee8dbe630811f87117cc5dc7bf115d5538978e7c Mon Sep 17 00:00:00 2001 From: Ron Lee Date: Sun, 5 Mar 2000 23:42:50 +0000 Subject: [PATCH] set m_clipXX to resultant clipping region git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dcclient.cpp | 15 ++++++++------- src/gtk1/dcclient.cpp | 15 ++++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index ee0bc00929..6817a326bf 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1698,8 +1698,6 @@ void wxWindowDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoo { wxCHECK_RET( Ok(), wxT("invalid window dc") ); - wxDC::DoSetClippingRegion( x, y, width, height ); - if (!m_window) return; wxRect rect; @@ -1718,6 +1716,10 @@ void wxWindowDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoo m_currentClippingRegion.Intersect( m_paintClippingRegion ); #endif + wxCoord xx, yy, ww, hh; + m_currentClippingRegion.GetBox( xx, yy, ww, hh ); + wxDC::DoSetClippingRegion( xx, yy, ww, hh ); + gdk_gc_set_clip_region( m_penGC, m_currentClippingRegion.GetRegion() ); gdk_gc_set_clip_region( m_brushGC, m_currentClippingRegion.GetRegion() ); gdk_gc_set_clip_region( m_textGC, m_currentClippingRegion.GetRegion() ); @@ -1734,11 +1736,6 @@ void wxWindowDC::DoSetClippingRegionAsRegion( const wxRegion ®ion ) return; } - wxCoord x,y,w,h; - region.GetBox( x, y, w, h ); - - wxDC::DoSetClippingRegion( x, y, w, h ); - if (!m_window) return; if (!m_currentClippingRegion.IsNull()) @@ -1751,6 +1748,10 @@ void wxWindowDC::DoSetClippingRegionAsRegion( const wxRegion ®ion ) m_currentClippingRegion.Intersect( m_paintClippingRegion ); #endif + wxCoord xx, yy, ww, hh; + m_currentClippingRegion.GetBox( xx, yy, ww, hh ); + wxDC::DoSetClippingRegion( xx, yy, ww, hh ); + gdk_gc_set_clip_region( m_penGC, m_currentClippingRegion.GetRegion() ); gdk_gc_set_clip_region( m_brushGC, m_currentClippingRegion.GetRegion() ); gdk_gc_set_clip_region( m_textGC, m_currentClippingRegion.GetRegion() ); diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index ee0bc00929..6817a326bf 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -1698,8 +1698,6 @@ void wxWindowDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoo { wxCHECK_RET( Ok(), wxT("invalid window dc") ); - wxDC::DoSetClippingRegion( x, y, width, height ); - if (!m_window) return; wxRect rect; @@ -1718,6 +1716,10 @@ void wxWindowDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoo m_currentClippingRegion.Intersect( m_paintClippingRegion ); #endif + wxCoord xx, yy, ww, hh; + m_currentClippingRegion.GetBox( xx, yy, ww, hh ); + wxDC::DoSetClippingRegion( xx, yy, ww, hh ); + gdk_gc_set_clip_region( m_penGC, m_currentClippingRegion.GetRegion() ); gdk_gc_set_clip_region( m_brushGC, m_currentClippingRegion.GetRegion() ); gdk_gc_set_clip_region( m_textGC, m_currentClippingRegion.GetRegion() ); @@ -1734,11 +1736,6 @@ void wxWindowDC::DoSetClippingRegionAsRegion( const wxRegion ®ion ) return; } - wxCoord x,y,w,h; - region.GetBox( x, y, w, h ); - - wxDC::DoSetClippingRegion( x, y, w, h ); - if (!m_window) return; if (!m_currentClippingRegion.IsNull()) @@ -1751,6 +1748,10 @@ void wxWindowDC::DoSetClippingRegionAsRegion( const wxRegion ®ion ) m_currentClippingRegion.Intersect( m_paintClippingRegion ); #endif + wxCoord xx, yy, ww, hh; + m_currentClippingRegion.GetBox( xx, yy, ww, hh ); + wxDC::DoSetClippingRegion( xx, yy, ww, hh ); + gdk_gc_set_clip_region( m_penGC, m_currentClippingRegion.GetRegion() ); gdk_gc_set_clip_region( m_brushGC, m_currentClippingRegion.GetRegion() ); gdk_gc_set_clip_region( m_textGC, m_currentClippingRegion.GetRegion() ); -- 2.45.2