|
|
Donner
C++20 SVG rendering library
|
#include "donner/base/Length.h"#include "donner/base/RcString.h"#include "donner/base/SmallVector.h"Classes | |
| struct | donner::svg::components::ComputedTextComponent |
| Pre‑computed layout information for a text subtree. More... | |
| struct | donner::svg::components::ComputedTextComponent::TextSpan |
| A contiguous slice of text with fully resolved layout attributes. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
| namespace | donner::svg |
| Donner SVG library, which can load, manipulate and render SVG files. | |
| namespace | donner::svg::components |
| Contains the implementation of the Donner ECS,. | |
| struct donner::svg::components::ComputedTextComponent |
Pre‑computed layout information for a text subtree.
A ComputedTextComponent is attached by the layout system to the root "<text>" element after all "<text>", "<tspan>", and xml_textPath descendants have been resolved. It stores the final, absolute positions for each contiguous slice of text, allowing the renderer to iterate quickly without re‑evaluating attribute vectors on every frame.
The component contains a single public field, spans, which is the computed list of text spans.
| Class Members | ||
|---|---|---|
| SmallVector< TextSpan, 1 > | spans | |
| struct donner::svg::components::ComputedTextComponent::TextSpan |
A contiguous slice of text with fully resolved layout attributes.
Offsets start and end refer to UTF-8 byte positions into the parent string stored in text. All coordinate and rotation values are given in the user coordinate system and already include any inherited transformations from ancestor "<text>" elements.
| Class Members | ||
|---|---|---|
| Lengthd | dx | Relative X shift applied to the span. |
| Lengthd | dy | Relative Y shift applied to the span. |
| size_t | end |
Byte index (exclusive) one past the last code unit of the span within text. |
| double | rotateDegrees = 0.0 | Rotation applied to each glyph in the span (degrees). |
| size_t | start |
Byte index (inclusive) of the first code unit of the span within text. |
| RcString | text | Back‑reference to the original text for this span. |
| Lengthd | x | Absolute X position for the first glyph of the span. |
| Lengthd | y | Absolute Y baseline position for the span. |