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

Properties common to all TextLayer style uniforms.

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

Together with one or more TextLayerStyleUniform instances contains 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. Is uploaded using TextLayer::Shared::setStyle(), style data that aren't used by the shader are passed to the function separately.

Currently this is just a placeholder with no properties.

Constructors, destructors, conversion operators

TextLayerCommonStyleUniform(DefaultInitT = DefaultInit) explicit constexpr noexcept
Construct with default values.
TextLayerCommonStyleUniform(Float smoothness) constexpr
Constructor.
TextLayerCommonStyleUniform(NoInitT) explicit noexcept
Construct without initializing the contents.

Public variables

Float smoothness
Edge smoothness radius.

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 setSmoothness(Float smoothness) -> TextLayerCommonStyleUniform& constexpr
Set the smoothness field.

Function documentation

TextLayerCommonStyleUniform& Magnum::Ui::TextLayerCommonStyleUniform::setSmoothness(Float smoothness) constexpr

Set the smoothness field.

Returns Reference to self (for method chaining)

Variable documentation

Float Magnum::Ui::TextLayerCommonStyleUniform::smoothness

Edge smoothness radius.

Used only if the text layer is created with a distance field glyph cache, ignored otherwise. In framebuffer pixels (as opposed to UI units). E.g., setting the value to 1.0f will make the smoothing extend 1 pixel on each side of the edge. Default value is 0.0f. The bigger value between this and TextLayerStyleUniform::smoothness, converted to pixels, gets used.