fixed bug in PS clipping (non-virtual SetClippingRegion was overloaded)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -94,8 +94,7 @@ public:
|
|||||||
void SetLogicalFunction( int function );
|
void SetLogicalFunction( int function );
|
||||||
void SetBackground( const wxBrush& brush );
|
void SetBackground( const wxBrush& brush );
|
||||||
|
|
||||||
void SetClippingRegion(long x, long y, long width, long height);
|
void DoSetClippingRegion(long x, long y, long width, long height);
|
||||||
void SetClippingRegion( const wxRegion ®ion );
|
|
||||||
void DestroyClippingRegion();
|
void DestroyClippingRegion();
|
||||||
|
|
||||||
void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) {}
|
void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) {}
|
||||||
|
@@ -387,13 +387,13 @@ bool wxPostScriptDC::PrinterDialog(wxWindow *parent)
|
|||||||
return m_ok;
|
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") );
|
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;
|
m_clipping = TRUE;
|
||||||
fprintf( m_pstream,
|
fprintf( m_pstream,
|
||||||
@@ -409,22 +409,18 @@ void wxPostScriptDC::SetClippingRegion (long x, long y, long w, long h)
|
|||||||
XLOG2DEV(x), YLOG2DEV(y+h) );
|
XLOG2DEV(x), YLOG2DEV(y+h) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPostScriptDC::SetClippingRegion( const wxRegion &WXUNUSED(region) )
|
|
||||||
{
|
|
||||||
wxFAIL_MSG( wxT("wxPostScriptDC::SetClippingRegion not implemented.") );
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxPostScriptDC::DestroyClippingRegion()
|
void wxPostScriptDC::DestroyClippingRegion()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_ok && m_pstream, wxT("invalid postscript dc") );
|
wxCHECK_RET( m_ok && m_pstream, wxT("invalid postscript dc") );
|
||||||
|
|
||||||
wxDC::DestroyClippingRegion();
|
|
||||||
|
|
||||||
if (m_clipping)
|
if (m_clipping)
|
||||||
{
|
{
|
||||||
m_clipping = FALSE;
|
m_clipping = FALSE;
|
||||||
fprintf( m_pstream, "grestore\n" );
|
fprintf( m_pstream, "grestore\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxDC::DestroyClippingRegion();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPostScriptDC::Clear()
|
void wxPostScriptDC::Clear()
|
||||||
|
Reference in New Issue
Block a user