[GRASS-dev] d.out.file now talks to the PostScript driver
hamish_nospam at yahoo.com
Mon May 14 10:09:58 CEST 2007
I added PostScript support to d.out.file, and also did a bit of cleanup
in the script along the way. It seems to work very nicely.
For an example see the d.out.file help page.
Also new in d.out.file is a size=width,height option for setting
GRASS_WIDTH and GRASS_HEIGHT.
One thing that I wanted to add was EPS support. To do that I'd just
apply a little patch to the start of the output file:
+%%BoundingBox: 0 0 $GRASS_WIDTH $GRASS_HEIGHT
According to this page, EPS doesn't like the "erasepage" and "initclip"
operators, which the PS driver uses.
Can this be solved with awk magic or must the file be rejigged?
It would sure be nice if the PS driver could act like the PNG driver
does for ppm files if it detects an .eps extension to GRASS_PSFILE.
I don't mind a little awk in d.out.file, but native eps support would
be much nicer for general use. I'd prefer not to have to rely on a 3rd
party dependancy (ps2epsi) for this simple task-- using GRASS_WIDTH and
GRASS_HEIGHT with GRASS_PAPER undefined gets us 95% of the way to .eps
d.vect.chart updated to use D_polygon(). I notice D_polygon() leads to
round(), which rounds away from zero (ie ceil() for positive pixel
values). Would it help with exact map placement to use floor(0.5+float x),
or round(float x -0.5)? I didn't bother to update other calls to
G_plot_polygon() as they weren't relevant to the PS driver & don't seem
to have much of a future anyway.
Various driver man pages updated to mention the existance of the other
Outstanding issues: PS driver is still missing description.html and the
HTML-map's help page + example needs updating for GRASS 6. Preferably
with a working spearfish example.
Also, FYI, d.out.png now displays a warning about impending removal.
More information about the grass-dev