[GRASS-dev] ps.map: raster always under vector map?

Glynn Clements glynn at gclements.plus.com
Mon May 7 12:14:43 EDT 2007

Markus Neteler wrote:

> >> 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.
> >>     
> >
> > Done. The size/margins can be set via GRASS_PAPER, while
> > GRASS_LANDSCAPE=TRUE will rotate the output.
> >   
> Cool!
> Would it make sense to move the paper definitions from
>  lib/psdriver/Graph_set.c
>  ps/ps.map/paper.h (contains more definitions)
> to
>  include/pspaper.h

Maybe, maybe not.

E.g., lib/psdriver makes the variable static (libraries should avoid
exporting unnecessary symbols), while ps.map doesn't.

If a common table of paper sizes is desired, it would be better for
libgis to provide a function, similar to the way that the table of
standard colours is handled (G_standard_color_rgb(), lib/gis/color_str.c).

Better still would be the ability to read the information from a text
file, so that new sizes can be added by the user.

I didn't add the landscape defintions because they're usually the
wrong thing to do; e.g. gv doesn't offer landscape paper sizes (except
for Ledger, which is always landscape), hardcopy typically requires an
A3 printer (even then, most printers will assume that the document is
portrait and rotate it, unless told otherwise).

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list