Skip to main content

GradientStyle

The GradientStyle struct defines the properties for a gradient, including the radius, length, center, axis, and two colors that define the gradient appearance.

#include <interface/TellusimTypes.h>

Constructors

GradientStyle()
GradientStyle(const Color &c0, const Color &c1)
GradientStyle(float32_t radius, const Vector2f &center)
GradientStyle(float32_t length, const Vector2f &center, const Vector2f &axis)
GradientStyle(float32_t radius, const Vector2f &center, const Color &c0, const Color &c1)
GradientStyle(float32_t length, const Vector2f &center, const Vector2f &axis, const Color &c0, const Color &c1)

Methods

Check style.

bool isValid() const
operator bool() const

Variables

TypeNameValueDescription
float32_tradius0.0fGradient radius.
float32_tlength0.0fGradient length.
Vector2fcenterVector2f::zeroGradient center.
Vector2faxisVector2f::zeroGradient axis.
Colorcolor_0Color::whiteFirst color.
Colorcolor_1Color::blackSecond color.