#include <color.h>
Public Methods | |
Color (float r=1, float g=1, float b=1, float a=1) | |
Color (float *color) | |
~Color () | |
void | set (float r=-1, float g=-1, float b=-1, float a=-1) |
void | set (float *color) |
const float * | RGBA () |
float | r () |
float | g () |
float | b () |
float | a () |
Color | operator * (const Color &c) |
Color | operator+ (const Color &c) |
Color | operator- (const Color &c) |
Color | operator= (const Color &c) |
Private Methods | |
void | clamp () |
Private Attributes | |
float | rgba [4] |
|
Create new colour with initial RGBA values. All values are clamped between 0.0 and 1.0.
|
|
Create new colour with initial RGBA values. All values are clamped between 0.0 and 1.0. Vales are copied from array of 4 floats.
|
|
Destructor.
|
|
Return RGBA-values in array of four floats.
|
|
Return alpha value.
|
|
Return blue value.
|
|
Clamp RGBA values between 0.0 and 1.0.
|
|
Return green value.
|
|
Multiply color values with other Color.
|
|
Add color values with other Color.
|
|
Subtract color values with other Color.
|
|
Equal operator.
|
|
Return red value.
|
|
Set new RGBA-values, value -1 doesn't modify existing value. Values are read from array of four floats.
|
|
Set new RGBA-values, value -1 doesn't modify existing value.
|
|
|