A fill: solid color, gradient or texture, as used for backgrounds, borders, text and icons.
More...
#include <gui_core/style/gui_style.h>
|
| static ColorStyle | Create (color4b color) |
| | A SolidColor style.
|
| static ColorStyle | Create (color4f color) |
| | A SolidColor style.
|
| static ColorStyle | Create (color4b c0, color4b c1, ColorType type) |
| | Two stops at 0 and 1.
|
| static ColorStyle | Create (color4f c0, color4f c1, ColorType type) |
| | Two stops at 0 and 1.
|
| static ColorStyle | Create (color4b c0, color4b c1, color4b c2, ColorType type) |
| | Three stops at 0, 0.5 and 1.
|
| static ColorStyle | Create (color4f c0, color4f c1, color4f c2, ColorType type) |
| | Three stops at 0, 0.5 and 1.
|
| static ColorStyle | Create (color4b c0, color4b c1, color4b c2, color4b c3, ColorType type) |
| | Four stops at 0, 0.25, 0.5 and 1.
|
| static ColorStyle | Create (color4f c0, color4f c1, color4f c2, color4f c3, ColorType type) |
| | Four stops at 0, 0.25, 0.5 and 1.
|
| static ColorStyle | Create (Gradient gradient, ColorType type) |
| | Any gradient with any type.
|
|
| static constexpr int16_t | one = 15360 |
| | 1.0 as a half float
|
A fill: solid color, gradient or texture, as used for backgrounds, borders, text and icons.
Register it with StyleManager (inside a Style, or with RegisterColorStyle) to get the GPU-side VisualColorStyle.
◆ SetTransformation()
| void tachyon::ColorStyle::SetTransformation |
( |
float3 | x, |
|
|
float3 | y ) |
Sets the 2x3 transform applied to gradient coordinates, row by row.
◆ SetAnimSpeed()
| void tachyon::ColorStyle::SetAnimSpeed |
( |
float | x, |
|
|
float | y = 0.0f ) |
Scroll speed over time: x along the gradient (or texture U), y texture V.
◆ GetTransformation()
| float3x2 tachyon::ColorStyle::GetTransformation |
( |
| ) |
const |
The 2x3 gradient transform as floats.
◆ GetFirstColor()
| color4b tachyon::ColorStyle::GetFirstColor |
( |
| ) |
const |
|
inlinenoexcept |
The first stop's color, which is all of a SolidColor; transparent without stops.
◆ ToVisualStyle()
Bakes the GPU-facing style and acquires its atlas slot.
The caller owns outHandle and must Release it (or hand it to RegisterVisualColorStyle). Texture types return an invalid handle.
◆ Create() [1/9]
◆ Create() [2/9]
◆ Create() [3/9]
Two stops at 0 and 1.
The color overloads build the gradient like Gradient::Linear; the type can't be SolidColor or one that takes another color count (InterpolatedTriangle takes 3, InterpolatedBox 4).
◆ Create() [4/9]
◆ Create() [5/9]
Three stops at 0, 0.5 and 1.
◆ Create() [6/9]
Three stops at 0, 0.5 and 1.
◆ Create() [7/9]
Four stops at 0, 0.25, 0.5 and 1.
◆ Create() [8/9]
Four stops at 0, 0.25, 0.5 and 1.
◆ Create() [9/9]
Any gradient with any type.
◆ one
| int16_t tachyon::ColorStyle::one = 15360 |
|
staticconstexpr |
◆ gradient
| Gradient tachyon::ColorStyle::gradient {} |
colors; SolidColor uses the first stop
◆ transformationX
| short4 tachyon::ColorStyle::transformationX = { one, 0, 0, 0 } |
first row of the 2x3 gradient transform (half floats)
◆ transformationY
| short4 tachyon::ColorStyle::transformationY = { 0, one, 0, 0 } |
second row of the 2x3 gradient transform (half floats)
◆ type
◆ animSpeed
| short2 tachyon::ColorStyle::animSpeed = { 0, 0 } |
half floats, see SetAnimSpeed
The documentation for this class was generated from the following file: