Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::TextChunkRanges Class Reference

Groups the glyph outlines a renderer collects from one run by SVG text chunk, so each chunk can be painted as one shape. More...

#include "donner/svg/text/TextTypes.h"

Public Member Functions

void noteGlyph (const TextGlyph &glyph, std::size_t collected)
 Notes glyph before its outline, if any, is collected.
std::vector< std::pair< std::size_t, std::size_t > > ranges (std::size_t count) const
 Returns each chunk's half-open range of collected outlines, in order, skipping empty ones.

Detailed Description

Groups the glyph outlines a renderer collects from one run by SVG text chunk, so each chunk can be painted as one shape.

Glyphs without an outline collect nothing and are only noted.

Member Function Documentation

◆ noteGlyph()

void donner::svg::TextChunkRanges::noteGlyph ( const TextGlyph & glyph,
std::size_t collected )
inline

Notes glyph before its outline, if any, is collected.

Parameters
glyphGlyph about to be collected.
collectedNumber of outlines collected from the run so far.

◆ ranges()

std::vector< std::pair< std::size_t, std::size_t > > donner::svg::TextChunkRanges::ranges ( std::size_t count) const
inlinenodiscard

Returns each chunk's half-open range of collected outlines, in order, skipping empty ones.

Parameters
countNumber of outlines collected from the run.

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