[GRASS-dev] display/drivers/HTMLMAP status

Glynn Clements glynn at gclements.plus.com
Wed Feb 14 22:25:30 EST 2007


Hamish wrote:

> (no time to run some time trials on your patch yet)
> 
> > One thing I have since noticed is that the existing method clips to
> > the current graphics frame, whereas R_polygon_abs() doesn't (the core
> > R_* functions only clip to the screen; they don't understand frames).
> > 
> > It's possible that was the reason for the current mechanism.
> > 
> > In any case, it would be straightforward to add an option to d.vect to
> > choose between G_plot_polygon(), R_polygon_abs() and the new
> > D_polygon() and D_polygon_clip() functions for rendering filled
> > polygons. All of those except for G_plot_polygon would work with the
> > HTMLMAP driver.
> > 
> > So, I intend to add such an option, and to resurrect the HTMLMAP
> > driver.
> 
> Should it be a compile time #ifdef or a module flag? ie if it will be
> removed later on it might be better to hide it from the user during
> development. On the otherhand it gets less testing that way. shrug.

I've added a render= option to d.vect; valid values are:

	g	G_plot_polygon	(default)
	r	R_polygon_abs
	d	D_polygon
	c	D_polygon_clip

The descriptions simply says "Rendering method for filled polygons",
with no explanation. I considered adding "(developer use only)", but
figured that will only encourage people to try it.

g or c will clip to the current frame, while r and d won't. r, d, and
c should all work with the HTMLMAP driver (which is now working).

My earlier patch essentially hard-codes the r behaviour, so that's
redundant now.

The relative speed of various options in actual use would be
interesting, although the actual results will vary substantially
depending upon the data, the "screen" (window/image) size, the driver,
etc.

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




More information about the grass-dev mailing list