[GRASS-dev] ps.map: raster always under vector map?
Glynn Clements
glynn at gclements.plus.com
Mon May 7 08:10:33 EDT 2007
Markus Neteler wrote:
> >> FWIW, what are the main advantages of ps.map over using the PS driver
> >> and d.* commands?
> >>
> >
> > I think there are a few, mainly related to ps.map already tuned to the
> > problem of hardcopy output. The PS driver would need a hardcopy-wizard
> > wrapper GUI, at least to help with the presets.
>
> One advantage of ps.map is that I can easily define the paper size.
> AFAIK that's not
> yet possible with the PS/d.* approach.
The size of the output is determined by GRASS_WIDTH and GRASS_HEIGHT,
which are interpreted in points. Setting:
GRASS_WIDTH=595 GRASS_HEIGHT=842
should give an A4 page.
Margins aren't implemented explicitly, although using d.frame is an
option; e.g.:
d.frame at=8.55,91.45,6.05,93.95
will give 0.5" left/right margins and 1.0" top/bottom margins (those
are the settings from ps/ps.map/paper.h).
One drawback of frames is that the frame's border cannot currently be
disabled (the border is drawn by D_show_window(), which is called from
several places in lib/display/window.c). Also, not all modules respect
frames.
It would be fairly straightforward to copy paper.h into the PS driver,
and allow e.g. GRASS_PAPER=a4 to override GRASS_{WIDTH,HEIGHT}, as
well as adding margins. Supporting rotation (i.e. landscape) would
also be straightforward.
I'll come up with a draft implementation today.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list