in reply to Re^2: shading boxes using PostScript::Simple
in thread shading boxes using PostScript::Simple

Thanks for the help. The example shown doesn't show the box on the screen, but I was able to get it to work. I need a box with a black border and filled grey. I assume I should just draw it twice and set the color differently in between:
use PostScript::Simple; # create a new PostScript object $p = new PostScript::Simple(papersize => "A4", colour => 1, eps => 0, units => "pt"); # create a new page $p->newpage; #select black to do border $p->setcolour("black"); $p->box(10,10,50,50); #select a shade of grey $p->setcolour("grey50"); $p->box( {filled => 1}, 10,10,50,50); $p->output("file.ps");