PostScript/Simple version 0.06p1 ================================ ******************************************************************************** This is a pre-release of version 0.06. Expect things to Not Work, and please let me know if they do (or don't!). Thanks! ******************************************************************************** PostScript::Simple allows you to have a simple method of writing PostScript files from Perl. It has several graphics primitives that allow lines, circles, polygons and boxes to be drawn. Text can be added to the page using standard PostScript fonts. Features include: Generation of multi-page PostScript files Generation of single-page EPS files Creating lines/circles etc. Rectangles and boxes Text Colour Pre-defined paper sizes Etc. etc. A module that provides compatibility with the GD module calls might also one day be written, so that programs may be easily be converted to produce PostScript. Don't hold your breath. The file examples/example.pl provides some bad examples of what this module does. Changes from 0.04: Watch Out! Several functions now have options passed by hash reference, rather than the method used before. Your programs might break! This way is a lot tidier... sorry if this caused any problems. For example, before: $p->box(10,10,20,20, 1); $p->text(15, 15, "Hello", 'right'); $p->polygon("rotate=45", 1,1, 1,2, 2,2, 2,1, 1,1); now: $p->box({filled=>1}, 10,10, 20,20); $p->text({align=>"right"}, 15,15, "Hello"); $p->polygon({rotate=>45}, 1,1, 1,2, 2,2, 2,1, 1,1); INSTALLATION To install this module type the following: perl Makefile.PL make make test make install COPYRIGHT AND LICENCE Copyright (C) 2002-2003 Matthew C. Newton / Newton Computing 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, version 2. 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, available at http://www.gnu.org/licenses/gpl.html. ACKNOWLEDGEMENTS Thanks go to the following: m.s.withall@lut.ac.uk for help with the initial idea riechert@pobox.com for help with the distribution pkent@cpan.org for many updates and fixes dion@swamp.dk for updates for font encoding, text alignment and more michael.tomuschat@planet-interkom.de for several updates (not yet merged) cade@cpan.org for text rotate / align update stuff marty@ancient-scotland.co.uk for lots of useful discussion evoisard@ieee.org for useful chats about page sizes and landscape ewilhelm@azahner.com for the arc function peter.m.kuehn@t-online.de for inserting ps and eps code (not yet merged) astfgl@iamnota.org for circletext function and inserteps code ...and probably more, apologies if you are missing from this list and have contributed something. If you have sent me a patch for this module, and had no reply, please re-send it. I'm particularly bad at missing e-mails... TO-DO / DONE LISTS: Done: landscape seems to work ok xsize and ysize set fine colour option works clipping works eps option works (but output needs slight modification save/restore etc) page option works. setpage allows page number/name to be changed bb[xy][12] options are in and set lines, circles and boxes work. functions only added when needed. setcolour function works. colour look-up table added. postscript DSC headers seem to be fine (for PS and EPS) colour->grey calculation (tested: this is actually ok) different line widths polygon function text and font functions paper sizes defined and used (DSC comment added) better error reporting (postscript comments still?) font encoding for european etc. add dd cc and sp to units text rotate / align import eps files into the postscript (in progress, core finished) pie slices / arcs (well, arcs anyway) To-Do: PostScript "compression", i.e. /n {newpath} bind def code compression using single letter dictionary defs (optional?) any postscript optimisation that can be done? hope that units are now correct... check postscript font support? define shape functions translate / scale / rotate functions? generate PostScript using a stack, rather than writing to the end of a text variable? could lead to some rather neat stuff (loops etc) different line styles (dashes)? (easy) ttf font support (get lost!)