TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::ColorStop Struct Reference

Color stops for gradients. More...

#include <gui_core/style/gui_style_gradient.h>

Public Member Functions

bool operator== (const ColorStop &other) const noexcept=default
ColorStop & SetColor (color4b newColor)
ColorStop & SetColor (color4f newColor)
 Clamps each channel to 0..1 and stores it as 8 bits.
ColorStop & SetOffset (float newOffset)
 Position along the gradient, 0..1 (clamped); stored as 16 bits.
float GetOffset () const
 Position along the gradient, 0..1.
color4f GetColor4f () const
 The color as 0..1 floats.
color4b GetColor4b () const

Detailed Description

Color stops for gradients.

Member Function Documentation

◆ operator==()

bool tachyon::ColorStop::operator== ( const ColorStop & other) const
defaultnoexcept

◆ SetColor() [1/2]

ColorStop & tachyon::ColorStop::SetColor ( color4b newColor)
inline

◆ SetColor() [2/2]

ColorStop & tachyon::ColorStop::SetColor ( color4f newColor)
inline

Clamps each channel to 0..1 and stores it as 8 bits.

◆ SetOffset()

ColorStop & tachyon::ColorStop::SetOffset ( float newOffset)
inline

Position along the gradient, 0..1 (clamped); stored as 16 bits.

◆ GetOffset()

float tachyon::ColorStop::GetOffset ( ) const
inline

Position along the gradient, 0..1.

◆ GetColor4f()

color4f tachyon::ColorStop::GetColor4f ( ) const
inline

The color as 0..1 floats.

◆ GetColor4b()

color4b tachyon::ColorStop::GetColor4b ( ) const
inline

The documentation for this struct was generated from the following file: