|
|
Donner
C++20 SVG rendering library
|
Systems are the core of the ECS architecture. More...
Classes | |
| class | donner::svg::components::FilterSystem |
| Handles parsing and instantiating SVG filter effects from the SVG DOM. More... | |
| class | donner::svg::components::LayoutSystem |
| Handles layout and bounds calculations for SVG elements. More... | |
| class | donner::svg::components::PaintSystem |
| Manages Paint Servers for gradients and patterns, handling style and structural inheritance and creating "computed" state and shadow trees for these elements. More... | |
| class | donner::svg::components::ShadowTreeSystem |
| Instantiates shadow trees for elements that are not part of the main render graph, such as "<use>" and "<pattern>" elements. More... | |
| class | donner::svg::components::ShapeSystem |
| Creates computed path for shapes such as "<circle>", "<line>", and "<path>". More... | |
| class | donner::svg::components::StyleSystem |
| Computes stylesheet information for elements, applying the CSS cascade and inheritance rules. More... | |
| class | donner::svg::components::TextSystem |
| System to compute text layout spans from raw text and positioning attributes. More... | |
Systems are the core of the ECS architecture.
They contain the logic and are responsible for updating the components of entities.
Systems may depend on other systems, however there are no circular dependencies.
graph LR
LayoutSystem
ShapeSystem
StyleSystem
PaintSystem
ShadowTreeSystem
FilterSystem
ShapeSystem --> LayoutSystem
ShapeSystem --> StyleSystem
LayoutSystem --> StyleSystem
PaintSystem --> StyleSystem
| class donner::svg::components::FilterSystem |
Handles parsing and instantiating SVG filter effects from the SVG DOM.
Public Member Functions | |
| void | createComputedFilter (EntityHandle handle, const FilterComponent &component, std::vector< ParseError > *outWarnings) |
| Create ComputedFilterComponent for the given entity, applying style information and style inheritance. | |
| void | instantiateAllComputedComponents (Registry ®istry, std::vector< ParseError > *outWarnings) |
| Create all ComputedFilterComponent in the tree. | |
| void donner::svg::components::FilterSystem::createComputedFilter | ( | EntityHandle | handle, |
| const FilterComponent & | component, | ||
| std::vector< ParseError > * | outWarnings ) |
Create ComputedFilterComponent for the given entity, applying style information and style inheritance.
| handle | Entity handle to apply the filter to. |
| component | Filter effect for the current entity, so that this may only be called if one is present. |
| outWarnings | Warnings generated during parsing. |
| void donner::svg::components::FilterSystem::instantiateAllComputedComponents | ( | Registry & | registry, |
| std::vector< ParseError > * | outWarnings ) |
Create all ComputedFilterComponent in the tree.
| registry | Registry to operate on. |
| outWarnings | Warnings generated during parsing. |
| class donner::svg::components::LayoutSystem |
Handles layout and bounds calculations for SVG elements.
This system is responsible for calculating the the document size, viewBoxes, and the bounds for elements.
Public Types | |
| enum class | InvalidSizeBehavior { ZeroSize , ReturnDefault } |
| Controls the behavior of LayoutSystem::calculateCanvasScaledDocumentSize for invalid sizes. More... | |
Public Member Functions | |
Regular properties | |
| std::optional< float > | intrinsicAspectRatio (EntityHandle entity) const |
| Calculate the intrinsic aspect ratio per https://svgwg.org/svg2-draft/coords.html#SizingSVGInCSS, which defines how content is scaled to fit the viewport. | |
| Vector2i | calculateDocumentSize (Registry ®istry) const |
| Calculate the document size of the current entity. | |
| Boxd | getViewBox (EntityHandle entity) |
| Get the viewBox affecting the current entity. | |
| bool | overridesViewBox (EntityHandle entity) const |
| Returns true if the given entity overrides the viewBox. | |
| Vector2i | calculateCanvasScaledDocumentSize (Registry ®istry, InvalidSizeBehavior behavior) const |
| Get the document size scaled to fit the canvas. | |
| Transformd | getRawEntityFromParentTransform (EntityHandle entity) |
| Returns the entityFromParent transform without modifiers (e.g. | |
| Transformd | getEntityFromParentTransform (EntityHandle entity) |
| Returns the entityFromParent transform with modifiers. | |
| Transformd | getDocumentFromCanvasTransform (Registry ®istry) |
| Get the scale transform from the canvas to the SVG document. | |
| Transformd | getEntityContentFromEntityTransform (EntityHandle entity) |
| Get the transform for entityContent-from-entity, which is an additional transform for specific elements that define their own coordinate system, such as nested "<svg>" and "<use>" elements. | |
| void | setRawEntityFromParentTransform (EntityHandle entity, const Transformd &entityFromParent) |
| Set the entityFromParent transform for the current entity. | |
| const ComputedAbsoluteTransformComponent & | getAbsoluteTransformComponent (EntityHandle entity) |
| Get the computed absolute transform for the current entity. | |
| Transformd | getEntityFromWorldTransform (EntityHandle entity) |
| Get the entity-from-world transform for the current entity, representing the entity position relative to the world after applying all parent transformations. | |
| void | invalidate (EntityHandle entity) |
| Invalidate cached state for the current entity, such as the computed viewBox and entity-from-world transform. | |
Computed properties | |
| void | instantiateAllComputedComponents (Registry ®istry, std::vector< ParseError > *outWarnings) |
| Create all computed components, such as ComputedViewBoxComponent and ComputedSizedElementComponent. | |
| Boxd | computeSizeProperties (EntityHandle entity, const SizedElementProperties &sizeProperties, const std::map< RcString, parser::UnparsedProperty > &unparsedProperties, const Boxd &viewBox, FontMetrics fontMetrics, std::vector< ParseError > *outWarnings) |
| Evaluates SizedElementProperties and returns the resulting bounds, using precomputed style information. | |
| bool | createShadowSizedElementComponent (Registry ®istry, Entity shadowEntity, EntityHandle useEntity, Entity symbolEntity, ShadowBranchType branchType, std::vector< ParseError > *outWarnings) |
| Creates a ComputedShadowSizedElementComponent for shadow trees where a parent element's size properties should override target element's size properties (e.g., use element overriding symbol element's size). | |
| const ComputedSizedElementComponent & | createComputedSizedElementComponentWithStyle (EntityHandle handle, const ComputedStyleComponent &style, FontMetrics fontMetrics, std::vector< ParseError > *outWarnings) |
| Creates a ComputedSizedElementComponent for the linked entity, using precomputed style information. | |
| const ComputedLocalTransformComponent & | createComputedLocalTransformComponentWithStyle (EntityHandle handle, const ComputedStyleComponent &style, const FontMetrics &fontMetrics, std::vector< ParseError > *outWarnings) |
| Creates a ComputedLocalTransformComponent for the linked entity, using precomputed style information. | |
| std::optional< Boxd > | clipRect (EntityHandle handle) const |
| If this element establishes a clipping context, returns the clip rect in the parent's coordinate system. | |
| Transformd | elementContentFromViewBoxTransform (EntityHandle handle, const ComputedSizedElementComponent &computedSizedElement) const |
| Computes the elementContent-from-viewBox transform (using dest-from-source notation), from the from the parent's coordinate system (resized to the viewBox of this element) to the element's coordinate system for children (content). | |
|
strong |
Controls the behavior of LayoutSystem::calculateCanvasScaledDocumentSize for invalid sizes.
| Enumerator | |
|---|---|
| ZeroSize | Return a size of 0x0. |
| ReturnDefault | Return the default document size (512x512). |
| Vector2i donner::svg::components::LayoutSystem::calculateCanvasScaledDocumentSize | ( | Registry & | registry, |
| InvalidSizeBehavior | behavior ) const |
Get the document size scaled to fit the canvas.
| registry | ECS registry |
| behavior | Controls the behavior when the document size is invalid, either returning a default size or empty box. |
Calculate the document size of the current entity.
This is the size of the document viewBox (the area that the SVG content is rendered into).
| registry | ECS registry |
| std::optional< Boxd > donner::svg::components::LayoutSystem::clipRect | ( | EntityHandle | handle | ) | const |
If this element establishes a clipping context, returns the clip rect in the parent's coordinate system.
| handle | Entity handle. |
| Boxd donner::svg::components::LayoutSystem::computeSizeProperties | ( | EntityHandle | entity, |
| const SizedElementProperties & | sizeProperties, | ||
| const std::map< RcString, parser::UnparsedProperty > & | unparsedProperties, | ||
| const Boxd & | viewBox, | ||
| FontMetrics | fontMetrics, | ||
| std::vector< ParseError > * | outWarnings ) |
Evaluates SizedElementProperties and returns the resulting bounds, using precomputed style information.
| entity | Entity handle. |
| sizeProperties | Size properties to evaluate. |
| unparsedProperties | Unparsed properties to evaluate. |
| viewBox | ViewBox to use when converting size percentages. |
| fontMetrics | Font metrics, used to scale lengths. |
| outWarnings | Output vector of parse errors, if any. |
| const ComputedLocalTransformComponent & donner::svg::components::LayoutSystem::createComputedLocalTransformComponentWithStyle | ( | EntityHandle | handle, |
| const ComputedStyleComponent & | style, | ||
| const FontMetrics & | fontMetrics, | ||
| std::vector< ParseError > * | outWarnings ) |
Creates a ComputedLocalTransformComponent for the linked entity, using precomputed style information.
| handle | Entity handle. |
| style | Precomputed style information for this element |
| fontMetrics | Font metrics, used to scale lengths |
| outWarnings | Output vector of parse errors, if any. |
| const ComputedSizedElementComponent & donner::svg::components::LayoutSystem::createComputedSizedElementComponentWithStyle | ( | EntityHandle | handle, |
| const ComputedStyleComponent & | style, | ||
| FontMetrics | fontMetrics, | ||
| std::vector< ParseError > * | outWarnings ) |
Creates a ComputedSizedElementComponent for the linked entity, using precomputed style information.
| handle | Entity handle. |
| style | Precomputed style information for this element |
| fontMetrics | Font metrics, used to scale lengths |
| outWarnings | Output vector of parse errors, if any. |
| bool donner::svg::components::LayoutSystem::createShadowSizedElementComponent | ( | Registry & | registry, |
| Entity | shadowEntity, | ||
| EntityHandle | useEntity, | ||
| Entity | symbolEntity, | ||
| ShadowBranchType | branchType, | ||
| std::vector< ParseError > * | outWarnings ) |
Creates a ComputedShadowSizedElementComponent for shadow trees where a parent element's size properties should override target element's size properties (e.g., use element overriding symbol element's size).
| registry | ECS registry. |
| shadowEntity | The shadow entity to create a computed component for. |
| useEntity | The source "<use>" that may provide size override. |
| symbolEntity | The target "<symbol>" entity whose properties might be overridden. |
| branchType | The type of branch being created. |
| outWarnings | Output vector of parse errors, if any. |
| Transformd donner::svg::components::LayoutSystem::elementContentFromViewBoxTransform | ( | EntityHandle | handle, |
| const ComputedSizedElementComponent & | computedSizedElement ) const |
Computes the elementContent-from-viewBox transform (using dest-from-source notation), from the from the parent's coordinate system (resized to the viewBox of this element) to the element's coordinate system for children (content).
| handle | Entity handle. |
| computedSizedElement | Precomputed sized element information. |
| const ComputedAbsoluteTransformComponent & donner::svg::components::LayoutSystem::getAbsoluteTransformComponent | ( | EntityHandle | entity | ) |
Get the computed absolute transform for the current entity.
This is the same as getEntityFromWorldTransform except it returns the component containing additional flags as well.
| entity | Current entity. |
| Transformd donner::svg::components::LayoutSystem::getDocumentFromCanvasTransform | ( | Registry & | registry | ) |
Get the scale transform from the canvas to the SVG document.
| registry | ECS registry |
| Transformd donner::svg::components::LayoutSystem::getEntityContentFromEntityTransform | ( | EntityHandle | entity | ) |
Get the transform for entityContent-from-entity, which is an additional transform for specific elements that define their own coordinate system, such as nested "<svg>" and "<use>" elements.
This transform is used to convert coordinates from the entity's coordinate system to the coordinate system of its content.
For example, a nested SVG element, where for the inner SVG element the content transform is scale(2) translate(50 50):
| entity | Current entity. |
| Transformd donner::svg::components::LayoutSystem::getEntityFromParentTransform | ( | EntityHandle | entity | ) |
Returns the entityFromParent transform with modifiers.
| entity | Current entity. |
| Transformd donner::svg::components::LayoutSystem::getEntityFromWorldTransform | ( | EntityHandle | entity | ) |
Get the entity-from-world transform for the current entity, representing the entity position relative to the world after applying all parent transformations.
| entity | Current entity. |
| Transformd donner::svg::components::LayoutSystem::getRawEntityFromParentTransform | ( | EntityHandle | entity | ) |
Returns the entityFromParent transform without modifiers (e.g.
not including transform-origin)
| entity | Current entity. |
| Boxd donner::svg::components::LayoutSystem::getViewBox | ( | EntityHandle | entity | ) |
Get the viewBox affecting the current entity.
This may be the viewBox of a viewBox-defining parent element or the document viewBox.
| entity | Current entity. |
| void donner::svg::components::LayoutSystem::instantiateAllComputedComponents | ( | Registry & | registry, |
| std::vector< ParseError > * | outWarnings ) |
Create all computed components, such as ComputedViewBoxComponent and ComputedSizedElementComponent.
| registry | ECS registry. |
| outWarnings | Output vector of parse errors, if any. |
| std::optional< float > donner::svg::components::LayoutSystem::intrinsicAspectRatio | ( | EntityHandle | entity | ) | const |
Calculate the intrinsic aspect ratio per https://svgwg.org/svg2-draft/coords.html#SizingSVGInCSS, which defines how content is scaled to fit the viewport.
This may return std::nullopt if the aspect ratio is not defined.
| entity | Current entity. |
| void donner::svg::components::LayoutSystem::invalidate | ( | EntityHandle | entity | ) |
Invalidate cached state for the current entity, such as the computed viewBox and entity-from-world transform.
| entity | Current entity. |
| bool donner::svg::components::LayoutSystem::overridesViewBox | ( | EntityHandle | entity | ) | const |
Returns true if the given entity overrides the viewBox.
| entity | Current entity. |
| void donner::svg::components::LayoutSystem::setRawEntityFromParentTransform | ( | EntityHandle | entity, |
| const Transformd & | entityFromParent ) |
Set the entityFromParent transform for the current entity.
This will be transformed with modifiers such as transform-origin before being applied to the entity.
| entity | Current entity. |
| entityFromParent | New transform. |
| class donner::svg::components::PaintSystem |
Manages Paint Servers for gradients and patterns, handling style and structural inheritance and creating "computed" state and shadow trees for these elements.
Public Member Functions | |
| const ComputedStopComponent & | createComputedStop (EntityHandle handle, const StopComponent &stop, std::vector< ParseError > *outWarnings) |
| Create a ComputedStopComponent for the given entity handle and its attached StopComponent, which applies CSS styling information and presentation attributes. | |
| void | instantiateAllComputedComponents (Registry ®istry, std::vector< ParseError > *outWarnings) |
| Create ComputedGradientComponent for all entities in the registry that have a GradientComponent. | |
| void | createShadowTrees (Registry ®istry, std::vector< ParseError > *outWarnings) |
| Create shadow trees for all gradient and pattern elements in the registry that have a valid href="" attribute. | |
| const ComputedStopComponent & donner::svg::components::PaintSystem::createComputedStop | ( | EntityHandle | handle, |
| const StopComponent & | stop, | ||
| std::vector< ParseError > * | outWarnings ) |
Create a ComputedStopComponent for the given entity handle and its attached StopComponent, which applies CSS styling information and presentation attributes.
| handle | Entity handle to create the computed gradient for |
| stop | Stop component attached to handle |
| outWarnings | Containing any warnings found |
| void donner::svg::components::PaintSystem::createShadowTrees | ( | Registry & | registry, |
| std::vector< ParseError > * | outWarnings ) |
Create shadow trees for all gradient and pattern elements in the registry that have a valid href="" attribute.
This must be called before instantiateAllComputedComponents.
| registry | Registry used to find all GradientComponent and PatternComponent components to compute shadow trees |
| outWarnings | Containing any warnings found |
| void donner::svg::components::PaintSystem::instantiateAllComputedComponents | ( | Registry & | registry, |
| std::vector< ParseError > * | outWarnings ) |
Create ComputedGradientComponent for all entities in the registry that have a GradientComponent.
This assumes that createShadowTrees has already been called.
Note that this function does not produce any warnings, its signature is used to create a common API pattern.
| registry | Registry used to find all GradientComponent |
| outWarnings | Containing any warnings found |
| class donner::svg::components::ShadowTreeSystem |
Instantiates shadow trees for elements that are not part of the main render graph, such as "<use>" and "<pattern>" elements.
Public Member Functions | |
| ShadowTreeSystem (ShadowSizedElementHandler sizedElementHandler=nullptr) | |
| Constructor. | |
| void | teardown (Registry ®istry, ComputedShadowTreeComponent &shadow) |
| Destroy the instantiated shadow tree. | |
| std::optional< size_t > | populateInstance (EntityHandle entity, ComputedShadowTreeComponent &shadow, ShadowBranchType branchType, Entity lightTarget, const RcString &href, std::vector< ParseError > *outWarnings) |
| Create a new computed shadow tree instance, such as the shadow tree for a "<use>" element or a "<pattern>" element. | |
|
inlineexplicit |
Constructor.
| sizedElementHandler | Optional callback for handling sized elements in shadow trees. |
| std::optional< size_t > donner::svg::components::ShadowTreeSystem::populateInstance | ( | EntityHandle | entity, |
| ComputedShadowTreeComponent & | shadow, | ||
| ShadowBranchType | branchType, | ||
| Entity | lightTarget, | ||
| const RcString & | href, | ||
| std::vector< ParseError > * | outWarnings ) |
Create a new computed shadow tree instance, such as the shadow tree for a "<use>" element or a "<pattern>" element.
For "<pattern>" paint servers, there may be multiple shadow trees originating from the same entity, for both a 'fill' and a 'stroke', so this component can hold multiple shadow trees simultaneously.
| entity | The entity to create the shadow tree for. |
| shadow | The computed shadow tree component to populate. |
| branchType | Determines which branch of the tree to attach to. There may be multiple instances with a shadow tree, but only ShadowBranchType::Main will be traversed in the render tree. |
| lightTarget | Target entity to reflect in the shadow tree. |
| href | The value of the href attribute for the shadow tree, for diagnostics. |
| outWarnings | If provided, warnings will be added to this vector. |
branchType is not the ShadowBranchType::Main branch. Returns std::nullopt if it is. | void donner::svg::components::ShadowTreeSystem::teardown | ( | Registry & | registry, |
| ComputedShadowTreeComponent & | shadow ) |
Destroy the instantiated shadow tree.
| registry | The registry. |
| shadow | The computed shadow tree component to tear down. |
| class donner::svg::components::ShapeSystem |
Creates computed path for shapes such as "<circle>", "<line>", and "<path>".
Public Member Functions | |
| template<typename T> | |
| ComputedPathComponent * | createComputedPath (EntityHandle handle, const T &component, const FontMetrics &fontMetrics, std::vector< ParseError > *outWarnings) |
| Convert the given shape to a path, evaluating CSS styling information and presentation attributes. | |
| ComputedPathComponent * | createComputedPathIfShape (EntityHandle handle, const FontMetrics &fontMetrics, std::vector< ParseError > *outWarnings) |
| Convert the given shape to a path, if the provided entity contains a shape. | |
| void | instantiateAllComputedPaths (Registry ®istry, std::vector< ParseError > *outWarnings) |
| Create ComputedPathComponent for all entities in the registry that have a shape component. | |
| std::optional< Boxd > | getShapeBounds (EntityHandle handle) |
| Get the bounds for the given entity in the entity's local space, if it has a shape component. | |
| std::optional< Boxd > | getShapeWorldBounds (EntityHandle handle) |
| Get the bounds for the given entity in world space, if it has a shape component. | |
| bool | pathFillIntersects (EntityHandle handle, const Vector2d &point, FillRule fillRule) |
| Returns true if the shape's path fill intersects the given point. | |
| bool | pathStrokeIntersects (EntityHandle handle, const Vector2d &point, double strokeWidth) |
| Returns true if the shape's path stroke intersects the given point, using an approximate computation from the stroke-width. | |
|
inline |
Convert the given shape to a path, evaluating CSS styling information and presentation attributes.
Returns the ComputedPathComponent if the path was successfully created, or nullptr if the path could not be created.
Paths may not be created if the shape is invalid, such as a circle with a negative radius.
Suported components:
| handle | Entity handle to create the computed path for |
| component | Shape component attached to handle |
| fontMetrics | Font metrics, used to scale lengths |
| outWarnings | Containing any warnings found |
| ComputedPathComponent * donner::svg::components::ShapeSystem::createComputedPathIfShape | ( | EntityHandle | handle, |
| const FontMetrics & | fontMetrics, | ||
| std::vector< ParseError > * | outWarnings ) |
Convert the given shape to a path, if the provided entity contains a shape.
Returns the ComputedPathComponent if the path was successfully created, or nullptr if the path could not be created.
Paths may not be created if the shape is invalid, such as a circle with a negative radius.
| handle | Entity handle to create the computed path for |
| fontMetrics | Font metrics, used to scale lengths |
| outWarnings | Containing any warnings found |
| std::optional< Boxd > donner::svg::components::ShapeSystem::getShapeBounds | ( | EntityHandle | handle | ) |
Get the bounds for the given entity in the entity's local space, if it has a shape component.
| handle | Entity handle to get the bounds for |
| std::optional< Boxd > donner::svg::components::ShapeSystem::getShapeWorldBounds | ( | EntityHandle | handle | ) |
Get the bounds for the given entity in world space, if it has a shape component.
| handle | Entity handle to get the bounds for |
| void donner::svg::components::ShapeSystem::instantiateAllComputedPaths | ( | Registry & | registry, |
| std::vector< ParseError > * | outWarnings ) |
Create ComputedPathComponent for all entities in the registry that have a shape component.
This assumes that StyleSystem::computeAllStyles has already been called.
| registry | Registry used to find all shape components |
| outWarnings | Containing any warnings found |
| bool donner::svg::components::ShapeSystem::pathFillIntersects | ( | EntityHandle | handle, |
| const Vector2d & | point, | ||
| FillRule | fillRule ) |
Returns true if the shape's path fill intersects the given point.
| handle | Entity handle containing the shape |
| point | Point to intersect |
| fillRule | Fill rule to use for the intersection test |
| bool donner::svg::components::ShapeSystem::pathStrokeIntersects | ( | EntityHandle | handle, |
| const Vector2d & | point, | ||
| double | strokeWidth ) |
Returns true if the shape's path stroke intersects the given point, using an approximate computation from the stroke-width.
| handle | Entity handle containing the shape |
| point | Point to intersect |
| strokeWidth | Stroke width to use for the intersection test |
| class donner::svg::components::StyleSystem |
Computes stylesheet information for elements, applying the CSS cascade and inheritance rules.
Public Member Functions | |
| const ComputedStyleComponent & | computeStyle (EntityHandle handle, std::vector< ParseError > *outWarnings) |
| Compute the style for the given entity handle, applying the CSS cascade and inheritance rules. | |
| void | computeAllStyles (Registry ®istry, std::vector< ParseError > *outWarnings) |
| Computes the style for all entities in the registry. | |
| void | computeStylesFor (Registry ®istry, std::span< const Entity > entities, std::vector< ParseError > *outWarnings) |
| Computes the style for the given entities in the registry. | |
| void | invalidateComputed (EntityHandle handle) |
| Invalidate the computed style for a given entity. | |
| void | invalidateAll (EntityHandle handle) |
| Invalidate the full style and reparse attributes. | |
| void donner::svg::components::StyleSystem::computeAllStyles | ( | Registry & | registry, |
| std::vector< ParseError > * | outWarnings ) |
Computes the style for all entities in the registry.
| registry | Registry to compute the styles, used to query for all entities in the tree. |
| outWarnings | Containing any warnings found |
| const ComputedStyleComponent & donner::svg::components::StyleSystem::computeStyle | ( | EntityHandle | handle, |
| std::vector< ParseError > * | outWarnings ) |
Compute the style for the given entity handle, applying the CSS cascade and inheritance rules.
| handle | Entity handle to compute the style for |
| outWarnings | Containing any warnings found |
| void donner::svg::components::StyleSystem::computeStylesFor | ( | Registry & | registry, |
| std::span< const Entity > | entities, | ||
| std::vector< ParseError > * | outWarnings ) |
Computes the style for the given entities in the registry.
| registry | Registry containing the entities |
| entities | Entities to compute |
| outWarnings | Containing any warnings found |
| void donner::svg::components::StyleSystem::invalidateAll | ( | EntityHandle | handle | ) |
Invalidate the full style and reparse attributes.
| handle | Entity handle to invalidate |
| void donner::svg::components::StyleSystem::invalidateComputed | ( | EntityHandle | handle | ) |
Invalidate the computed style for a given entity.
| handle | Entity handle to invalidate |
| class donner::svg::components::TextSystem |
System to compute text layout spans from raw text and positioning attributes.
Public Member Functions | |
| void | instantiateAllComputedComponents (Registry ®istry, std::vector< ParseError > *outWarnings) |
| Instantiate computed text spans for all entities with TextComponent. | |
| void donner::svg::components::TextSystem::instantiateAllComputedComponents | ( | Registry & | registry, |
| std::vector< ParseError > * | outWarnings ) |
Instantiate computed text spans for all entities with TextComponent.
| registry | The registry to instantiate the computed text spans for. |
| outWarnings | If non-null, a vector to store any warnings that occur during the instantiation. |