Use cairo_scale() for scaling to full printing resolution, correct transformation in Cairo graphics context for GTK+ printing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1042,22 +1042,15 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC&
|
||||
const wxDCImpl *impl = dc.GetImpl();
|
||||
Init( (cairo_t*) impl->GetCairoContext() );
|
||||
|
||||
#if 0
|
||||
wxGraphicsMatrix matrix = CreateMatrix();
|
||||
|
||||
wxPoint org = dc.GetDeviceOrigin();
|
||||
matrix.Translate( org.x, org.y );
|
||||
cairo_translate( m_context, org.x, org.y );
|
||||
|
||||
org = dc.GetLogicalOrigin();
|
||||
matrix.Translate( -org.x, -org.y );
|
||||
|
||||
double sx,sy;
|
||||
dc.GetUserScale( &sx, &sy );
|
||||
matrix.Scale( sx, sy );
|
||||
|
||||
ConcatTransform( matrix );
|
||||
#endif
|
||||
cairo_scale( m_context, sx, sy );
|
||||
|
||||
org = dc.GetLogicalOrigin();
|
||||
cairo_translate( m_context, -org.x, -org.y );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user