[GRASS5] Re: [GRASSLIST:10398] Re: G_plot_polygon() suggestion for vector areas
glynn at gclements.plus.com
Sun Feb 19 08:04:36 EST 2006
Huidae Cho wrote:
> Actually, I'm also curious about that. What's different between
> G_plot_* and R_* and when should we use G_plot_* instead of R_*? When
> we need automatic coordinate conversion?
> BTW, why does this make difficult to develop other drivers?
R_polygon_abs() etc just sends a "fill polygon" command to the
monitor; the driver can implement the command as it sees fit (e.g. the
HTMLMAP driver generates an <AREA SHAPE="POLY" ...> HTML tag).
G_plot_polygon() is essentially a polygon render, which relies upon a
supplied function to "draw" scans (horizontal lines). d.vect uses
D_move_abs() and D_cont_abs() to draw the lines.
All of this assumes that you can fill an area by drawing horizontal
lines. While this matches the current behaviour of the X and PNG
drivers, it prevents us from ever improving the display architecture
by getting away from a pixel-based model. E.g. lines would always have
to be one pixel wide, so that d.vect-style polygon filling works (and
a one pixel wide line on a 2400-dpi printer is invisible without the
aid of a microscope).
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev