route all Cairo calls in GTK printing code through gs_cairo (is this still needed?)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2008-09-21 09:42:49 +00:00
parent 40fcf546f6
commit fc2bb342ec
2 changed files with 6 additions and 4 deletions

View File

@@ -1177,7 +1177,7 @@ bool wxGtkPrinterDCImpl::IsOk() const
void* wxGtkPrinterDCImpl::GetCairoContext() const
{
return (void*) cairo_reference( m_cairo );
return (void*) gs_cairo->cairo_reference( m_cairo );
}
bool wxGtkPrinterDCImpl::DoFloodFill(wxCoord WXUNUSED(x1),
@@ -1746,11 +1746,11 @@ void wxGtkPrinterDCImpl::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoor
// Scale the image
cairo_filter_t filter = CAIRO_FILTER_BILINEAR;
cairo_pattern_t* pattern = cairo_pattern_create_for_surface(surface);
cairo_pattern_set_filter(pattern,filter);
cairo_pattern_t* pattern = gs_cairo->cairo_pattern_create_for_surface(surface);
gs_cairo->cairo_pattern_set_filter(pattern,filter);
wxDouble scaleX = (wxDouble) XLOG2DEVREL(bw) / (wxDouble) bw;
wxDouble scaleY = (wxDouble) YLOG2DEVREL(bh) / (wxDouble) bh;
cairo_scale(m_cairo, scaleX, scaleY);
gs_cairo->cairo_scale(m_cairo, scaleX, scaleY);
gs_cairo->cairo_set_source(m_cairo, pattern);
// Use the original size here since the context is scaled already.