#include <App/Material.h>
|
float | r |
| color values, public accessible
|
|
◆ Color() [1/3]
App::Color::Color |
( |
float |
R = 0.0 , |
|
|
float |
G = 0.0 , |
|
|
float |
B = 0.0 , |
|
|
float |
A = 0.0 |
|
) |
| |
|
explicit |
Defines the color as (R,G,B,A) whereas all values are in the range [0,1]. A defines the transparency.
◆ Color() [2/3]
App::Color::Color |
( |
uint32_t |
rgba | ) |
|
Does basically the same as the constructor above unless that (R,G,B,A) is encoded as an unsigned int.
◆ Color() [3/3]
App::Color::Color |
( |
const Color & |
c | ) |
|
◆ asCSSString()
std::string App::Color::asCSSString |
( |
| ) |
const |
◆ asHexString()
std::string App::Color::asHexString |
( |
| ) |
const |
returns color as hex color "#RRGGBB"
◆ asValue()
template<typename T >
T App::Color::asValue |
( |
void |
| ) |
const |
returns a template type e.g. Qt color equivalent to FC color
◆ fromHexString()
bool App::Color::fromHexString |
( |
const std::string & |
hex | ) |
|
gets color from hex color "#RRGGBB"
◆ getPackedValue()
uint32_t App::Color::getPackedValue |
( |
| ) |
const |
Returns color as a 32 bit packed unsigned int in the form 0xRRGGBBAA.
- See also
- setPackedValue().
◆ operator==()
bool App::Color::operator== |
( |
const Color & |
c | ) |
const |
Returns true if both colors are equal. Therefore all components must be equal.
◆ set()
void App::Color::set |
( |
float |
R, |
|
|
float |
G, |
|
|
float |
B, |
|
|
float |
A = 0.0 |
|
) |
| |
Defines the color as (R,G,B,A) whereas all values are in the range [0,1]. A defines the transparency, 0 means complete opaque and 1 invisible.
◆ setPackedValue()
Color& App::Color::setPackedValue |
( |
uint32_t |
rgba | ) |
|
Sets the color value as a 32 bit combined red/green/blue/alpha value. Each component is 8 bit wide (i.e. from 0x00 to 0xff), and the red value should be stored leftmost, like this: 0xRRGGBBAA.
- See also
- getPackedValue().
◆ setValue()
template<typename T >
void App::Color::setValue |
( |
const T & |
q | ) |
|
creates FC Color from template type, e.g. Qt QColor