[GRASS5] Suggested color function names

Markus Neteler neteler at itc.it
Sun Apr 23 12:10:25 EDT 2006


On Sat, Apr 22, 2006 at 01:00:01PM +0100, Glynn Clements wrote:
> 
> Cedric Shock wrote:
> 
> > Hamish added a red, green, blue, alpha color structure to gis.h.
> > 
> > I'd like to add the following to gis.h as well:
> > 
> > /* RGBA_Color set values */
> > #define RGBA_COLOR_SET    1
> > #define RGBA_COLOR_UNSET  0
> > #define RGBA_COLOR_NONE  -1
> > 
> > I also think it would be apropos to add some more functions that deal with 
> > this structure instead of red, green, and blue integers. New functions means 
> > new names. My current best idea is adding RGBA to the existing analogous 
> > names.
> > 
> > We currently have
> > 
> > int G_str_to_color (str * name, int * red, int * green, int * blue);
> > int R_RGB_color(unsigned char,unsigned char,unsigned char);
> > int R_reset_color(unsigned char,unsigned char,unsigned char,int);
> > int R_reset_colors(int,int,unsigned char *,unsigned char *,unsigned char *);
> > 
> > How are these suggested names for new "functions":
> > 
> > int G_str_to_RGBA_color (str * name, RGBA_Color * color);
> > int R_RGBA_color(RGBA_Color * color);
> > int R_reset_RGBA_color(RGBA_Color * color, int);
> > int R_reset_colors(int,int,RGBA_Color ** colors);
> > 
> > The R_ functions would just use the existing protocol (no alpha support).
> 
> Alpha support in the current display architecture isn't going to
> happen (I reverted the last attempt to add it, and will do likewise in
> future).

... this is why I really suggest to get interested in a project
steering committee [1], [2].

Instead of recursively reverted changes of other developers,
we should come up with a design discussion and then *vote* on it.
At least for such crucidal pieces of the code I would like to 
see less anarchy and a more formal approach. This will render
development more transparent to everybody. The scope cannot be to
have two display management systems in parallel, one without
and one with alpha support.

Existing steering committees, to get inspired from:
 Mapserver: http://mapserver.gis.umn.edu/development/rfc/ms-rfc-1
 GDAL:      http://www.gdal.org/rfc1_pmc.html
 Mapbender: http://www.mapbender.org/index.php/Mapbender_PSC
 ...

Please think about it!

Thanks

 Markus

[1] http://www.grass.itc.it/pipermail/grass5/2006-February/021178.html
[2] http://grass.itc.it/pipermail/grass5/2006-April/022185.html




More information about the grass-dev mailing list