32 #include "../../Display/2D/color.h"
33 #include "style_value_type.h"
34 #include "style_dimension.h"
71 return _value.float_value.number;
87 return _value.float_value.dimension;
97 return Colorf(_value.color[0], _value.color[1], _value.color[2], _value.color[3]);
value is a percentage number
static StyleGetValue from_angle(float angle, StyleDimension dimension=StyleDimension::rad)
Create style value from an angle.
Definition: style_get_value.h:150
Floating point color description class (for float).
Definition: color.h:660
static StyleGetValue from_string(const char *text)
Create style value from a string.
Definition: style_get_value.h:144
float number() const
Value number.
Definition: style_get_value.h:60
turns (1 in a full circle)
gradians/gons/grades (400 in a full circle)
static StyleGetValue from_color(const Colorf &color)
Create style value from a color.
Definition: style_get_value.h:171
StyleDimension dimension() const
Dimension used by value.
Definition: style_get_value.h:78
static StyleGetValue from_keyword(const char *keyword)
Create style value from a keyword.
Definition: style_get_value.h:141
bool is_color() const
Check if value is a color.
Definition: style_get_value.h:138
StyleDimension dimension
Definition: style_get_value.h:182
bool is_frequency() const
Check if value is a frequency.
Definition: style_get_value.h:120
bool is_percentage() const
Check if value is a percentage.
Definition: style_get_value.h:126
static StyleGetValue from_length(float length, StyleDimension dimension=StyleDimension::px)
Create style value from a length.
Definition: style_get_value.h:147
bool is_undefined() const
Check if value is undefined.
Definition: style_get_value.h:103
bool is_keyword() const
Check if value is a keyword.
Definition: style_get_value.h:106
const char * text() const
Text when the type is a text string.
Definition: style_get_value.h:46
Type a
Definition: vec4.h:83
bool is_string() const
Check if value is a string.
Definition: style_get_value.h:132
float number
Definition: style_get_value.h:181
Type r
Definition: vec4.h:80
StyleValueType type() const
Variant type.
Definition: style_get_value.h:43
bool is_number() const
Check if value is a number.
Definition: style_get_value.h:129
static StyleGetValue from_resolution(float resolution, StyleDimension dimension=StyleDimension::dppx)
Create style value from a resolution.
Definition: style_get_value.h:159
Colorf color() const
Value color.
Definition: style_get_value.h:94
StyleDimension
Unit of a style value.
Definition: style_dimension.h:34
float color[4]
Definition: style_get_value.h:184
Style value returned by style classes.
Definition: style_get_value.h:39
static StyleGetValue from_time(float t, StyleDimension dimension=StyleDimension::s)
Create style value from a time.
Definition: style_get_value.h:153
bool is_keyword(const char *keyword) const
Definition: style_get_value.h:107
bool is_url() const
Check if value is an url.
Definition: style_get_value.h:135
StyleValueType
Style value type.
Definition: style_value_type.h:34
const char * text
Definition: style_get_value.h:178
bool is_angle() const
Check if value is an angle.
Definition: style_get_value.h:114
static StyleGetValue from_percentage(float percentage)
Create style value from a percentage.
Definition: style_get_value.h:162
bool is_resolution() const
Check if value is a resolution.
Definition: style_get_value.h:123
static StyleGetValue from_number(float number)
Create style value from a number.
Definition: style_get_value.h:165
bool is_keyword(const std::string &keyword) const
Definition: style_get_value.h:108
Type b
Definition: vec4.h:82
bool is_length() const
Check if value is a length.
Definition: style_get_value.h:111
bool is_time() const
Check if value is a time.
Definition: style_get_value.h:117
static StyleGetValue from_frequency(float freq, StyleDimension dimension=StyleDimension::hz)
Create style value from a frequency.
Definition: style_get_value.h:156
struct clan::StyleGetValue::@27::@28 float_value
Type g
Definition: vec4.h:81
static StyleGetValue from_url(const char *url)
Create style value from an url.
Definition: style_get_value.h:168