Add margin to updated postscript_print code.

Add some missing credits for PS print support.
This commit is contained in:
William Kendrick 2009-01-29 20:51:37 +00:00
parent 0ed291d18b
commit 088ff3f60f
4 changed files with 21 additions and 11 deletions

View file

@ -44,6 +44,11 @@ $Id$
copyright notice and this permission notice appear in supporting
documentation. This software is provided "as is" without express or
implied warranty.
Enhanced in Tux Paint by:
Bill Kendrick <bill@newbreedsoftware.com>
Pere Pujal i Carabantes <pere@fornol.no-ip.org>
Henry House <hajhouse@houseag.com>
Thomas Kalka <thomas.kalka@googlemail.com>
Blur ('entire image' mode), Sharpen, Trace Contour, Silhouette,
Snow Flake, Snow Ball, Black & White, Threshold, Alien, Toothpaste,

View file

@ -8,7 +8,7 @@ http://www.tuxpaint.org/
$Id$
2009.January.23 (0.9.21)
2009.January.29 (0.9.21)
* New Starters:
-------------
* Silver Frame
@ -84,6 +84,9 @@ $Id$
"lpr", but that command is not available) should appear in Tux Paint.
(SourceForge bug #2205528)
* Further adjustments to postscript_print scaling.
Thomas Kalka <thomas.kalka@googlemail.com>
* Build System Improvements:
--------------------------
* Adhering to Debian & FreeDesktop.org standards regarding .desktop file.

View file

@ -1,5 +1,5 @@
.\" tuxpaint.1 - 2009.01.17
.TH TUXPAINT 1 "17 January 2009" "0.9.21" "Tux Paint"
.\" tuxpaint.1 - 2009.01.29
.TH TUXPAINT 1 "29 January 2009" "0.9.21" "Tux Paint"
.SH NAME
tuxpaint -- "Tux Paint", a drawing program for young children.
@ -845,6 +845,7 @@ Tedi Heriyanto,
Pjetur G. Hjaltason,
Knut Erik Hollund,
Khaled Hosny,
Henry House,
Mohomodou Houssouba,
Song Huang,
Karl Ove Hufthammer,
@ -861,6 +862,7 @@ Amed
Petri Jooste,
Richard June,
Andrej Kacian,
Thomas Kalka,
Jorma Karvonen,
Kazuhiko,
Gabor Kelemen,

View file

@ -6,7 +6,7 @@
(for non-Windows, non-Mac OS X, non-BeOS platforms, e.g. Linux)
(moved from tuxpaint.c in 0.9.17)
Copyright (c) 2008 by Bill Kendrick and others
Copyright (c) 2009 by Bill Kendrick and others
bill@newbreedsoftware.com
http://www.tuxpaint.org/
@ -36,7 +36,7 @@
implied warranty.
June 24, 2007 - December 7, 2008
June 24, 2007 - January 29, 2009
$Id$
*/
@ -62,6 +62,8 @@
#include "pixels.h"
#define MARGIN 36 /* Margin to put around image, in points (inch/72) (36pt = 0.5") */
#define my_min(x,y) ((x < y) ? (x) : (y))
int f2int(float f);
@ -185,8 +187,8 @@ int do_ps_save(FILE * fi,
/* Determine scale: */
scale = my_min(((float) ppr_w / (float) r_img_w),
((float) ppr_h / (float) r_img_h)) * (72.0 / 100.0);
scale = my_min(((float) (ppr_w - (MARGIN * 2)) / (float) r_img_w),
((float) (ppr_h - (MARGIN * 2)) / (float) r_img_h));
printed_img_w = r_img_w * scale;
printed_img_h = r_img_h * scale;
@ -219,10 +221,8 @@ int do_ps_save(FILE * fi,
fprintf(fi, "%%%%Pages: 1\n");
fprintf(fi, "%%%%BoundingBox: %d %d %d %d\n",
(int) tlate_x, (int) tlate_y,
(int) (tlate_x + printed_img_w + 0.5),
(int) (tlate_y + printed_img_h + 0.5));
fprintf(fi, "%%%%BoundingBox: 0 0 %d %d\n", (int) (ppr_w + 0.5), (int)
(ppr_h + 0.5));
fprintf(fi, "%%%%EndComments\n");