[Tuxpaint-devel] Tux Paint PostScript printing code rewritten
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: Bill K. <nb...@so...> - 2007-06-25 18:16:25
|
The PostScript generating code in Tux Paint has been moved to an external set of source files (postscript_print.c and .h) and the PS content itself has been rewritten from the ground up (based on NetPBM's "pnmtops" source code, and examining its output). It's not perfect, but it should be a lot better. Bonus: Tux Paint targets that use this PostScript generating code (that is, _not_ Windows, Mac OS X or BeOS, which have their own platform-specific print code) now uses "libprint" to determine the user's or system's current default paper size (e.g., "letter" or "a4"). That size (in PS points) is included in the generated PostScript, and Tux Paint asks the PS device to scale the user's picture up to fit on the page. It rotates it appropriately, based on paper size and image aspect ratio. Finally, Tux Paint lets the user specify a different paper size than what "libprint" discovers (via $PAPER or /etc/papersize). A pulldown that shows all paper sizes known by "libprint" has been added to Tux Paint Config. PLEASE TEST! :^) Recommendations to make it perfect would be appreciated. (Look for "FIXME" comments in the postscript_print.c :^) ) Thanks! (Special thanks to my friend Henry House for looking over the current PS output for me, and giving recommendations. And thanks to Jef Poskanzer, who wrote "pnmtops" back in the day.) -- -bill! bi...@ne... http://www.newbreedsoftware.com/ |