Fixed PS printing scale issue (thanks, Pere).

This commit is contained in:
William Kendrick 2008-08-28 22:06:43 +00:00
parent ee8020589a
commit 9c7f6fca41
2 changed files with 10 additions and 6 deletions

View file

@ -99,6 +99,10 @@ $Id$
Jason Ward <nyad55@gmail.com> Jason Ward <nyad55@gmail.com>
Pere Pujal i Carabantes <pere@fornol.no-ip.org> Pere Pujal i Carabantes <pere@fornol.no-ip.org>
* Corrected bug in postscript printing: images scaled up onto a large
canvas printed small, compared to when they're printed at the size
they were drawn.
Pere Pujal i Carabantes <pere@fornol.no-ip.org>
2008.June.26 (0.9.20) 2008.June.26 (0.9.20)
* New translations: * New translations:

View file

@ -6,7 +6,7 @@
(for non-Windows, non-Mac OS X, non-BeOS platforms, e.g. Linux) (for non-Windows, non-Mac OS X, non-BeOS platforms, e.g. Linux)
(moved from tuxpaint.c in 0.9.17) (moved from tuxpaint.c in 0.9.17)
Copyright (c) 2007 by Bill Kendrick and others Copyright (c) 2008 by Bill Kendrick and others
bill@newbreedsoftware.com bill@newbreedsoftware.com
http://www.tuxpaint.org/ http://www.tuxpaint.org/
@ -36,7 +36,7 @@
implied warranty. implied warranty.
June 24, 2007 - July 17, 2007 June 24, 2007 - August 28, 2008
$Id$ $Id$
*/ */
@ -219,8 +219,8 @@ int do_ps_save(FILE * fi,
fprintf(fi, "%%%%BoundingBox: %d %d %d %d\n", fprintf(fi, "%%%%BoundingBox: %d %d %d %d\n",
(int) tlate_x, (int) tlate_y, (int) tlate_x, (int) tlate_y,
(int) (tlate_x + r_img_w + 0.5), (int) (tlate_x + printed_img_w + 0.5),
(int) (tlate_y + r_img_h + 0.5)); (int) (tlate_y + printed_img_h + 0.5));
fprintf(fi, "%%%%EndComments\n"); fprintf(fi, "%%%%EndComments\n");
@ -255,8 +255,8 @@ int do_ps_save(FILE * fi,
x and y axes, leaving the origin location and the orientation of the x and y axes, leaving the origin location and the orientation of the
axes unchanged. */ axes unchanged. */
fprintf(fi, "%d.%02d %d.%02d scale\n", fprintf(fi, "%d.%02d %d.%02d scale\n",
f2int(printed_img_w * scale), f2dec(printed_img_w * scale), f2int(printed_img_w), f2dec(printed_img_w),
f2int(printed_img_h * scale), f2dec(printed_img_h * scale)); f2int(printed_img_h), f2dec(printed_img_h));
/* Rotate the image */ /* Rotate the image */
if (rotate) if (rotate)