> 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.

typedef doesn't actually create a new type.  A real type should be
just as efficient as a number, and C++ was specifically designed to
support this:

class Color {
private:
  uint32 val;
public:
  uint32 argb() const { return val; } // to pass to other libraries, OS, etc.
  ... // methods that apply to colors, not numbers
}

As far as I can tell, there are no cons, and plenty of pros.

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to