Hamish wrote:
> > Is a new D_number_to_RGB(int color, unsigned char &r,&g,&b) fn
> > needed in lib/display/tran_colr.c?
Glynn:
> Yes. E.g.:
> 
> int D_color_number_to_RGB(int color, int *r, int *g, int *b)
> {
>     const struct color_rgb *c;
> 
>     if (color <= 0)
>         return 0;
> 
>     if (color >= ncolors)
>         return 0;
> 
>     c = &colors[color];
>     r = c->r;
>     g = c->g;
>     b = c->b;
> 
>     return 1;
> }


there is a problem: for some reason ncolors's value is 0 so the fn
always returns 0.


Hamish



      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to