Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::svg::components Namespace Reference

Contains the implementation of the Donner ECS,. More...

Classes

struct  CircleComponent
 Parameters for a "<circle>" element. More...
 
struct  CircleProperties
 Properties for a "<circle>" element. More...
 
struct  ClassComponent
 Holds the value of the class attribute of an element. More...
 
struct  ClipPathComponent
 Parameters for the "<clipPath>" element. More...
 
struct  ComputedAbsoluteTransformComponent
 Stores the computed transform value for an entity, relative to the world. More...
 
struct  ComputedCircleComponent
 Computed properties for a "<circle>" element, which applies values from the CSS cascade. More...
 
struct  ComputedClipPathsComponent
 Stores a computed clip path, which is used to clip the rendering of an entity. More...
 
struct  ComputedEllipseComponent
 Computed properties for a "<ellipse>" element, which applies values from the CSS cascade. More...
 
struct  ComputedFilterComponent
 Computed filter parameters parsed by FilterSystem, represents the resolved DOM hierarchy of a "<filter>" element. More...
 
struct  ComputedGradientComponent
 Created by PaintSystem during render tree instantiation. More...
 
struct  ComputedLinearGradientComponent
 Computed properties for a "<linearGradient>" element. More...
 
struct  ComputedLocalTransformComponent
 Stores the computed transform value for an entity, relative to the parent. 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  ComputedPatternComponent
 Computed properties for "<pattern>" elements, after resolving and inheriting values from referenced patterns. More...
 
struct  ComputedRadialGradientComponent
 Computed properties for a "<radialGradient>" element. More...
 
struct  ComputedRectComponent
 Computed properties for a "<rect>" element, which applies values from the CSS cascade. More...
 
struct  ComputedShadowTreeComponent
 An instantiated ShadowTreeComponent, which points to the roots of parallel entity trees. More...
 
struct  ComputedSizedElementComponent
 Stores the computed bounds of a sized element, resolving units and percentages. More...
 
struct  ComputedStopComponent
 Stores the computed properties of a "<stop>" element. 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  ComputedViewboxComponent
 Computed value of a viewbox for the current element. 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...
 
class  ElementTypeComponent
 Stores the parsed element type of the current entity. More...
 
struct  EllipseComponent
 Parameters for a "<ellipse>" element. More...
 
struct  EllipseProperties
 Parameters for a "<ellipse>" element. More...
 
struct  EvaluatedReferenceComponent
 Represents a reference to another entity which has been evaluated from a Reference string. More...
 
struct  FEGaussianBlurComponent
 Parameters for SVGFEGaussianBlurElement. More...
 
struct  FilterComponent
 Parameters for a "<filter>" element. More...
 
struct  FilterPrimitiveComponent
 Parameters for SVGFilterPrimitiveStandardAttributes. More...
 
class  FilterSystem
 Handles parsing and instantiating SVG filter effects from the SVG DOM. More...
 
struct  GradientComponent
 Common parameters for gradient elements, "<linearGradient>" and "<radialGradient>". More...
 
struct  IdComponent
 Holds the value of the id attribute of an element. More...
 
struct  ImageComponent
 Parameters for the "<image>" element. More...
 
class  LayoutSystem
 Handles layout and bounds calculations for SVG elements. More...
 
struct  LinearGradientComponent
 Parameters for a "<linearGradient>" element. More...
 
struct  LineComponent
 Parameters for a "<line>" element. More...
 
struct  LoadedImageComponent
 Loaded image resource, created from a ImageComponent. More...
 
struct  MarkerComponent
 Stores the marker data for an SVG element. More...
 
struct  MaskComponent
 Parameters for the "<mask>" element. More...
 
class  OffscreenShadowTreeComponent
 Defines an offscreen shadow tree attached to the current entity (the shadow host). 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...
 
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  PathComponent
 Parameters for a "<path>" element. More...
 
struct  PathLengthComponent
 Stores a user-overridden path length on an element. More...
 
struct  PatternComponent
 Parameters for "<pattern>" elements which are not captured by ViewboxComponent and SizedElementComponent. More...
 
struct  PolyComponent
 Parameters for a "<polygon>" or "<polyline>" element. More...
 
struct  PreserveAspectRatioComponent
 Stores the preserveAspectRatio attribute of "<svg>" and "<pattern>". More...
 
struct  RadialGradientComponent
 Parameters for a "<radialGradient>" element. More...
 
struct  RectComponent
 Parameters for a "<rect>" element. More...
 
struct  RectProperties
 Parameters for a "<rect>" element. More...
 
struct  RenderingBehaviorComponent
 Component that controls how the attached element is rendered, determines how different element types are rendered. More...
 
class  RenderingContext
 Rendering controller, which instantiates and and manages the rendering tree. More...
 
struct  RenderingInstanceComponent
 An instance of the entity in the rendering tree. More...
 
struct  ResolvedClipPath
 Contains resolved information about the clip-path property, such as which element it is pointing to. More...
 
struct  ResolvedMarker
 
struct  ResolvedMask
 Contains resolved information about the mask property, such as which element it is pointing to. More...
 
class  ResourceManagerContext
 Resource manager, which handles loading resources from URLs and caching results. More...
 
struct  ShadowEntityComponent
 A component attached to entities in the shadow tree, indicating which light entity they are mirroring. 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...
 
class  ShapeSystem
 Creates computed path for shapes such as "<circle>", "<line>", and "<path>". More...
 
struct  SizedElementComponent
 Stores the properties of a sized element, x, y, width, height. 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  StopComponent
 Stores the properties of a "<stop>" element. More...
 
struct  StopProperties
 Parameters for a "<stop>" element. More...
 
struct  StyleComponent
 Contains properties the style="" attribute for an element, local to the element. More...
 
struct  StylesheetComponent
 Data for a "<style>" element. More...
 
class  StyleSystem
 Computes stylesheet information for elements, applying the CSS cascade and inheritance rules. 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...
 
class  SVGDocumentContext
 Holds global state of an SVG document, such as the root element, id-to-element mapping, and the document size. More...
 
struct  TransformComponent
 Stores the raw transform value set on an entity, for the transform presentation attribute. More...
 
struct  ViewboxComponent
 A component attached to entities that have a viewbox attribute, such as "<svg>" and "<pattern>". 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.
 

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.
 

Detailed Description

Contains the implementation of the Donner ECS,.

See also
Entity Component System (ECS).

Classes are named as follows:

  • *System - Stateless object that accesses and manipulates components.
  • *Component - Data storage struct with minimal logic, which may be attached to an Entity.
  • Computed*Component - Created when processing the tree and preparing it for rendering, stores intermediate object state derived from regular components. Is used to apply the CSS cascade and to cache shape path data.
  • *Context - Contains global state of an SVG document, which are stored in the Registry::ctx().
  • *Tag - Used to tag an entity with a specific purpose, like to disable rendering behavior (like inheritance with DoNotInheritFillOrStrokeTag).

Class Documentation

◆ donner::svg::components::CircleComponent

struct donner::svg::components::CircleComponent

Parameters for a "<circle>" element.

Collaboration diagram for donner::svg::components::CircleComponent:
[legend]
Class Members
CircleProperties properties The properties for the circle.

◆ donner::svg::components::ClassComponent

struct donner::svg::components::ClassComponent

Holds the value of the class attribute of an element.

Collaboration diagram for donner::svg::components::ClassComponent:
[legend]
Class Members
RcString className The value of the class attribute.

◆ donner::svg::components::ClipPathComponent

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.

◆ donner::svg::components::ComputedAbsoluteTransformComponent

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.

Collaboration diagram for donner::svg::components::ComputedAbsoluteTransformComponent:
[legend]
Class Members
Transformd entityFromWorld Transform from the entity from the world.

◆ donner::svg::components::ComputedClipPathsComponent

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.

Collaboration diagram for donner::svg::components::ComputedClipPathsComponent:
[legend]
Class Members
vector< ClipPath > clipPaths All clip paths, in order they need to be applied based on their layer.

◆ donner::svg::components::ComputedFilterComponent

struct donner::svg::components::ComputedFilterComponent

Computed filter parameters parsed by FilterSystem, represents the resolved DOM hierarchy of a "<filter>" element.

Collaboration diagram for donner::svg::components::ComputedFilterComponent:
[legend]
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.

◆ donner::svg::components::ComputedLocalTransformComponent

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.

Collaboration diagram for donner::svg::components::ComputedLocalTransformComponent:
[legend]
Class Members
Transformd entityFromParent Transform from the entity from its parent.
CssTransform rawCssTransform Raw CSS transform value, before resolving percentages relative to the viewport.

◆ donner::svg::components::ComputedSizedElementComponent

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.

Collaboration diagram for donner::svg::components::ComputedSizedElementComponent:
[legend]
Class Members
Boxd bounds The computed rect of this sized element.
Boxd inheritedViewbox The viewbox of the parent element, used for preserveAspectRatio transformations.

◆ donner::svg::components::ComputedStyleComponent

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.

◆ donner::svg::components::ComputedViewboxComponent

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.

Collaboration diagram for donner::svg::components::ComputedViewboxComponent:
[legend]
Class Members
Boxd viewbox The viewbox of the element, or the viewbox of the nearest ancestor.

◆ donner::svg::components::DoNotInheritFillOrStrokeTag

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.

◆ donner::svg::components::EllipseComponent

struct donner::svg::components::EllipseComponent

Parameters for a "<ellipse>" element.

Collaboration diagram for donner::svg::components::EllipseComponent:
[legend]
Class Members
EllipseProperties properties The properties of the ellipse.

◆ donner::svg::components::EvaluatedReferenceComponent

struct donner::svg::components::EvaluatedReferenceComponent
template<typename ReferenceType>
struct donner::svg::components::EvaluatedReferenceComponent< ReferenceType >

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.

Template Parameters
ReferenceTypetag 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.

◆ donner::svg::components::FEGaussianBlurComponent

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.

◆ donner::svg::components::FilterComponent

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).

◆ donner::svg::components::FilterPrimitiveComponent

struct donner::svg::components::FilterPrimitiveComponent
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.

◆ donner::svg::components::GradientComponent

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.

◆ donner::svg::components::ImageComponent

struct donner::svg::components::ImageComponent

Parameters for the "<image>" element.

Collaboration diagram for donner::svg::components::ImageComponent:
[legend]
Class Members
RcString href URI to the image resource, which can either be a file path, URL, or data URL (e.g. "data:image/png;base64,...").

◆ donner::svg::components::LineComponent

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.

Collaboration diagram for donner::svg::components::LineComponent:
[legend]
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.

◆ donner::svg::components::LoadedImageComponent

struct donner::svg::components::LoadedImageComponent

Loaded image resource, created from a ImageComponent.

Class Members
optional< ImageResource > image Loaded image resource.

◆ donner::svg::components::MarkerComponent

struct donner::svg::components::MarkerComponent

Stores the marker data for an SVG element.

Collaboration diagram for donner::svg::components::MarkerComponent:
[legend]
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.

◆ donner::svg::components::PaintResolvedReference

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.

Collaboration diagram for donner::svg::components::PaintResolvedReference:
[legend]
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.

◆ donner::svg::components::PathLengthComponent

struct donner::svg::components::PathLengthComponent

Stores a user-overridden path length on an element.

If the user has not overridden the path length, this component will not be attached.

Class Members
double value The user-overridden path length, in user units.

◆ donner::svg::components::PatternComponent

struct donner::svg::components::PatternComponent

Parameters for "<pattern>" elements which are not captured by ViewboxComponent and SizedElementComponent.

Collaboration diagram for donner::svg::components::PatternComponent:
[legend]
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.

◆ donner::svg::components::PreserveAspectRatioComponent

struct donner::svg::components::PreserveAspectRatioComponent

Stores the preserveAspectRatio attribute of "<svg>" and "<pattern>".

Collaboration diagram for donner::svg::components::PreserveAspectRatioComponent:
[legend]
Class Members
PreserveAspectRatio preserveAspectRatio The preserveAspectRatio of the element, defaults to PreserveAspectRatio::None().

◆ donner::svg::components::RectComponent

struct donner::svg::components::RectComponent

Parameters for a "<rect>" element.

Collaboration diagram for donner::svg::components::RectComponent:
[legend]
Class Members
RectProperties properties The properties of the rectangle.

◆ donner::svg::components::ShadowEntityComponent

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.

◆ donner::svg::components::SizedElementComponent

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.

Collaboration diagram for donner::svg::components::SizedElementComponent:
[legend]
Class Members
SizedElementProperties properties The properties of the sized element, x, y, width, height.

◆ donner::svg::components::StopComponent

struct donner::svg::components::StopComponent

Stores the properties of a "<stop>" element.

Collaboration diagram for donner::svg::components::StopComponent:
[legend]
Class Members
StopProperties properties The properties of the "<stop>" element.

◆ donner::svg::components::SubtreeInfo

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.

◆ donner::svg::components::TransformComponent

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.

Collaboration diagram for donner::svg::components::TransformComponent:
[legend]
Class Members
Property< CssTransform > transform Value of the transform, if it is set. Defaults to std::nullopt. Represents the entity-from-parent transform.

◆ donner::svg::components::ViewboxComponent

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.

Typedef Documentation

◆ ResolvedPaintServer

Initial value:
std::variant<PaintServer::None, PaintServer::Solid, PaintResolvedReference>

The resolved paint server for a fill or stroke.

Enumeration Type Documentation

◆ RenderingBehavior

Controls how the attached element is rendered, determines how different element types are rendered.

Enumerator
Default 

The default rendering behavior, which renders and traverses children.

Nonrenderable 

The element and its children are not rendered.

NoTraverseChildren 

The element is rendered, but its children are not traversed.

ShadowOnlyChildren 

Only traverse this element's children within a shadow tree instantiation.

◆ ShadowBranchType

There are two types of shadow trees:

  • Main: One for elements in the main render graph, such as "<use>" elements, where each "<use>" element holds one instantiation, which behaves as if the referenced element was copy-pasted within the tree.
  • Offscreen: Shadow trees for paint servers and offscreen purposes, which are not enumerated as part of the render graph. For example, a 'fill' attribute may reference a "<pattern>" paint server, which needs to be rendered into a buffer before being tiled into the main render graph.

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.

Enumerator
Main 

For entities enumerated in the main render graph.

OffscreenFill 

For 'fill' attributes.

OffscreenStroke 

For 'stroke' attributes.

OffscreenMask 

For mask contents, used for the 'mask' attribute.

OffscreenMarkerStart 

For the 'marker-start' attribute.

OffscreenMarkerMid 

For the 'marker-mid' attribute.

OffscreenMarkerEnd 

For the 'marker-end' attribute.

Function Documentation

◆ HasPaint()

bool donner::svg::components::HasPaint ( const ResolvedPaintServer & paint)
inline

Returns true if the paint server is not a PaintServer::None.

Parameters
paintThe paint server to check.
Returns
True if the paint server is not a PaintServer::None.