Magnum::Ui::TextLayerStyleUniform struct new in Git master

TextLayer style uniform

See the TextLayer class documentation for information about setting up an instance of the text layer and using it.

Instances of this class together with TextLayerCommonStyleUniform contain style properties that are used by the TextLayer shaders to draw the layer data, packed in a form that allows direct usage in uniform buffers. Total count of styles is specified with the TextLayer::Shared::Configuration::Configuration() constructor, uniforms are then uploaded using TextLayer::Shared::setStyle(), style data that aren't used by the shader are passed to the function separately. If dynamic styles are enabled with TextLayer::Shared::Configuration::setDynamicStyleCount(), instances of this class are also passed to TextLayer::setDynamicStyle() and variants.

Constructors, destructors, conversion operators

TextLayerStyleUniform(DefaultInitT = DefaultInit) explicit constexpr noexcept
Construct with default values.
TextLayerStyleUniform(const Color4& color) constexpr
Constructor.
TextLayerStyleUniform(NoInitT) explicit noexcept
Construct without initializing the contents.

Public variables

Color4 color
Color.

Convenience setters

Provided to allow the use of method chaining for populating a structure in a single expression, otherwise equivalent to accessing the fields directly. Also guaranteed to provide backwards compatibility when packing of the actual fields changes.

auto setColor(const Color4& color) -> TextLayerStyleUniform& constexpr
Set the color field.

Function documentation

TextLayerStyleUniform& Magnum::Ui::TextLayerStyleUniform::setColor(const Color4& color) constexpr

Set the color field.

Returns Reference to self (for method chaining)

Variable documentation

Color4 Magnum::Ui::TextLayerStyleUniform::color

Color.

Default value is 0xffffffff_srgbaf. The color multiplies the glyph texture and is further multiplied with per-data value supplied with TextLayer::setColor() and node opacity coming from AbstractUserInterface::setNodeOpacity().