[GRASS5] embedding GRASS display into my app

Glynn Clements glynn.clements at virgin.net
Thu Apr 8 01:47:33 EDT 2004


David Piasecki wrote:

> Thanks. I think the greatest amount of time is spent on drawing the 
> 13MB vector file, but I might give it a shot. It might be more 
> noticeable with smaller file sizes.

Yes; since adding that option to the PNG driver, I've found that for
typical image sizes (e.g. 800x600x24bpp), the compression time isn't
really significant (on a P3/800).

For large vector files, I suspect that the biggest gains would come
from:

1. Calling the system's drawing functions (XDrawLine, gdk_draw_line
etc) directly from your application.

2. Only drawing the sections of the map which need to be redrawn, i.e. 
the bounding rectangle of anything which may have changed.

OTOH, if using e.g. d.vect plus XDRIVER/PNGdriver is adequate, writing
system("d.vect ...") is a lot less code than re-implementing it.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list