|
|
Donner 0.5.0
Embeddable browser-grade SVG2 engine
|
#include <entt/entt.hpp>#include <vector>#include "donner/base/Box.h"#include "donner/base/Vector2.h"#include "donner/base/Path.h"#include "donner/svg/text/TextTypes.h"Classes | |
| struct | donner::svg::components::ComputedTextGeometryComponent |
| Cached geometry for text layout and text-derived public API queries. More... | |
| struct | donner::svg::components::ComputedTextGeometryComponent::GlyphGeometry |
| Outline geometry for a single rendered glyph. More... | |
| struct | donner::svg::components::ComputedTextGeometryComponent::CharacterGeometry |
| Cached geometry for one addressable character. 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::ComputedTextGeometryComponent |
Cached geometry for text layout and text-derived public API queries.
Attached to the root <text> entity and populated from the shared text engine. This stores per-glyph outlines and per-character metrics so DOM APIs can answer geometry queries without duplicating text layout logic.
| Class Members | ||
|---|---|---|
| vector< CharacterGeometry > | characters | Cached character metrics in logical order. |
| Box2d | emBoxBounds | Union of em-box bounds used for text bbox. |
| vector< GlyphGeometry > | glyphs | Cached glyph outlines for the text root. |
| Box2d | inkBounds | Union of glyph ink bounds. |
| vector< TextRun > | runs | Cached layout runs for renderer reuse. |
| struct donner::svg::components::ComputedTextGeometryComponent::GlyphGeometry |
Outline geometry for a single rendered glyph.
| Class Members | ||
|---|---|---|
| Box2d | extent | Ink bounds in text-element local coordinates. |
| Path | path | Glyph outline in text-element local coordinates. |
| entity | sourceEntity = entt::null | Span source entity that owns this glyph. |
| struct donner::svg::components::ComputedTextGeometryComponent::CharacterGeometry |
Cached geometry for one addressable character.
| Class Members | ||
|---|---|---|
| double | advance = 0.0 | Advance magnitude. |
| Vector2d | endPosition = Vector2d::Zero() | Character end position in local coords. |
| Box2d | extent = Box2d() | Character ink bounds in local coords. |
| bool | hasExtent = false | True if extent contains real glyph bounds. |
| bool | rendered = false | True if any glyph geometry was produced. |
| double | rotation = 0.0 | Rotation in degrees. |
| entity | sourceEntity = entt::null | Source entity that owns this character. |
| Vector2d | startPosition = Vector2d::Zero() | Character start position in local coords. |