diff --git a/include/wx/generic/dcpsg.h b/include/wx/generic/dcpsg.h index fba5f2cb57..b12584fd2d 100644 --- a/include/wx/generic/dcpsg.h +++ b/include/wx/generic/dcpsg.h @@ -94,8 +94,7 @@ public: void SetLogicalFunction( int function ); void SetBackground( const wxBrush& brush ); - void SetClippingRegion(long x, long y, long width, long height); - void SetClippingRegion( const wxRegion ®ion ); + void DoSetClippingRegion(long x, long y, long width, long height); void DestroyClippingRegion(); void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) {} diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index a02303a670..6770319ffd 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -387,13 +387,13 @@ bool wxPostScriptDC::PrinterDialog(wxWindow *parent) return m_ok; } -void wxPostScriptDC::SetClippingRegion (long x, long y, long w, long h) +void wxPostScriptDC::DoSetClippingRegion (long x, long y, long w, long h) { wxCHECK_RET( m_ok && m_pstream, wxT("invalid postscript dc") ); - if (m_clipping) return; + if (m_clipping) DestroyClippingRegion(); - wxDC::SetClippingRegion( x, y, w, h ); + wxDC::DoSetClippingRegion(x, y, w, h); m_clipping = TRUE; fprintf( m_pstream, @@ -409,22 +409,18 @@ void wxPostScriptDC::SetClippingRegion (long x, long y, long w, long h) XLOG2DEV(x), YLOG2DEV(y+h) ); } -void wxPostScriptDC::SetClippingRegion( const wxRegion &WXUNUSED(region) ) -{ - wxFAIL_MSG( wxT("wxPostScriptDC::SetClippingRegion not implemented.") ); -} void wxPostScriptDC::DestroyClippingRegion() { wxCHECK_RET( m_ok && m_pstream, wxT("invalid postscript dc") ); - wxDC::DestroyClippingRegion(); - if (m_clipping) { m_clipping = FALSE; fprintf( m_pstream, "grestore\n" ); } + + wxDC::DestroyClippingRegion(); } void wxPostScriptDC::Clear()