Color class used in vertex arrays and has layout of 4 x GLfloat.
More...
#include <Color.h>
|
| Color () |
| Default constructor initializing with a black color.
|
|
| Color (const QColor &color) |
| Constructor for Qt QColor.
|
|
| Color (const QColor &color, float alpha) |
| Constructor for Qt QColor with a different alpha value.
|
|
| Color (const Color &color, GLfloat alpha) |
| Initializing constructor copying a color but setting a different alpha value.
|
|
| Color (float r, float g, float b, float a=1.0f) |
| Initializing constructor for separate rgba values.
|
|
| operator const float * () const |
| Gets the float pointer and allows omitting a call for the #data() method.
|
|
| operator float * () |
| Gets the float pointer and allows omitting a call for the #data() method.
|
|
Color | inverted () const |
|
bool | isZero () const |
| Checks if the all values are zero.
|
|
| operator QColor () const |
| Conversion operator when passing this class where a QColor is needed.
|
|
Color & | operator= (QColor color) |
| Assignment operator accepting a QColor instance.
|
|
Color class used in vertex arrays and has layout of 4 x GLfloat.
◆ Color() [1/5]
sf::xgl::Color::Color |
( |
| ) |
|
Default constructor initializing with a black color.
◆ Color() [2/5]
sf::xgl::Color::Color |
( |
const QColor & |
color | ) |
|
|
explicit |
Constructor for Qt QColor.
◆ Color() [3/5]
sf::xgl::Color::Color |
( |
const QColor & |
color, |
|
|
float |
alpha |
|
) |
| |
|
explicit |
Constructor for Qt QColor with a different alpha value.
◆ Color() [4/5]
sf::xgl::Color::Color |
( |
const Color & |
color, |
|
|
GLfloat |
alpha |
|
) |
| |
Initializing constructor copying a color but setting a different alpha value.
- Parameters
-
color | Copy color. |
alpha | Alpha transparency value between 0 and 1 where 0 is fully transparent. |
◆ Color() [5/5]
sf::xgl::Color::Color |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a = 1.0f |
|
) |
| |
Initializing constructor for separate rgba values.
- Parameters
-
r | Red value between 0 and 1. |
g | Green value between 0 and 1. |
b | Blue value between 0 and 1. |
a | Alpha transparency value between 0 and 1 where 0 is fully transparent. |
◆ inverted()
Color sf::xgl::Color::inverted |
( |
| ) |
const |
◆ isZero()
bool sf::xgl::Color::isZero |
( |
| ) |
const |
Checks if the all values are zero.
- Returns
- True when zero.
◆ operator const float *()
sf::xgl::Color::operator const float * |
( |
| ) |
const |
Gets the float pointer and allows omitting a call for the #data() method.
◆ operator float *()
sf::xgl::Color::operator float * |
( |
| ) |
|
Gets the float pointer and allows omitting a call for the #data() method.
◆ operator QColor()
sf::xgl::Color::operator QColor |
( |
| ) |
const |
Conversion operator when passing this class where a QColor is needed.
◆ operator=()
Color & sf::xgl::Color::operator= |
( |
QColor |
color | ) |
|
Assignment operator accepting a QColor instance.
The documentation for this class was generated from the following file: