Color class used in vertex arrays and a layout of 4 x GLfloat.
More...
#include <Color.h>
|
| | Color () |
| | Default constructor initializing with a black color.
|
| |
| | Color (bool) |
| | Constructor using a boolean to distinguish itself. Create a zero color used to signal the shader program to use the default set color for the rendering of the vertex array.
|
| |
| | 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 from the base class.
|
| |
| | operator float * () |
| | Gets the float pointer and allows omitting a call for the data() method from the base class.
|
| |
| 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 a layout of 4 x GLfloat.
◆ Color() [1/6]
| sf::xgl::Color::Color |
( |
| ) |
|
Default constructor initializing with a black color.
◆ Color() [2/6]
| sf::xgl::Color::Color |
( |
bool |
| ) |
|
Constructor using a boolean to distinguish itself. Create a zero color used to signal the shader program to use the default set color for the rendering of the vertex array.
◆ Color() [3/6]
| sf::xgl::Color::Color |
( |
const QColor & |
color | ) |
|
|
explicit |
Constructor for Qt QColor.
◆ Color() [4/6]
| sf::xgl::Color::Color |
( |
const QColor & |
color, |
|
|
float |
alpha |
|
) |
| |
|
explicit |
Constructor for Qt QColor with a different alpha value.
◆ Color() [5/6]
| 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() [6/6]
| 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 from the base class.
◆ operator float *()
| sf::xgl::Color::operator float * |
( |
| ) |
|
Gets the float pointer and allows omitting a call for the data() method from the base class.
◆ 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: