Make GetClippingBox() work for wxPrinterDC in wxGTK.

GetClippingBox() implementation relies on wxDCImpl::m_clip[XY][12] being
updated in DoSetClippingRegion() but this wasn't done here. Fix this by adding
the code to do this to the base class version of this method and calling it
from wxGtkPrinterDCImpl.

Also, refactor wxGCDCImpl to reuse the same code instead of duplicating it.

Closes #14697.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-10-14 14:55:32 +00:00
parent 4d604ad397
commit 332afcdb2f
4 changed files with 32 additions and 16 deletions

View File

@@ -2072,6 +2072,8 @@ void wxGtkPrinterDCImpl::DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width
{
cairo_rectangle ( m_cairo, XLOG2DEV(x), YLOG2DEV(y), XLOG2DEVREL(width), YLOG2DEVREL(height));
cairo_clip(m_cairo);
wxDCImpl::DoSetClippingRegion(x, y, width, height);
}
void wxGtkPrinterDCImpl::DestroyClippingRegion()