Loading...
Searching...
No Matches
ml::RenderedSegment Struct Reference

A single styled run of text ready for rendering. More...

#include <Malena/Graphics/Text/RichTextRenderer.h>

Public Member Functions

 RenderedSegment (sf::Text &&text, std::size_t start, std::size_t end, sf::Vector2f pos)

Public Attributes

std::size_t bufEnd = 0
 Last char index in the buffer (exclusive).
std::size_t bufStart = 0
 First char index in the buffer (inclusive).
sf::Vector2f position
 Top-left position.
sf::Text sfText
 SFML text object, positioned and styled.

Detailed Description

A single styled run of text ready for rendering.

Owns an sf::Text constructed once during rebuild() and repositioned in place during reflow(). The sf::Text is never recreated after initial construction — only its position changes.

See also
RichTextRenderer

Definition at line 30 of file RichTextRenderer.h.

Constructor & Destructor Documentation

◆ RenderedSegment()

ml::RenderedSegment::RenderedSegment ( sf::Text && text,
std::size_t start,
std::size_t end,
sf::Vector2f pos )
inline

Definition at line 37 of file RichTextRenderer.h.

Member Data Documentation

◆ bufEnd

std::size_t ml::RenderedSegment::bufEnd = 0

Last char index in the buffer (exclusive).

Definition at line 34 of file RichTextRenderer.h.

◆ bufStart

std::size_t ml::RenderedSegment::bufStart = 0

First char index in the buffer (inclusive).

Definition at line 33 of file RichTextRenderer.h.

◆ position

sf::Vector2f ml::RenderedSegment::position

Top-left position.

Definition at line 35 of file RichTextRenderer.h.

◆ sfText

sf::Text ml::RenderedSegment::sfText

SFML text object, positioned and styled.

Definition at line 32 of file RichTextRenderer.h.


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