|
|
Donner
C++20 SVG rendering library
|
Contains the implementation of the Donner ECS,. More...
Classes | |
| struct | ClassComponent |
| Holds the value of the class attribute of an element. More... | |
| struct | ComputedClipPathsComponent |
| Stores a computed clip path, which is used to clip the rendering of an entity. More... | |
| class | ElementTypeComponent |
| Stores the parsed element type of the current entity. More... | |
| struct | EvaluatedReferenceComponent |
| Represents a reference to another entity which has been evaluated from a Reference string. More... | |
| struct | FilterComponent |
| Parameters for a "<filter>" element. More... | |
| struct | ComputedFilterComponent |
| Computed filter parameters parsed by FilterSystem, represents the resolved DOM hierarchy of a "<filter>" element. More... | |
| struct | FilterPrimitiveComponent |
| Parameters for SVGFilterPrimitiveStandardAttributes. More... | |
| struct | FEGaussianBlurComponent |
| Parameters for SVGFEGaussianBlurElement. More... | |
| class | FilterSystem |
| Handles parsing and instantiating SVG filter effects from the SVG DOM. More... | |
| struct | IdComponent |
| Holds the value of the id attribute of an element. More... | |
| class | LayoutSystem |
| Handles layout and bounds calculations for SVG elements. More... | |
| struct | SizedElementProperties |
| Stores an offset/size for elements that are positioned with x/y/width/height attributes with respect to their parent. More... | |
| struct | SizedElementComponent |
| Stores the properties of a sized element, x, y, width, height. More... | |
| struct | ComputedSizedElementComponent |
| Stores the computed bounds of a sized element, resolving units and percentages. More... | |
| struct | ComputedShadowSizedElementComponent |
| Stores a shadow tree's computed SizedElementComponent, where a "<use>" element overrides the width or height on "<symbol>" or "<svg>" which use SizedElementComponent. More... | |
| struct | SymbolComponent |
| Stores unique parameters for the "<symbol>" element. More... | |
| struct | TransformComponent |
| Stores the raw transform value set on an entity, for the transform presentation attribute. More... | |
| struct | ComputedLocalTransformComponent |
| Stores the computed transform value for an entity, relative to the parent. More... | |
| struct | ComputedAbsoluteTransformComponent |
| Stores the computed transform value for an entity, relative to the world. More... | |
| struct | ViewBoxComponent |
| A component attached to entities that have a viewBox attribute, such as "<svg>" and "<pattern>". More... | |
| struct | ComputedViewBoxComponent |
| Computed value of a viewBox for the current element. More... | |
| struct | ClipPathComponent |
| Parameters for the "<clipPath>" element. More... | |
| struct | GradientComponent |
| Common parameters for gradient elements, "<linearGradient>" and "<radialGradient>". More... | |
| struct | ComputedGradientComponent |
| Created by PaintSystem during render tree instantiation. More... | |
| struct | LinearGradientComponent |
| Parameters for a "<linearGradient>" element. More... | |
| struct | ComputedLinearGradientComponent |
| Computed properties for a "<linearGradient>" element. More... | |
| struct | MarkerComponent |
| Stores the marker data for an SVG element. More... | |
| struct | MaskComponent |
| Parameters for the "<mask>" element. More... | |
| class | PaintSystem |
| Manages Paint Servers for gradients and patterns, handling style and structural inheritance and creating "computed" state and shadow trees for these elements. More... | |
| struct | PatternComponent |
| Parameters for "<pattern>" elements which are not captured by ViewBoxComponent and SizedElementComponent. More... | |
| struct | ComputedPatternComponent |
| Computed properties for "<pattern>" elements, after resolving and inheriting values from referenced patterns. More... | |
| struct | RadialGradientComponent |
| Parameters for a "<radialGradient>" element. More... | |
| struct | ComputedRadialGradientComponent |
| Computed properties for a "<radialGradient>" element. More... | |
| struct | StopProperties |
| Parameters for a "<stop>" element. More... | |
| struct | ComputedStopComponent |
| Stores the computed properties of a "<stop>" element. More... | |
| struct | StopComponent |
| Stores the properties of a "<stop>" element. More... | |
| struct | PathLengthComponent |
| Stores a user-overridden path length on an element. More... | |
| struct | PreserveAspectRatioComponent |
| Stores the preserveAspectRatio attribute of "<svg>" and "<pattern>". More... | |
| struct | RenderingBehaviorComponent |
| Component that controls how the attached element is rendered, determines how different element types are rendered. More... | |
| struct | SubtreeInfo |
| Created on the start of a subtree, to inform the renderer about which element ends the current subtree, plus how many isolated layers need to be popped when the subtree is complete. More... | |
| struct | PaintResolvedReference |
| Contains rendering information for a paint server, such as the subtree needed if it establishes an isolated layer, and where the paint server is located. More... | |
| struct | ResolvedClipPath |
| Contains resolved information about the clip-path property, such as which element it is pointing to. More... | |
| struct | ResolvedMask |
| Contains resolved information about the mask property, such as which element it is pointing to. More... | |
| struct | ResolvedMarker |
| struct | RenderingInstanceComponent |
| An instance of the entity in the rendering tree. More... | |
| struct | FontResource |
| In-memory representation of a font resource, containing the parsed WOFF data. More... | |
| struct | ImageComponent |
| Parameters for the "<image>" element. More... | |
| struct | LoadedImageComponent |
| Loaded image resource, created from a ImageComponent. More... | |
| class | ResourceManagerContext |
| Resource manager, which handles loading resources from URLs and caching results. More... | |
| struct | ComputedShadowTreeComponent |
| An instantiated ShadowTreeComponent, which points to the roots of parallel entity trees. More... | |
| class | OffscreenShadowTreeComponent |
| Defines an offscreen shadow tree attached to the current entity (the shadow host). More... | |
| struct | ShadowEntityComponent |
| A component attached to entities in the shadow tree, indicating which light entity they are mirroring. More... | |
| struct | ShadowTreeRootComponent |
| Indicates root of an instantiated shadow tree, where the light entity is is the target of the href, e.g. More... | |
| class | ShadowTreeComponent |
| Indicates the entry point to a shadow tree, which instantiates a virtual tree of entities mirroring another entity's tree. More... | |
| class | ShadowTreeSystem |
| Instantiates shadow trees for elements that are not part of the main render graph, such as "<use>" and "<pattern>" elements. More... | |
| struct | CircleProperties |
| Properties for a "<circle>" element. More... | |
| struct | ComputedCircleComponent |
| Computed properties for a "<circle>" element, which applies values from the CSS cascade. More... | |
| struct | CircleComponent |
| Parameters for a "<circle>" element. More... | |
| struct | ComputedPathComponent |
| Stores a PathSpline used for rendering a shape, which may be generated from the parameters of shapes such as circle, rect, line, poly, and path. More... | |
| struct | EllipseProperties |
| Parameters for a "<ellipse>" element. More... | |
| struct | ComputedEllipseComponent |
| Computed properties for a "<ellipse>" element, which applies values from the CSS cascade. More... | |
| struct | EllipseComponent |
| Parameters for a "<ellipse>" element. More... | |
| struct | LineComponent |
| Parameters for a "<line>" element. More... | |
| struct | PathComponent |
| Parameters for a "<path>" element. More... | |
| struct | PolyComponent |
| Parameters for a "<polygon>" or "<polyline>" element. More... | |
| struct | RectProperties |
| Parameters for a "<rect>" element. More... | |
| struct | ComputedRectComponent |
| Computed properties for a "<rect>" element, which applies values from the CSS cascade. More... | |
| struct | RectComponent |
| Parameters for a "<rect>" element. More... | |
| class | ShapeSystem |
| Creates computed path for shapes such as "<circle>", "<line>", and "<path>". More... | |
| struct | ComputedStyleComponent |
| Contains the computed style properties for an element, which is a combination of the style="" attribute, the CSS stylesheet, and the CSS cascade where properties are inherited from the parent. More... | |
| struct | DoNotInheritFillOrStrokeTag |
| This component is added to entities to indicate that 'fill' and 'stroke' attributes should not be inherited, which is used for "<pattern>" because it establishes a shadow tree, and we do not want to recursively inherit 'fill' or 'stroke' values into the children. More... | |
| struct | StyleComponent |
| Contains properties the style="" attribute for an element, local to the element. More... | |
| class | StyleSystem |
| Computes stylesheet information for elements, applying the CSS cascade and inheritance rules. More... | |
| struct | StylesheetComponent |
| Data for a "<style>" element. More... | |
| class | SVGDocumentContext |
| Holds global state of an SVG document, such as the root element, id-to-element mapping, and the document size. More... | |
| struct | ComputedTextComponent |
| Pre‑computed layout information for a text subtree. More... | |
| struct | TextComponent |
| Defines the start of a text element, which may have other text elements as children. More... | |
| struct | TextPositioningComponent |
| Defines the positioning of a text element, which may have other text elements as children. More... | |
| struct | TextRootComponent |
| Defines the start of a text element, which may have other text elements as children. More... | |
| class | TextSystem |
| System to compute text layout spans from raw text and positioning attributes. More... | |
| class | RenderingContext |
| Rendering controller, which instantiates and and manages the rendering tree. More... | |
Typedefs | |
| using | ResolvedPaintServer |
| The resolved paint server for a fill or stroke. | |
| using | ResolvedFilterEffect = std::variant<std::vector<FilterEffect>, ResolvedReference> |
| The resolved filter effect for a filter. | |
| using | ShadowSizedElementHandler |
| Type definition for a callback to process sized elements. | |
Enumerations | |
| enum class | RenderingBehavior { Default , Nonrenderable , NoTraverseChildren , ShadowOnlyChildren } |
| Controls how the attached element is rendered, determines how different element types are rendered. More... | |
| enum class | ShadowBranchType { Main , OffscreenFill , OffscreenStroke , OffscreenMask , OffscreenMarkerStart , OffscreenMarkerMid , OffscreenMarkerEnd } |
| There are two types of shadow trees: More... | |
Functions | |
| bool | HasPaint (const ResolvedPaintServer &paint) |
| Returns true if the paint server is not a PaintServer::None. | |
Contains the implementation of the Donner ECS,.
Classes are named as follows:
Registry::ctx().| struct donner::svg::components::ClassComponent |
| struct donner::svg::components::ComputedClipPathsComponent |
Stores a computed clip path, which is used to clip the rendering of an entity.
Aggregates together all paths that compose a clip path, including nested clip paths.
| Class Members | ||
|---|---|---|
| vector< ClipPath > | clipPaths | All clip paths, in order they need to be applied based on their layer. |
| struct donner::svg::components::EvaluatedReferenceComponent |
Represents a reference to another entity which has been evaluated from a Reference string.
This is used by PaintSystem for gradients and patterns which have an href attribute for inheritance.
| ReferenceType | tag which determines which subsystem the reference is for, used to avoid collisions. |
| Class Members | ||
|---|---|---|
| typedef ReferenceType | Type ReferenceType | Tag type of this reference. |
| Class Members | ||
|---|---|---|
| EntityHandle | target | The resolved target entity of the reference. |
| struct donner::svg::components::FilterComponent |
Parameters for a "<filter>" element.
Contains the filter bounds, which determines how large the canvas needs to be when applying the filter, and filter configuration such as units for its parameters.
| Class Members | ||
|---|---|---|
| FilterUnits | filterUnits = FilterUnits::Default | The parsed value of the "filterUnits" attribute, which defines the coordinate system for the x, y, width, and height attributes of the mask. |
| optional< Lengthd > | height | Height of the filter, defaults to 120% (outside of the element itself). |
| PrimitiveUnits | primitiveUnits = PrimitiveUnits::Default | The parsed value of the "primitiveUnits" attribute, which defines the coordinate system for the various attributes of the filter effects. |
| optional< Lengthd > | width | Width of the filter, defaults to 120% (outside of the element itself). |
| optional< Lengthd > | x | The x-coordinate of the filter, defaults to -10% (outside the element itself). |
| optional< Lengthd > | y | The y-coordinate of the filter, defaults to -10% (outside the element itself). |
| struct donner::svg::components::ComputedFilterComponent |
Computed filter parameters parsed by FilterSystem, represents the resolved DOM hierarchy of a "<filter>" element.
| Class Members | ||
|---|---|---|
| vector< FilterEffect > | effectChain | Parsed list of effects, which can be chained together to create complex effects. These are evaluated in order. |
| FilterUnits | filterUnits = FilterUnits::Default | The computed filter units. |
| Lengthd | height = Lengthd(120.0, Lengthd::Unit::Percent) | The computed height of the filter. |
| PrimitiveUnits | primitiveUnits = PrimitiveUnits::Default | The computed primitive units. |
| Lengthd | width = Lengthd(120.0, Lengthd::Unit::Percent) | The computed width of the filter. |
| Lengthd | x = Lengthd(-10.0, Lengthd::Unit::Percent) | The computed x-coordinate of the filter. |
| Lengthd | y = Lengthd(-10.0, Lengthd::Unit::Percent) | The computed y-coordinate of the filter. |
| struct donner::svg::components::FilterPrimitiveComponent |
Parameters for SVGFilterPrimitiveStandardAttributes.
| Class Members | ||
|---|---|---|
| optional< Lengthd > | height | The height of the filter region. |
| optional< RcString > | result | Name of the filter primitive, which enables it to be used as a reference for subsequent filter primitives under the same "<filter>" element. |
| optional< Lengthd > | width | The width of the filter region. |
| optional< Lengthd > | x | The x-coordinate of the filter region. |
| optional< Lengthd > | y | The y-coordinate of the filter region. |
| struct donner::svg::components::FEGaussianBlurComponent |
Parameters for SVGFEGaussianBlurElement.
| Class Members | ||
|---|---|---|
| double | stdDeviationX = 0.0 | The standard deviation of the Gaussian blur in the x direction. |
| double | stdDeviationY = 0.0 | The standard deviation of the Gaussian blur in the y direction. |
| struct donner::svg::components::SizedElementComponent |
Stores the properties of a sized element, x, y, width, height.
Used for "<svg>", "<image>" and xml_foreignObject by the standard, and also internally with "<use>" for Donner.
| Class Members | ||
|---|---|---|
| bool | applyTranslationForUseElement = false | Set to true for "<use>" elements, so that x/y are applied as a translation. |
| bool | canOverrideWidthHeightForSymbol = false | Set to true for "<symbol>" elements, so that width/height are inherited from the "<use>" element. |
| SizedElementProperties | properties | The properties of the sized element, x, y, width, height. |
| struct donner::svg::components::ComputedSizedElementComponent |
Stores the computed bounds of a sized element, resolving units and percentages.
Contains the computed rect and inherited viewBox of the parent element.
| Class Members | ||
|---|---|---|
| Boxd | bounds | The computed rect of this sized element. |
| Boxd | inheritedViewBox | The viewBox of the parent element, used for preserveAspectRatio transformations. |
| struct donner::svg::components::ComputedShadowSizedElementComponent |
Stores a shadow tree's computed SizedElementComponent, where a "<use>" element overrides the width or height on "<symbol>" or "<svg>" which use SizedElementComponent.
From https://www.w3.org/TR/SVG2/struct.html#UseElement:
The width and height attributes only have an effect if the referenced element defines a viewport (i.e., if it is a 'svg' or 'symbol'); if so, a value other than auto for the 'use' element overrides the value of the corresponding geometric property on that element.
| Class Members | ||
|---|---|---|
| Boxd | bounds | The computed rect of this sized element. |
| struct donner::svg::components::SymbolComponent |
Stores unique parameters for the "<symbol>" element.
refX and refY provide a reference point (if needed) when the symbol is instantiated by a "<use>" element.
| Class Members | ||
|---|---|---|
| SizedElementProperties | properties | The properties of the sized element, x, y, width, height. |
| double | refX = 0.0 | The reference x coordinate. |
| double | refY = 0.0 | The reference y coordinate. |
| struct donner::svg::components::TransformComponent |
Stores the raw transform value set on an entity, for the transform presentation attribute.
This can be sourced from the transform="..." XML attribute, or from the transform CSS property.
| Class Members | ||
|---|---|---|
| Property< CssTransform > | transform | Value of the transform, if it is set. Defaults to std::nullopt. Represents the entity-from-parent transform. |
| struct donner::svg::components::ComputedLocalTransformComponent |
Stores the computed transform value for an entity, relative to the parent.
This resolves presentation attributes and the CSS cascade and stores the resulting value for the current entity.
| Class Members | ||
|---|---|---|
| Transformd | entityFromParent | Transform from the entity from its parent. |
| CssTransform | rawCssTransform | Raw CSS transform value, before resolving percentages relative to the viewport. |
| Vector2d | transformOrigin | Resolved transform origin in pixels. |
| struct donner::svg::components::ComputedAbsoluteTransformComponent |
Stores the computed transform value for an entity, relative to the world.
This applies the transform from the from all parent entities, and represents the transform of the entity from the root.
| Class Members | ||
|---|---|---|
| Transformd | entityFromWorld | Transform from the entity from the world. |
| bool | worldIsCanvas | |
| struct donner::svg::components::ViewBoxComponent |
A component attached to entities that have a viewBox attribute, such as "<svg>" and "<pattern>".
| Class Members | ||
|---|---|---|
| optional< Boxd > | viewBox | Stored viewBox, if any. |
| struct donner::svg::components::ComputedViewBoxComponent |
Computed value of a viewBox for the current element.
If this element does not define a viewBox, this is the viewBox of the nearest ancestor or the document itself.
| Class Members | ||
|---|---|---|
| Boxd | viewBox | The viewBox of the element, or the viewBox of the nearest ancestor. |
| struct donner::svg::components::ClipPathComponent |
Parameters for the "<clipPath>" element.
| Class Members | ||
|---|---|---|
| optional< ClipPathUnits > | clipPathUnits | The parsed value of the "clipPathUnits" attribute, which defines the coordinate system for the contents of the clip path. |
| struct donner::svg::components::GradientComponent |
Common parameters for gradient elements, "<linearGradient>" and "<radialGradient>".
When this component is present, either LinearGradientComponent or RadialGradientComponent must be present.
| Class Members | ||
|---|---|---|
| optional< GradientUnits > | gradientUnits | The parsed value of the "gradientUnits" attribute, which specifies how the coordinate system for linear/radial gradient positional attributes (such as x1, y1, cx, cy). Empty if no attribute was specified. |
| optional< Reference > | href | The parsed value of the "href" attribute, which specifies a reference to a gradient element to inherit from. |
| optional< GradientSpreadMethod > | spreadMethod | The parsed value of the "spreadMethod" attribute, which specifies how the gradient is repeated on its edges (such as spread, reflect, or repeat). Empty if no attribute was specified. |
| struct donner::svg::components::MarkerComponent |
Stores the marker data for an SVG element.
| Class Members | ||
|---|---|---|
| double | markerHeight = 3.0 | Height of the marker viewport. |
| MarkerUnits | markerUnits | Coordinate system for marker attributes and contents. |
| double | markerWidth = 3.0 | Width of the marker viewport. |
| MarkerOrient | orient | Orientation of the marker. |
| double | refX = 0.0 | X coordinate for the reference point of the marker. |
| double | refY = 0.0 | Y coordinate for the reference point of the marker. |
| struct donner::svg::components::PatternComponent |
Parameters for "<pattern>" elements which are not captured by ViewBoxComponent and SizedElementComponent.
| Class Members | ||
|---|---|---|
| optional< Reference > | href | An optional href to another pattern, which is used to inherit properties from if not by this entity. |
| optional< PatternContentUnits > | patternContentUnits |
The pattern content units of the pattern, if std::nullopt, the pattern content units are inherited from the parent or defaulted to PatternContentUnits::Default. |
| optional< PatternUnits > | patternUnits |
The pattern units of the pattern, if std::nullopt, the pattern units are inherited from the parent or defaulted to PatternUnits::Default. |
| SizedElementProperties | sizeProperties | Contains the x, y, width, and height properties of the pattern tile rectangle. |
| struct donner::svg::components::StopComponent |
Stores the properties of a "<stop>" element.
| Class Members | ||
|---|---|---|
| StopProperties | properties | The properties of the "<stop>" element. |
| struct donner::svg::components::PathLengthComponent |
| struct donner::svg::components::PreserveAspectRatioComponent |
Stores the preserveAspectRatio attribute of "<svg>" and "<pattern>".
| Class Members | ||
|---|---|---|
| PreserveAspectRatio | preserveAspectRatio | The preserveAspectRatio of the element, defaults to PreserveAspectRatio::None(). |
| struct donner::svg::components::SubtreeInfo |
Created on the start of a subtree, to inform the renderer about which element ends the current subtree, plus how many isolated layers need to be popped when the subtree is complete.
| Class Members | ||
|---|---|---|
| Entity | firstRenderedEntity | Indicates the first entity within the current subtree. The renderer will continue rendering entities until it reaches this one, then it will pop restorePopDepth isolated layers from the render state. |
| Entity | lastRenderedEntity | Indicates the last entity within the current subtree. The renderer will continue rendering entities until it reaches this one, then it will pop restorePopDepth isolated layers from the render state. |
| int | restorePopDepth = 0 | How many isolated layers to pop after rendering this entity. |
| struct donner::svg::components::PaintResolvedReference |
Contains rendering information for a paint server, such as the subtree needed if it establishes an isolated layer, and where the paint server is located.
| Class Members | ||
|---|---|---|
| optional< Color > | fallback | Fallback color to use if this paint fails to instantiate. This can happen for various reasons, such as if a gradient has no stops (making it invalid). |
| ResolvedReference | reference | Reference to the paint server element. |
| optional< SubtreeInfo > | subtreeInfo | If this paint server creates a subtree, such as for patterns, contains subtree info to inform the renderer how to render it. |
| struct donner::svg::components::FontResource |
In-memory representation of a font resource, containing the parsed WOFF data.
| Class Members | ||
|---|---|---|
| WoffFont | font | The parsed WOFF font data. |
| struct donner::svg::components::ImageComponent |
| struct donner::svg::components::LoadedImageComponent |
Loaded image resource, created from a ImageComponent.
| Class Members | ||
|---|---|---|
| optional< ImageResource > | image | Loaded image resource. |
| struct donner::svg::components::ShadowEntityComponent |
A component attached to entities in the shadow tree, indicating which light entity they are mirroring.
This component exists on every shadow entity, forming a one-to-one mapping between shadow entities and light entities.
| Class Members | ||
|---|---|---|
| Entity | lightEntity | The entity that this shadow entity is mirroring. |
| struct donner::svg::components::ShadowTreeRootComponent |
Indicates root of an instantiated shadow tree, where the light entity is is the target of the href, e.g.
a "<symbol>" element.
| Class Members | ||
|---|---|---|
| Entity | sourceEntity | The entity of the source (e.g. "<use>") element that instantiated this shadow tree. |
| struct donner::svg::components::CircleComponent |
Parameters for a "<circle>" element.
| Class Members | ||
|---|---|---|
| CircleProperties | properties | The properties for the circle. |
| struct donner::svg::components::EllipseComponent |
Parameters for a "<ellipse>" element.
| Class Members | ||
|---|---|---|
| EllipseProperties | properties | The properties of the ellipse. |
| struct donner::svg::components::LineComponent |
Parameters for a "<line>" element.
Note that unlike other elements, the x1, y1, x2, and y2 properties are not presentation attributes, so they must be specified on the element and not through CSS. This means that we don't need a ComputedLineComponent counterpart of this struct.
From https://www.w3.org/TR/SVG2/shapes.html#LineElement
A future specification may convert the ‘x1’, ‘y1’, ‘x2’, and ‘y2’ attributes to geometric properties. Currently, they can only be specified via element attributes, and not CSS.
| Class Members | ||
|---|---|---|
| Lengthd | x1 | The x-coordinate of the start of the line. |
| Lengthd | x2 | The x-coordinate of the end of the line. |
| Lengthd | y1 | The y-coordinate of the start of the line. |
| Lengthd | y2 | The y-coordinate of the end of the line. |
| struct donner::svg::components::RectComponent |
Parameters for a "<rect>" element.
| Class Members | ||
|---|---|---|
| RectProperties | properties | The properties of the rectangle. |
| struct donner::svg::components::ComputedStyleComponent |
Contains the computed style properties for an element, which is a combination of the style="" attribute, the CSS stylesheet, and the CSS cascade where properties are inherited from the parent.
| Class Members | ||
|---|---|---|
| optional< PropertyRegistry > | properties |
The computed style properties. std::nullopt may be present mid-computation before all properties have been cascaded. |
| struct donner::svg::components::DoNotInheritFillOrStrokeTag |
This component is added to entities to indicate that 'fill' and 'stroke' attributes should not be inherited, which is used for "<pattern>" because it establishes a shadow tree, and we do not want to recursively inherit 'fill' or 'stroke' values into the children.
| 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::TextComponent |
Defines the start of a text element, which may have other text elements as children.
Created on each "<text>", "<tspan>", and xml_textPath element.
| Class Members | ||
|---|---|---|
| LengthAdjust | lengthAdjust = LengthAdjust::Default | How to adjust the text length, either by adding spacing between glyphs or stretching the glyphs themselves. |
| RcString | text | Text content. |
| optional< Lengthd > | textLength | Override for the text length. If empty, the property is not set. |
| struct donner::svg::components::TextPositioningComponent |
Defines the positioning of a text element, which may have other text elements as children.
| Class Members | ||
|---|---|---|
| SmallVector< Lengthd, 1 > | dx | Relative shift in x for each character. If empty, the property is not set. |
| SmallVector< Lengthd, 1 > | dy | Relative shift in y for each character. If empty, the property is not set. |
| SmallVector< double, 1 > | rotateDegrees | Rotation in degrees for each character. If empty, the property is not set. |
| SmallVector< Lengthd, 1 > | x | X coordinate for each character. If empty, the property is not set. |
| SmallVector< Lengthd, 1 > | y | Y coordinate for each character. If empty, the property is not set. |
| struct donner::svg::components::TextRootComponent |
Defines the start of a text element, which may have other text elements as children.
Created on each "<text>" element.
The resolved paint server for a fill or stroke.
Type definition for a callback to process sized elements.
This allows systems that can't directly depend on LayoutSystem to request sized element processing.
| 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. |
|
strong |
Controls how the attached element is rendered, determines how different element types are rendered.
|
strong |
There are two types of shadow trees:
Shadow trees always belong to specific branches, and there are no multiples; there are a finite number of branches. To enable this, list each branch individually, with everything except Main being an offscreen branch.
|
inline |
Returns true if the paint server is not a PaintServer::None.
| paint | The paint server to check. |