|
libRocket
|
#include <Colour.h>
Public Member Functions | |
| Colour () | |
| Lightweight, non-initialising constructor. More... | |
| Colour (ColourType red, ColourType green, ColourType blue, ColourType alpha=AlphaDefault) | |
| Colour | operator+ (const Colour &rhs) const |
| Colour | operator- (const Colour &rhs) const |
| Colour | operator* (const Colour &rhs) const |
| Colour | operator* (float rhs) const |
| Colour | operator/ (float rhs) const |
| void | operator+= (const Colour &rhs) |
| void | operator-= (const Colour &rhs) |
| void | operator*= (const Colour &rhs) |
| void | operator*= (float rhs) |
| void | operator/= (float rhs) |
| bool | operator== (const Colour &rhs) |
| bool | operator!= (const Colour &rhs) |
| operator const ColourType * () const | |
| operator ColourType * () | |
| template<> | |
| Colour< float, 1 > ROCKETCORE_API | operator* (const Colour< float, 1 > &rhs) const |
| template<> | |
| Colour< byte, 255 > ROCKETCORE_API | operator* (const Colour< byte, 255 > &rhs) const |
| template<> | |
| void ROCKETCORE_API | operator*= (const Colour &rhs) |
| template<> | |
| void ROCKETCORE_API | operator*= (const Colour &rhs) |
Public Attributes | |
| ColourType | red |
| ColourType | green |
| ColourType | blue |
| ColourType | alpha |
Templated class for a four-component RGBA colour.
|
inline |
Lightweight, non-initialising constructor.
|
inline |
Initialising constructor.
| [in] | red | Initial red value of the colour. |
| [in] | green | Initial green value of the colour. |
| [in] | blue | Initial blue value of the colour. |
| [in] | alpha | Initial alpha value of the colour. |
|
inline |
Constant auto-cast operator.
|
inline |
Auto-cast operator.
|
inline |
Inequality operator.
| [in] | rhs | The colour to compare this against. |
| Colour Rocket::Core::Colour< ColourType, AlphaDefault >::operator* | ( | const Colour< ColourType, AlphaDefault > & | rhs | ) | const |
Returns the result of multiplying this colour by another.
| [in] | rhs | The colour to multiply by. |
|
inline |
Returns the result of multiplying this colour component-wise by a scalar.
| [in] | rhs | The scalar value to multiply by. |
| Colour< float, 1 > ROCKETCORE_API Rocket::Core::Colour< float, 1 >::operator* | ( | const Colour< float, 1 > & | rhs | ) | const |
| Colour< byte, 255 > ROCKETCORE_API Rocket::Core::Colour< byte, 255 >::operator* | ( | const Colour< byte, 255 > & | rhs | ) | const |
| void Rocket::Core::Colour< ColourType, AlphaDefault >::operator*= | ( | const Colour< ColourType, AlphaDefault > & | rhs | ) |
Multiplies this colour component-wise with another in-place.
| [in] | rhs | The colour to multiply by. |
|
inline |
Scales this colour component-wise in-place.
| [in] | rhs | The value to scale this colours's components by. |
| void ROCKETCORE_API Rocket::Core::Colour< float, 1 >::operator*= | ( | const Colour< ColourType, AlphaDefault > & | rhs | ) |
| void ROCKETCORE_API Rocket::Core::Colour< byte, 255 >::operator*= | ( | const Colour< ColourType, AlphaDefault > & | rhs | ) |
|
inline |
Returns the sum of this colour and another. This does not saturate the channels.
| [in] | rhs | The colour to add this to. |
|
inline |
Adds another colour to this in-place. This does not saturate the channels.
| [in] | rhs | The colour to add. |
|
inline |
Returns the result of subtracting another colour from this colour.
| [in] | rhs | The colour to subtract from this colour. |
|
inline |
Subtracts another colour from this in-place.
| [in] | rhs | The colour to subtract. |
|
inline |
Returns the result of dividing this colour component-wise by a scalar.
| [in] | rhs | The scalar value to divide by. |
|
inline |
Scales this colour component-wise in-place by the inverse of a value.
| [in] | rhs | The value to divide this colour's components by. |
|
inline |
Equality operator.
| [in] | rhs | The colour to compare this against. |
| ColourType Rocket::Core::Colour< ColourType, AlphaDefault >::alpha |
| ColourType Rocket::Core::Colour< ColourType, AlphaDefault >::blue |
| ColourType Rocket::Core::Colour< ColourType, AlphaDefault >::green |
| ColourType Rocket::Core::Colour< ColourType, AlphaDefault >::red |
1.8.8