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 copyright notice and this permission notice appear in supporting
documentation. This software is provided "as is" without express or documentation. This software is provided "as is" without express or
implied warranty. 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, Blur ('entire image' mode), Sharpen, Trace Contour, Silhouette,
Snow Flake, Snow Ball, Black & White, Threshold, Alien, Toothpaste, Snow Flake, Snow Ball, Black & White, Threshold, Alien, Toothpaste,

View file

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

View file

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

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) 2008 by Bill Kendrick and others Copyright (c) 2009 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 - December 7, 2008 June 24, 2007 - January 29, 2009
$Id$ $Id$
*/ */
@ -62,6 +62,8 @@
#include "pixels.h" #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)) #define my_min(x,y) ((x < y) ? (x) : (y))
int f2int(float f); int f2int(float f);
@ -185,8 +187,8 @@ int do_ps_save(FILE * fi,
/* Determine scale: */ /* Determine scale: */
scale = my_min(((float) ppr_w / (float) r_img_w), scale = my_min(((float) (ppr_w - (MARGIN * 2)) / (float) r_img_w),
((float) ppr_h / (float) r_img_h)) * (72.0 / 100.0); ((float) (ppr_h - (MARGIN * 2)) / (float) r_img_h));
printed_img_w = r_img_w * scale; printed_img_w = r_img_w * scale;
printed_img_h = r_img_h * 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, "%%%%Pages: 1\n");
fprintf(fi, "%%%%BoundingBox: %d %d %d %d\n", fprintf(fi, "%%%%BoundingBox: 0 0 %d %d\n", (int) (ppr_w + 0.5), (int)
(int) tlate_x, (int) tlate_y, (ppr_h + 0.5));
(int) (tlate_x + printed_img_w + 0.5),
(int) (tlate_y + printed_img_h + 0.5));
fprintf(fi, "%%%%EndComments\n"); fprintf(fi, "%%%%EndComments\n");