[GRASS-dev] lib fn to convert int color number to RGB values?
Ivan Shmakov
ivan at theory.asu.ru
Fri Feb 1 06:33:02 EST 2008
>>>>> Hamish <hamish_b at yahoo.com> writes:
[...]
>> s/RGB_Color/RGBA_Color/ ?
> no, the idea there was to be a shortcut for those who wanted to use
> the struct but didn't care about alpha and didn't want to cause
> confusion in the variable namespace. In those cases the alpha channel
> is ignored and treated as an unused superfluous appendage. Perhaps it
> is of dubious use, but I don't think anything actually uses it...
> you can read some earlier history of RGBA_Color here:
> http://article.gmane.org/gmane.comp.gis.grass.devel/12185/
> http://thread.gmane.org/gmane.comp.gis.grass.devel/20463/focus=20488
> http://thread.gmane.org/gmane.comp.gis.grass.devel/11789/focus=11983
> ...
Thanks for the pointers! Of the particular interest to me is
[1], proposing almost the same additions to libgis to that I've
posted recently. Why these changes weren't applied? Yes, I see
Glynn's initial concerns, but it seems that they were due to
some misconception, weren't they?
> As we should be beginning to focus on stabilizing the grass 6 source,
> I would prefer to wait for the upcoming start of grass7 before
> retooling the color handling subsystem much more. It may be crusty &
> old, but it works and known. Then we can do it once, right, instead
> of just bolting new ideas onto the legacy system.
I've dug through the code while preparing the patch, and I don't
think of `struct color_rgb' to `struct RGBA_Color' to be a big
change. The diff is only 814 lines long, but it seemingly
removes all of the references to `struct color_rgb' except for a
couple of cases in lib/.
(Surely, my patch will need a couple of `struct RGBA_Color' =>
`RGB_Color' changes, as well as some testing.)
[1] nntp://news.gmane.org/gmane.comp.gis.grass.devel/11789
(http://article.gmane.org/gmane.comp.gis.grass.devel/11789)
More information about the grass-dev
mailing list