Utilities for NVGcolor
More...
|
bool | isEqual (NVGcolor a, NVGcolor b) |
|
NVGcolor | clamp (NVGcolor a) |
| Limits color components between 0 and 1.
|
|
NVGcolor | minus (NVGcolor a, NVGcolor b) |
| Subtracts color components elementwise.
|
|
NVGcolor | plus (NVGcolor a, NVGcolor b) |
| Adds color components elementwise.
|
|
NVGcolor | mult (NVGcolor a, NVGcolor b) |
| Multiplies color components elementwise.
|
|
NVGcolor | mult (NVGcolor a, float x) |
|
NVGcolor | lerp (NVGcolor a, NVGcolor b, float t) |
| Interpolates RGBA color values.
|
|
NVGcolor | screen (NVGcolor a, NVGcolor b) |
| Screen blending with alpha compositing.
|
|
NVGcolor | alpha (NVGcolor a, float alpha) |
| Multiplies alpha value.
|
|
NVGcolor | fromHexString (std::string s) |
| Converts from color hex string of the form "#RRGGBB" or "#RRGGBBAA".
|
|
std::string | toHexString (NVGcolor c) |
|
|
static const NVGcolor | BLACK_TRANSPARENT = nvgRGBA(0x00, 0x00, 0x00, 0x00) |
|
static const NVGcolor | WHITE_TRANSPARENT = nvgRGBA(0xff, 0xff, 0xff, 0x00) |
|
static const NVGcolor | BLACK = nvgRGB(0x00, 0x00, 0x00) |
|
static const NVGcolor | RED = nvgRGB(0xff, 0x00, 0x00) |
|
static const NVGcolor | GREEN = nvgRGB(0x00, 0xff, 0x00) |
|
static const NVGcolor | BLUE = nvgRGB(0x00, 0x00, 0xff) |
|
static const NVGcolor | CYAN = nvgRGB(0x00, 0xff, 0xff) |
|
static const NVGcolor | MAGENTA = nvgRGB(0xff, 0x00, 0xff) |
|
static const NVGcolor | YELLOW = nvgRGB(0xff, 0xff, 0x00) |
|
static const NVGcolor | WHITE = nvgRGB(0xff, 0xff, 0xff) |
|
◆ isEqual()
bool rack::color::isEqual |
( |
NVGcolor |
a, |
|
|
NVGcolor |
b |
|
) |
| |
◆ clamp()
NVGcolor rack::color::clamp |
( |
NVGcolor |
a | ) |
|
Limits color components between 0 and 1.
◆ minus()
NVGcolor rack::color::minus |
( |
NVGcolor |
a, |
|
|
NVGcolor |
b |
|
) |
| |
Subtracts color components elementwise.
◆ plus()
NVGcolor rack::color::plus |
( |
NVGcolor |
a, |
|
|
NVGcolor |
b |
|
) |
| |
Adds color components elementwise.
◆ mult() [1/2]
NVGcolor rack::color::mult |
( |
NVGcolor |
a, |
|
|
NVGcolor |
b |
|
) |
| |
Multiplies color components elementwise.
◆ mult() [2/2]
NVGcolor rack::color::mult |
( |
NVGcolor |
a, |
|
|
float |
x |
|
) |
| |
◆ lerp()
NVGcolor rack::color::lerp |
( |
NVGcolor |
a, |
|
|
NVGcolor |
b, |
|
|
float |
t |
|
) |
| |
Interpolates RGBA color values.
◆ screen()
NVGcolor rack::color::screen |
( |
NVGcolor |
a, |
|
|
NVGcolor |
b |
|
) |
| |
Screen blending with alpha compositing.
◆ alpha()
NVGcolor rack::color::alpha |
( |
NVGcolor |
a, |
|
|
float |
alpha |
|
) |
| |
◆ fromHexString()
NVGcolor rack::color::fromHexString |
( |
std::string |
s | ) |
|
Converts from color hex string of the form "#RRGGBB" or "#RRGGBBAA".
Returns WHITE on error.
◆ toHexString()
std::string rack::color::toHexString |
( |
NVGcolor |
c | ) |
|
◆ BLACK_TRANSPARENT
const NVGcolor rack::color::BLACK_TRANSPARENT = nvgRGBA(0x00, 0x00, 0x00, 0x00) |
|
static |
◆ WHITE_TRANSPARENT
const NVGcolor rack::color::WHITE_TRANSPARENT = nvgRGBA(0xff, 0xff, 0xff, 0x00) |
|
static |
◆ BLACK
const NVGcolor rack::color::BLACK = nvgRGB(0x00, 0x00, 0x00) |
|
static |
◆ RED
const NVGcolor rack::color::RED = nvgRGB(0xff, 0x00, 0x00) |
|
static |
◆ GREEN
const NVGcolor rack::color::GREEN = nvgRGB(0x00, 0xff, 0x00) |
|
static |
◆ BLUE
const NVGcolor rack::color::BLUE = nvgRGB(0x00, 0x00, 0xff) |
|
static |
◆ CYAN
const NVGcolor rack::color::CYAN = nvgRGB(0x00, 0xff, 0xff) |
|
static |
◆ MAGENTA
const NVGcolor rack::color::MAGENTA = nvgRGB(0xff, 0x00, 0xff) |
|
static |
◆ YELLOW
const NVGcolor rack::color::YELLOW = nvgRGB(0xff, 0xff, 0x00) |
|
static |
◆ WHITE
const NVGcolor rack::color::WHITE = nvgRGB(0xff, 0xff, 0xff) |
|
static |