#include <color.h>
Public Methods | |
float | Redf () const |
Color accessor, for OpenGL. | |
void | Set (U8 _red, U8 _green, U8 _blue, U8 _alpha=255) |
Set all the members at once - a convenience method. | |
void | FromString (const char *str) |
Reads a color in the rrggbbaa or rrggbb format. More... |
This may be the greatest number of interpretations of the least amount of data.
Color is one byte each of red, green, blue, and alpha. Sometimes its useful to think of these as bytes (the components), sometimes as an array, and sometimes as one 32 bit value. This is accomplisted, of course, with a union.
Nothing is guarenteed about the order of red, green, blue, and alpha, and ifdefs may be used to change this on various systems.
In order to access the color that you want via 'array', an enumeration is defined.
Addtionally, assuming no system will ever have the alpha in between the other colors, you can iterate through 'array' from START to < END to get all the colors without alpha.
|
Reads a color in the rrggbbaa or rrggbb format. Used for parsing the XML files. |