[GRASS-dev] Re: gis.m: how to create high-resolution graphics file ?

Glynn Clements glynn at gclements.plus.com
Thu May 25 05:24:56 EDT 2006


Hamish wrote:

> > With res= >1 though, the rescaling of the map decorations and text is
> > strange.
> 
> Grid lines, etc, will still only be drawn 1 pixel wide, so on resize
> they tend to disappear.

Yep. This is one of the most fundamental problems with the display
architecture.

It isn't easily fixed, either. Once you go beyond single-pixel lines,
you have to start dealing with joins and caps, and you have to
distinguish between a path consisting of multiple line segments and a
sequence of separate lines.

One of my longer term plans is to migrate d.* commands away from the
low-level R_* commands to the relatively higher-level D_* commands,
and to add more primitives[1]. That would make it practical for the
display library to (optionally) generate PostScript rather than use
its own renderer.

[1] Adding new primitives is a lot easier if you just have to add a
function to a library, rather than (as is the case at present) add the
R_* function to lib/raster/protocol.c, add the opcode to
include/graphics.h, add a new case to display/drivers/lib/command.c,
add implementations to display/drivers/{PNG,XDRIVER}, add a
dispatch-table entry to display/drivers/lib/driver.h, and initialise
the entries in display/drivers/{PNG,XDRIVER}/main.c.]

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list