HSVA quad (for hue, saturation, value and alpha)
More...
#include <color_spaces.h>
HSVA quad (for hue, saturation, value and alpha)
Definition at line 34 of file color_spaces.h.
◆ hsva_t() [1/12]
Constructs an HSVA quad from r, g, b, a values.
Definition at line 40 of file color_spaces.h.
48 h = ((
b -
r) / C + 2) / 6;
50 h = ((
r -
g) / C + 4) / 6;
51 s =
v > 0 ? C /
v : 0;
CustomPoint< numeric > min(const CustomPoint< numeric > &a, const CustomPoint< numeric > &b)
CustomPoint< numeric > max(const CustomPoint< numeric > &a, const CustomPoint< numeric > &b)
float modf(float x, float y)
jobject jlong jint jint jint jint g
jobject jlong jint jint jint jint jint b
jobject jlong jint jint jint r
◆ hsva_t() [2/12]
Beatmup::Color::hsva_t::hsva_t |
( |
| ) |
|
|
inline |
◆ hsva_t() [3/12]
Beatmup::Color::hsva_t::hsva_t |
( |
const color3i & |
_ | ) |
|
|
inline |
◆ hsva_t() [4/12]
Beatmup::Color::hsva_t::hsva_t |
( |
const color4i & |
_ | ) |
|
|
inline |
◆ hsva_t() [5/12]
Beatmup::Color::hsva_t::hsva_t |
( |
const color3f & |
_ | ) |
|
|
inline |
Definition at line 91 of file color_spaces.h.
91 :
hsva_t((
float)_.r / 255, (
float)_.g / 255, (
float)_.b / 255) {}
◆ hsva_t() [6/12]
Beatmup::Color::hsva_t::hsva_t |
( |
const color4f & |
_ | ) |
|
|
inline |
Definition at line 92 of file color_spaces.h.
92 :
hsva_t((
float)_.r / 255, (
float)_.g / 255, (
float)_.b / 255) {}
◆ hsva_t() [7/12]
Beatmup::Color::hsva_t::hsva_t |
( |
const pixfloat1 & |
_ | ) |
|
|
inline |
◆ hsva_t() [8/12]
Beatmup::Color::hsva_t::hsva_t |
( |
const pixfloat3 & |
_ | ) |
|
|
inline |
◆ hsva_t() [9/12]
Beatmup::Color::hsva_t::hsva_t |
( |
const pixfloat4 & |
_ | ) |
|
|
inline |
◆ hsva_t() [10/12]
Beatmup::Color::hsva_t::hsva_t |
( |
const pixint1 & |
_ | ) |
|
|
inline |
◆ hsva_t() [11/12]
Beatmup::Color::hsva_t::hsva_t |
( |
const pixint3 & |
_ | ) |
|
|
inline |
Definition at line 108 of file color_spaces.h.
108 :
hsva_t((
float)_.r / 255, (
float)_.g / 255, (
float)_.b / 255) {}
◆ hsva_t() [12/12]
Beatmup::Color::hsva_t::hsva_t |
( |
const pixint4 & |
_ | ) |
|
|
inline |
Definition at line 110 of file color_spaces.h.
110 :
hsva_t((
float)_.r / 255, (
float)_.g / 255, (
float)_.b / 255) {}
◆ operator pixfloat4()
Beatmup::Color::hsva_t::operator pixfloat4 |
( |
| ) |
const |
|
inline |
Conversion to pixfloat.
Definition at line 58 of file color_spaces.h.
60 H =
h - (long)
h + (
h >= 0 ? 0 : 1),
62 X = C*(1 - fabs(
modf(H*6, 2) - 1)),
69 else if (H < 2.0f / 6) {
72 else if (H < 3.0f / 6) {
75 else if (H < 4.0f / 6) {
78 else if (H < 5.0f / 6) {
The documentation for this struct was generated from the following file: