On 21.08.2011, at 05:02, Evan Laforge wrote: > On Sat, Aug 20, 2011 at 7:41 PM, Bill Spitzak <[email protected]> wrote: >> For 3.0 (and probably 2.0 as well) I think it is very important that the >> FLTK "color" unsigned value be changed so that it is 0xAARRGGBB, instead >> of the 0xRRGGBBAA used in FLTK2.0 (and in 1.3?). > > It would be nicer if it were a real type instead of a number. Of > course it makes sense to store it internally in whatever format other > libraries use for efficient conversion, but this should be an internal > matter, to enable an efficient 'uint32 to_argb()' method.
The reason for rrggbbxx is simple: Forms used indexed colors in xx, and there was no alpha channel at all. The rrggbb part was added in an afterthought. Back at Forms times, almost all graphics cards had no more than 8 bit per pixel! going from rrggbbxx to aarrggbb will finally get rid of all indexed color code (we still may have to keep an internal table), and hopefully finally give us alpha values. I am all for it. Creating its own type for color is ok with a typedef, but changing it from an underlying uint32 wold be insanely inefficient, considering that a color vaue is needed in every graphics call. - Matthias _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
