#include <arcolour.h>
Public Member Functions | |
| ARColour (unsigned char r, unsigned char g, unsigned char b) | |
| Constructor for specifying red, green and blue channel components. | |
| ARColour (unsigned char r, unsigned char g, unsigned char b, unsigned char a) | |
| Constructor for specifying red, green, blue and alpha channel components. | |
| unsigned char | GetLuminance () |
| Returns the luminance of the pixel. | |
| unsigned char | GetGrey () |
| Returns a grey value equivalent of the red, green and blue channels. | |
| void | SetRGB (unsigned char r, unsigned char g, unsigned char b) |
| Helper function for setting the red, green and blue channels of the pixel. | |
Public Attributes | |
| unsigned char | red |
| The value of the red channel of the pixel. | |
| unsigned char | green |
| The value of the green channel of the pixel. | |
| unsigned char | blue |
| The value of the blue channel of the pixel. | |
| unsigned char | alpha |
| The value of the alpha channel of the pixel. | |
This data type can be used to define a colour variable or use when passing colour information as an argument. For example...
|
|
Returns a grey value equivalent of the red, green and blue channels.
Returns an average of the red, green and blue channels... Grey = (0.3333 * red) + (0.3333 * green) + (0.3333 * blue)
|
|
|
Returns the luminance of the pixel.
Uses a standard formula for calculating the luminance... Lum = (0.3 * red) + (0.59 * green) + (0.11 * blue )
|
|
||||||||||||||||
|
Helper function for setting the red, green and blue channels of the pixel.
|
1.3.9.1