PostScript::Simple

PostScript::Simple is a module that can produce PostScript files from Perl.
Download

PostScript::Simple Ranking & Summary

Advertisement

  • Rating:
  • License:
  • LGPL
  • Price:
  • FREE
  • Publisher Name:
  • Matthew Newton
  • Publisher web site:
  • http://search.cpan.org/~mcnewton/PostScript-Simple-0.07/lib/PostScript/Simple.pm

PostScript::Simple Tags


PostScript::Simple Description

PostScript::Simple is a module that can produce PostScript files from Perl. PostScript::Simple is a module that can produce PostScript files from Perl.SYNOPSIS use PostScript::Simple; # create a new PostScript object $p = new PostScript::Simple(papersize => "A4", colour => 1, eps => 0, units => "in"); # create a new page $p->newpage; # draw some lines and other shapes $p->line(1,1, 1,4); $p->linextend(2,4); $p->box(1.5,1, 2,3.5); $p->circle(2,2, 1); $p->setlinewidth( 0.01 ); $p->curve(1,5, 1,7, 3,7, 3,5); $p->curvextend(3,3, 5,3, 5,5); # draw a rotated polygon in a different colour $p->setcolour(0,100,200); $p->polygon({rotate=>45}, 1,1, 1,2, 2,2, 2,1, 1,1); # add some text in red $p->setcolour("red"); $p->setfont("Times-Roman", 20); $p->text(1,1, "Hello"); # write the output to a file $p->output("file.ps");PostScript::Simple allows you to have a simple method of writing PostScript files from Perl. It has graphics primitives that allow lines, curves, circles, polygons and boxes to be drawn. Text can be added to the page using standard PostScript fonts.The images can be single page EPS files, or multipage PostScript files. The image size can be set by using a recognised paper size ("A4", for example) or by giving dimensions. The units used can be specified ("mm" or "in", etc) and are the same as those used in TeX. The default unit is a bp, or a PostScript point, unlike TeX. Requirements: · Perl


PostScript::Simple Related Software