PostScript printing code rewritten, based on NetPBM's 'pnmtops' tool by Jef Poskanzer.
PostScript printing now uses libprint to determine papersize, and scale and position image accordingly. Thanks to Henry House. "--papersize" option added to allow PostScript printing code to use a different size than libpaper reports as the user's or system's default.
This commit is contained in:
parent
4b642d53d5
commit
b16832d76a
10 changed files with 420 additions and 74 deletions
|
|
@ -1,6 +1,33 @@
|
|||
/*
|
||||
postscript_print.h
|
||||
|
||||
|
||||
For Tux Paint
|
||||
PostScript(r) printing routine.
|
||||
(for non-Windows, non-Mac OS X, non-BeOS platforms, e.g. Linux)
|
||||
(moved from tuxpaint.c in 0.9.17)
|
||||
|
||||
Copyright (c) 2007 by Bill Kendrick and others
|
||||
bill@newbreedsoftware.com
|
||||
http://www.tuxpaint.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 24, 2007 - June 25, 2007
|
||||
$Id$
|
||||
*/
|
||||
|
||||
#ifndef POSTSCRIPT_PRINT_H
|
||||
|
|
@ -12,6 +39,9 @@
|
|||
|
||||
/* Method for printing images: */
|
||||
|
||||
/* FIXME: We should either settle on direct PostScript printing and remove
|
||||
the other options, or move these settings to Makefile -bjk 2007.06.25 */
|
||||
|
||||
#define PRINTMETHOD_PS /* Direct to PostScript */
|
||||
//#define PRINTMETHOD_PNM_PS /* Output PNM, assuming it gets printed */
|
||||
//#define PRINTMETHOD_PNG_PNM_PS /* Output PNG, assuming it gets printed */
|
||||
|
|
@ -44,10 +74,15 @@
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef PRINTMETHOD_PS
|
||||
|
||||
int do_ps_save(FILE * fi,
|
||||
// const char *restrict const fname,
|
||||
const char *fname,
|
||||
SDL_Surface * surf);
|
||||
// const char *restrict const fname,
|
||||
const char *fname,
|
||||
SDL_Surface * surf,
|
||||
char * pprsize);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* POSTSCRIPT_PRINT_H */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue