Magnum::Text::AbstractLayouter class

Base for text layouters.

Constructors, destructors, conversion operators

AbstractLayouter(const AbstractLayouter&) deleted
Copying is not allowed.
AbstractLayouter(AbstractLayouter&&) deleted
Moving is not allowed.

Public functions

auto operator=(const AbstractLayouter&) -> AbstractLayouter& deleted
Copying is not allowed.
auto operator=(const AbstractLayouter&&) -> AbstractLayouter& deleted
Moving is not allowed.
auto glyphCount() const -> UnsignedInt
Count of glyphs in the laid out text.
auto renderGlyph(UnsignedInt i, Vector2& cursorPosition, Range2D& rectangle) -> Containers::Pair<Range2D, Range2D>
Render a glyph.

Function documentation

Containers::Pair<Range2D, Range2D> Magnum::Text::AbstractLayouter::renderGlyph(UnsignedInt i, Vector2& cursorPosition, Range2D& rectangle)

Render a glyph.

Parameters
in Glyph index
cursorPosition in/out Cursor position
rectangle in/out Bounding rectangle

The function returns a pair of quad position and texture coordinates, advances cursorPosition to next character and updates rectangle with extended bounds. Expects that i is less than glyphCount().