gimp r27364 - in trunk: . plug-ins/print
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27364 - in trunk: . plug-ins/print
- Date: Wed, 22 Oct 2008 15:01:35 +0000 (UTC)
Author: neo
Date: Wed Oct 22 15:01:34 2008
New Revision: 27364
URL: http://svn.gnome.org/viewvc/gimp?rev=27364&view=rev
Log:
2008-10-22 Sven Neumann <sven gimp org>
Bug 524615 â Print not to scale
* plug-ins/print/print.c: set the unit for dimensions on the
Cairo
context used for printing to GTK_UNIT_PIXELS.
* plug-ins/print/print-draw-page.c (print_draw_page): changed
the
Cairo scale factors accordingly. Seems to fix printing on
Windows.
Modified:
trunk/ChangeLog
trunk/plug-ins/print/print-draw-page.c
trunk/plug-ins/print/print.c
Modified: trunk/plug-ins/print/print-draw-page.c
==============================================================================
--- trunk/plug-ins/print/print-draw-page.c (original)
+++ trunk/plug-ins/print/print-draw-page.c Wed Oct 22 15:01:34 2008
@@ -133,25 +133,15 @@
{
cairo_t *cr;
cairo_surface_t *surface;
- gdouble cr_width;
- gdouble cr_height;
- gdouble cr_dpi_x;
- gdouble cr_dpi_y;
cr = gtk_print_context_get_cairo_context (context);
surface = print_cairo_surface_from_drawable (data->drawable_id);
- cr_width = gtk_print_context_get_width (context);
- cr_height = gtk_print_context_get_height (context);
- cr_dpi_x = gtk_print_context_get_dpi_x (context);
- cr_dpi_y = gtk_print_context_get_dpi_y (context);
-
- cairo_translate (cr,
- data->offset_x / cr_dpi_x * 72.0,
- data->offset_y / cr_dpi_y * 72.0);
+ cairo_translate (cr, data->offset_x, data->offset_y);
cairo_scale (cr,
- cr_dpi_x / data->xres, cr_dpi_y / data->yres);
+ gtk_print_context_get_dpi_x (context) / data->xres,
+ gtk_print_context_get_dpi_y (context) / data->yres);
cairo_rectangle (cr,
0, 0,
Modified: trunk/plug-ins/print/print.c
==============================================================================
--- trunk/plug-ins/print/print.c (original)
+++ trunk/plug-ins/print/print.c Wed Oct 22 15:01:34 2008
@@ -234,7 +234,7 @@
print_settings_load (&data);
- gtk_print_operation_set_unit (operation, GTK_UNIT_POINTS);
+ gtk_print_operation_set_unit (operation, GTK_UNIT_PIXEL);
g_signal_connect (operation, "begin-print",
G_CALLBACK (begin_print),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]