From 5db980554cdff6603560c18c7bd4f96ccbe98bd0 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 20 Jul 2007 11:08:39 +0000 Subject: [PATCH] =?UTF-8?q?Applied=20patch=20from=20Stefan=20R=C3=B6llin?= =?UTF-8?q?=20attached=20to=20bug=20#387604:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2007-07-20 Sven Neumann Applied patch from Stefan Röllin attached to bug #387604: * plug-ins/print/print-draw-page.c: take offsets into account. svn path=/trunk/; revision=22962 --- ChangeLog | 6 ++++++ plug-ins/print/print-draw-page.c | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc154e9a9c..c7061833f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-07-20 Sven Neumann + + Applied patch from Stefan Röllin attached to bug #387604: + + * plug-ins/print/print-draw-page.c: take offsets into account. + 2007-07-20 Sven Neumann * app/core/gimpimage-quick-mask.[ch]: remember whether a channel diff --git a/plug-ins/print/print-draw-page.c b/plug-ins/print/print-draw-page.c index 6402cebd9b..4bd54971c9 100644 --- a/plug-ins/print/print-draw-page.c +++ b/plug-ins/print/print-draw-page.c @@ -62,8 +62,6 @@ draw_page_cairo (GtkPrintContext *context, gint y; gdouble scale_x; gdouble scale_y; - gdouble x0 = 0; - gdouble y0 = 0; guchar *pixels; cairo_surface_t *surface; @@ -105,10 +103,7 @@ draw_page_cairo (GtkPrintContext *context, } #endif - x0 = (cr_width - scale_x * width) / 2; - y0 = (cr_height - scale_y * height) / 2; - - cairo_translate (cr, x0, y0); + cairo_translate (cr, data->offset_x / cr_dpi_x * 72.0, data->offset_y / cr_dpi_y * 72.0); cairo_scale (cr, scale_x, scale_y); gimp_pixel_rgn_init (®ion, drawable, 0, 0, width, height, FALSE, FALSE);