[GRASS5] R_line_width()

Huidae Cho grass4u at gmail.com
Tue Aug 9 13:00:46 EDT 2005

You're right. The first version was drawing two vertical lines at a
time. But the horizontal width of line (point) was not correct
(linewidth"+1").  Well, who cares about this extra one pixel, but it was
little fat horizontally. If I add one more vertical pixel to avoid this
problem, a line looked even fatter in both x-y direction.

With the PNG driver, if line width is not that big, it seems working at
reasonable speed. However, if you have a good idea, please let me know.

Thank you.
Huidae Cho

On Tue, Aug 09, 2005 at 03:57:11PM +0100, Glynn Clements wrote:
> Huidae Cho wrote:
> > I added 'int R_line_width(int width)' to the raster library. This
> > changes line width for Draw_line().
> The implementation in the PNG driver is massively inefficient (calls
> acos() and tan() once per pixel). A more sensible approach would just
> draw multiple, parallel single-pixel lines.
> -- 
> Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list