mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-18 13:53:46 +00:00
plug-ins: fix #3964 Incorrect position when printing
This was a long standing issue where the image was not printed at the position as selected in our print preview. The problem being that we do not take into account the dpi of the print context we are printing to, but instead always assumed 72. This is the fix that was suggested by Massimo.
This commit is contained in:
parent
9cbbdce24e
commit
0e462440cc
|
@ -66,7 +66,9 @@ print_draw_page (GtkPrintContext *context,
|
|||
scale_x = gtk_print_context_get_dpi_x (context) / data->xres;
|
||||
scale_y = gtk_print_context_get_dpi_y (context) / data->yres;
|
||||
|
||||
cairo_translate (cr, data->offset_x, data->offset_y);
|
||||
cairo_translate (cr,
|
||||
data->offset_x / 72.0 * gtk_print_context_get_dpi_x (context),
|
||||
data->offset_y / 72.0 * gtk_print_context_get_dpi_y (context));
|
||||
|
||||
if (data->draw_crop_marks)
|
||||
print_draw_crop_marks (context,
|
||||
|
|
Loading…
Reference in a new issue