Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::components Namespace Reference

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

Namespaces

namespace  filter_primitive
 Variant holding the parameters for each type of filter primitive.

Classes

struct  AnimatedValuesComponent
 Component on target entities that holds animated attribute overrides. More...
struct  AnimateTransformComponent
 Component storing <animateTransform>-specific data. More...
struct  AnimateValueComponent
 Component storing <animate>-specific value data. More...
class  AnimationResourceBudget
 Per-frame work and allocation envelope for untrusted SMIL animation values. More...
struct  AnimationStateComponent
 Runtime state of an animation element, computed each frame by the AnimationSystem. More...
class  AnimationSystem
 System that advances SVG animations based on the current document time. More...
struct  AnimationTimingComponent
 Stores timing attributes for an animation element. More...
class  ClockValue
 Represents a SMIL clock value, which can be a concrete time in seconds or indefinite. More...
struct  SetAnimationComponent
 Component storing <set>-specific animation data. More...
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...
struct  ConditionalProcessingComponent
 Stores the SVG conditional-processing attributes (requiredFeatures, requiredExtensions, systemLanguage) for an element. More...
struct  DescriptiveTextComponent
 Stores the concatenated text content of a descriptive element, such as <title>, <desc>, or <metadata>. More...
struct  DirtyFlagsComponent
 Tracks which computed properties are stale and need recomputation after a DOM mutation. More...
struct  RenderTreeState
 Global invalidation state, stored in the registry context via Registry::ctx(). More...
class  DocumentResourceFamilyBudget
 Shared live-memory envelope for a root SVG document and all cached subdocuments. More...
struct  DocumentResourceFamilyContext
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...
class  ComputedFilterResourceBudget
 Owns computed-filter structural reservations and shared raster payload admission. 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  FilterInput
 Identifies the input to a filter primitive node. More...
struct  FilterNode
 A single node in the filter graph, representing one filter primitive. More...
struct  FilterGraph
 The complete filter graph for a <filter> element. More...
class  FilterExecutionBudget
 Shared per-frame filter budget. More...
struct  FilterPrimitiveComponent
 Parameters for SVGFilterPrimitiveStandardAttributes. More...
struct  FEGaussianBlurComponent
 Parameters for SVGFEGaussianBlurElement. More...
struct  FEFloodComponent
 Parameters for SVGFEFloodElement. More...
struct  FEOffsetComponent
 Parameters for SVGFEOffsetElement. More...
struct  FECompositeComponent
 Parameters for SVGFECompositeElement. More...
struct  FEColorMatrixComponent
 Parameters for SVGFEColorMatrixElement. More...
struct  FEBlendComponent
 Parameters for SVGFEBlendElement. More...
struct  FEDropShadowComponent
 Parameters for SVGFEDropShadowElement. More...
struct  FEComponentTransferComponent
 Marker component for SVGFEComponentTransferElement. More...
struct  FEFuncComponent
 Parameters for a feFuncR/G/B/A child element within feComponentTransfer. More...
struct  FEConvolveMatrixComponent
 Parameters for SVGFEConvolveMatrixElement. More...
struct  FEMorphologyComponent
 Parameters for SVGFEMorphologyElement. More...
struct  FETileComponent
 Marker component for SVGFETileElement. More...
struct  FEImageComponent
 Parameters for SVGFEImageElement. More...
struct  FEDisplacementMapComponent
 Parameters for SVGFEDisplacementMapElement. More...
struct  FETurbulenceComponent
 Parameters for SVGFETurbulenceElement. More...
struct  FEMergeComponent
 Marker component for SVGFEMergeElement. More...
struct  FEMergeNodeComponent
 Parameters for a feMergeNode child element within feMerge. More...
struct  LightSourceComponent
 Light source parameters, stored on feDistantLight, fePointLight, or feSpotLight child elements. More...
struct  FEDiffuseLightingComponent
 Parameters for SVGFEDiffuseLightingElement. More...
struct  FESpecularLightingComponent
 Parameters for SVGFESpecularLightingElement. More...
class  FilterSystem
 Handles parsing and instantiating SVG filter effects from the SVG DOM. More...
class  GeometryPreparationResourceBudget
 Owns the current computed-path reservation for one document registry. More...
struct  HyperlinkComponent
 Stores the hyperlink target for an <a> element. 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 local transform for an entity (after CSS cascade + percentage/viewport resolution). More...
struct  ComputedAbsoluteTransformComponent
 Stores the computed absolute transform for an entity - the full cascade of ancestor transforms composed together. 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...
class  NodeLifetimeCollector
 Collects detached SVG DOM subtrees when no public handles retain them. More...
struct  NodeExternalRefState
 Shared control block retained by public SVG DOM element wrappers. More...
struct  NodeLifetimeComponent
 Tracks whether an SVG DOM node is attached to the document tree or currently detached. 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...
class  ParsedPayloadResourceBudget
 Bounds dynamic payload retained while parsing one untrusted SVG document. More...
struct  PathLengthComponent
 Stores a user-overridden path length on an element. More...
struct  PreserveAspectRatioComponent
 Stores the preserveAspectRatio attribute of <svg> and <pattern>. More...
class  ReferenceResolutionBudget
 Bounds document-wide href inheritance traversal for filters, gradients, and patterns. 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  PaintContextRemap
 Remap information for a paint inherited through the SVG2 context-fill / context-stroke keywords (https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint). 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
 Resolved <marker> reference applied to a rendering instance. More...
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 raster image resource, created from a ImageComponent when the href references a raster image (PNG, JPEG, GIF). More...
struct  LoadedSVGImageComponent
 Loaded SVG sub-document, created from a ImageComponent when the href references an SVG file (image/svg+xml). More...
struct  ExternalUseComponent
 Loaded external SVG sub-document referenced by a <use> element. More...
class  ResourceManagerContext
 Resource manager, which handles loading resources from URLs and caching results. More...
class  SubDocumentCache
 Cache for parsed SVG sub-documents referenced by <image> or <use> elements. 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  ShadowTreeResourceBudget
 Aggregate generated-entity and recursion budget shared by every shadow-tree source. 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 Path 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  StyleResourceBudget
 Aggregate stylesheet cascade and selector traversal budget for one style-computation pass. More...
struct  MatchedStyleRule
 Diagnostic record for one stylesheet rule that matched an element. More...
struct  StyleRuleAtSourceOffset
 Stylesheet rule found at a document source offset. More...
class  StyleSystem
 Computes stylesheet information for elements, applying the CSS cascade and inheritance rules. More...
struct  StylesheetSourceMapSegment
 Maps a contiguous span of parsed CSS text back to the SVG document source. More...
class  StylesheetSourceMap
 Source map for stylesheet text produced by concatenating <style> text/CDATA children. 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  ComputedTextGeometryComponent
 Cached geometry for text layout and text-derived public API queries. More...
struct  TextComponent
 Defines the start of a text element, which may have other text elements as children. More...
struct  TextPathComponent
 Stores attributes specific to <textPath> elements. 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  TreeMutation
 Central mutation service for SVG DOM tree edits. More...
struct  TinySkiaPathCacheComponent
 Per-entity cache of a shape's donner::Path converted to tiny_skia::Path. More...
struct  TinySkiaImageCacheComponent
 Per-entity cache of a LoadedImageComponent's pixels converted from the straight-alpha ImageResource contract to the premultiplied form tiny-skia samples. More...
class  RenderingContext
 Rendering controller, which instantiates and and manages the rendering tree. More...

Typedefs

using FilterPrimitive
 Variant holding any filter primitive type.
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  TransformAnimationType : uint8_t {
  Translate ,
  Scale ,
  Rotate ,
  SkewX ,
  SkewY
}
 Transform type for <animateTransform>. More...
enum class  CalcMode : uint8_t {
  Discrete ,
  Linear
}
 Interpolation mode for <animate>. More...
enum class  AnimationPhase : uint8_t {
  Before ,
  Active ,
  After
}
 Phase of an animation element's lifecycle. More...
enum class  AnimationFill : uint8_t {
  Remove ,
  Freeze
}
 Fill behavior when an animation finishes. More...
enum class  AnimationRestart : uint8_t {
  Always ,
  WhenNotActive ,
  Never
}
 Restart behavior for an animation. More...
enum class  FilterStandardInput : std::uint8_t {
  SourceGraphic ,
  SourceAlpha ,
  FillPaint ,
  StrokePaint
}
 Standard named inputs available to filter primitives. More...
enum class  FilterMemoryModel : std::uint8_t {
  CpuFloatNamedResults ,
  GpuAllNodes
}
 Intermediate-retention behavior used to estimate backend memory before filter execution. More...
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 ,
  OffscreenFeImage
}
 There are two types of shadow trees: More...
enum class  TextPathMethod {
  Align ,
  Stretch
}
 Method for placing glyphs along a path in <textPath>. More...
enum class  TextPathSide {
  Left ,
  Right
}
 Which side of the path to render text in <textPath>. More...
enum class  TextPathSpacing {
  Auto ,
  Exact
}
 Spacing mode for <textPath>. More...

Functions

Entity FindAttachedEntityById (Registry &registry, const RcString &id)
 Finds an attached document-tree entity with the given ID.
bool IsConditionalProcessingAttribute (const xml::XMLQualifiedNameRef &name)
 Return true if name is one of the SVG conditional-processing attributes.
bool SetConditionalProcessingAttribute (ConditionalProcessingComponent &conditional, const xml::XMLQualifiedNameRef &name, std::string_view value)
 Store a conditional-processing attribute value.
bool RemoveConditionalProcessingAttribute (ConditionalProcessingComponent &conditional, const xml::XMLQualifiedNameRef &name)
 Clear a conditional-processing attribute value.
bool HasConditionalProcessingAttributes (const ConditionalProcessingComponent &conditional)
 Return true if any conditional-processing attribute is still present on conditional.
bool EvaluateConditionalProcessing (const ConditionalProcessingComponent &conditional, std::span< const RcString > userLanguages)
 Evaluates an element's conditional-processing attributes.
bool EvaluateConditionalProcessing (const ConditionalProcessingComponent &conditional)
 Overload of EvaluateConditionalProcessing that uses the default user language list of {"en"}, matching resvg's default (the resvg-test-suite goldens are rendered with it).
bool SystemLanguageMatches (std::string_view systemLanguage, std::string_view userLanguage)
 Evaluates a single systemLanguage attribute value against the user-preferred language.
std::uint64_t FilterPrimitivePayloadBytes (const FilterPrimitive &primitive)
 Dynamic numeric storage retained by one primitive payload.
bool FilterGraphExecutionCost (const FilterGraph &graph, std::uint64_t pixelCount, FilterMemoryModel memoryModel, std::uint64_t &workUnitsOut, std::uint64_t &intermediateBytesOut)
 Estimate a filter graph's aggregate execution cost for a pixel surface.
bool FilterGraphFitsExecutionBudget (const FilterGraph &graph, std::uint64_t pixelCount, FilterMemoryModel memoryModel)
 Return whether one filter graph fits the execution budget for a pixel surface.
ParseResult< bool > ParseSizedElementPresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for sized elements (SVG, Use, Image), such as x, y, width, height.
bool IsEntityAttachedToDocument (const Registry &registry, Entity entity)
 Returns true when an entity is currently part of the live document tree.
ParseResult< bool > ParseStopPresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for a <stop> element, such as stop-color and stop-opacity.
bool HasPaint (const ResolvedPaintServer &paint)
 Returns true if the paint server is not a PaintServer::None.
ParseResult< bool > ParseCirclePresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for a <circle> element, such as cx, cy, r.
ParseResult< bool > ParseEllipsePresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for a <ellipse> element, such as cx, cy, rx, ry.
ParseResult< bool > ParseRectPresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for a <rect> element, such as x, y, width, height, rx, ry.
ParseResult< bool > ParsePathPresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse presentation attributes for a <path> element (the "d" attribute).
Entity InvalidateTextLayout (EntityHandle handle)
 Drop the cached text layout of the text root enclosing handle.
ParseResult< bool > ParseTextPositioningPresentationAttribute (EntityHandle handle, std::string_view name, const parser::PropertyParseFnParams &params)
 Parse the text positioning presentation attributes (x, y, dx, dy, rotate) on <text> / <tspan> / <textPath> elements into TextPositioningComponent, and invalidate the text root's cached layout so the next render picks the new positions up.

Variables

constexpr double kMaximumFilterOffset = 4096.0
 Maximum accepted user-space filter offset magnitude.
constexpr double kMaximumFilterStdDeviation = 256.0
 Maximum accepted user-space blur standard deviation.
constexpr double kMaximumFilterMorphologyRadius = 256.0
 Maximum accepted user-space morphology radius.
constexpr int kMaximumFilterPixelOffset = 4096
 Maximum filter offset after conversion to device pixels.
constexpr int kMaximumFilterPixelRadius = 256
 Maximum blur standard deviation or morphology radius after conversion to device pixels.
constexpr std::uint64_t kMaximumFilterMorphologyPassesPerAxis = 9
 Geode decomposes morphology into shader passes whose per-axis radius is at most 31.
constexpr std::uint64_t kMaximumFilterMorphologyWorkMultiplier
constexpr std::uint64_t kMaximumFilterMorphologyRetainedBuffers
constexpr int kMaximumFilterSurfaceDimension = 4096
 Maximum dimension of a filter-specific intermediate surface.
constexpr std::size_t kMaximumFilterSurfacePixels = 12 * 1024 * 1024
 Maximum pixel area of a filter-specific intermediate surface.
constexpr std::size_t kMaximumFilterGraphNodes = 32
 Maximum number of primitives retained in one computed filter graph.
constexpr std::size_t kMaximumFilterMergeInputs = 16
 Maximum number of inputs composited by one feMerge primitive.
constexpr std::size_t kMaximumFilterTableValues = 1024
 Maximum number of samples accepted for one feComponentTransfer channel table.
constexpr std::size_t kMaximumFilterColorMatrixValues = 20
 Maximum numeric payload accepted for feColorMatrix (the 5-by-4 matrix form).
constexpr int kMaximumFilterConvolveOrder = 64
 Maximum convolve order on either axis and aggregate kernel payload.
constexpr std::size_t kMaximumFilterKernelValues
constexpr std::uint64_t kMaximumFilterWorkUnits = 256ULL * 1024 * 1024
 Maximum aggregate pixel operations accepted for one filter execution.
constexpr std::uint64_t kMaximumFilterFrameWorkUnits = 512ULL * 1024 * 1024
 Maximum aggregate pixel operations accepted across one rendered frame.
constexpr std::uint64_t kMaximumFilterIntermediateBytes = 256ULL * 1024 * 1024
 Maximum estimated bytes retained by filter intermediates during one execution.
constexpr std::uint64_t kMaximumFilterFrameBytes = 256ULL * 1024 * 1024
 Maximum filter memory reserved across one frame, including RGBA capture surfaces.
constexpr double kMaximumFilterTurbulenceFrequency = 1024.0
 Maximum accepted feTurbulence base-frequency magnitude.
constexpr double kMaximumFilterTurbulenceSeed = 2147483646.0
 Maximum accepted feTurbulence seed magnitude (Park-Miller modulus minus one).
constexpr int kMaximumFilterTurbulenceOctaves = 16
 Maximum accepted feTurbulence octave count.

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::AnimatedValuesComponent

struct donner::svg::components::AnimatedValuesComponent

Component on target entities that holds animated attribute overrides.

When an animation is active, its computed value is stored here. The style system checks this map before falling back to base attribute values.

Today (<set> only), values are stored as raw strings that get re-parsed by the style system as if they were attribute values.

Class Members
unordered_map< string, string > overrides Map from attribute name to its animated value (as a raw string).

◆ donner::svg::components::AnimateTransformComponent

struct donner::svg::components::AnimateTransformComponent

Component storing <animateTransform>-specific data.

Values are stored as strings containing space-separated numbers. The number of values per entry depends on the transform type.

Class Members
optional< string > by The by value (space-separated numbers).
optional< string > from The from value (space-separated numbers).
optional< string > href Optional href pointing to the target element.
optional< string > to The to value (space-separated numbers).
TransformAnimationType type = TransformAnimationType::Translate The transform type (translate, scale, rotate, skewX, skewY).
vector< string > values The values list (semicolon-separated keyframes).

◆ donner::svg::components::AnimateValueComponent

struct donner::svg::components::AnimateValueComponent

Component storing <animate>-specific value data.

Values can be specified via from/to/by pairs or a values list. The values list takes precedence when present.

Class Members
string attributeName The attributeName identifying which attribute to animate.
optional< string > by The by value (offset from start).
CalcMode calcMode = CalcMode::Linear Interpolation mode.
optional< string > from The from value (start of interpolation).
optional< string > href Optional href pointing to the target element. If absent, targets the parent element.
vector< double > keyTimes keyTimes: maps values to positions in [0,1]. Count must match values count.
optional< string > to The to value (end of interpolation).
vector< string > values The values list (semicolon-separated keyframes). Takes precedence over from/to/by.

◆ donner::svg::components::AnimationStateComponent

struct donner::svg::components::AnimationStateComponent

Runtime state of an animation element, computed each frame by the AnimationSystem.

This component is emplaced on animation entities and updated when the document time changes.

Class Members
double activeDuration = 0.0 Computed active duration in seconds.
double beginTime = 0.0 Resolved begin time in seconds (from timing attributes).
bool hasCompleted = false Whether this animation has completed at least one full cycle. Used to enforce restart="never": once ended, never restarts.
AnimationPhase phase = AnimationPhase::Before Current phase of this animation.
double simpleDuration = 0.0 Computed simple duration in seconds. 0 means unresolved, infinity means indefinite.
Entity targetEntity = entt::null The entity being targeted by this animation. Resolved from href or parent element.
bool wasActive = false Whether this animation was active in the previous frame. Used to enforce restart="whenNotActive".

◆ donner::svg::components::AnimationTimingComponent

struct donner::svg::components::AnimationTimingComponent

Stores timing attributes for an animation element.

These correspond to the SMIL timing attributes: begin, dur, end, repeatCount, repeatDur, fill, restart, min, max.

begin/end support offset (clock) values only. Syncbase references (id.begin/id.end) are deferred.

Class Members
optional< ClockValue > beginOffset Parsed begin offset in seconds (from the earliest offset value in the begin list).
optional< string > beginValue Raw begin attribute value (semicolon-separated list of time values).
optional< ClockValue > dur The dur attribute: simple duration of the animation.
optional< ClockValue > endOffset Parsed end offset in seconds.
optional< string > endValue Raw end attribute value.
AnimationFill fill = AnimationFill::Remove fill: what to do when the animation ends.
optional< ClockValue > max max: maximum active duration.
optional< ClockValue > min min: minimum active duration.
optional< double > repeatCount repeatCount: number of iterations. Use infinity for "indefinite".
optional< ClockValue > repeatDur repeatDur: total repeat duration.
AnimationRestart restart = AnimationRestart::Always restart: when the animation can restart.

◆ donner::svg::components::SetAnimationComponent

struct donner::svg::components::SetAnimationComponent

Component storing <set>-specific animation data.

<set> is the simplest animation element: it sets a target attribute to a discrete value for the duration of the animation. It has no interpolation; the to value applies as-is when the animation is active.

Class Members
string attributeName The attributeName identifying which attribute to animate.
optional< string > href Optional href pointing to the target element. If absent, targets the parent element.
string to The to value to set when the animation is active.

◆ donner::svg::components::ClassComponent

struct donner::svg::components::ClassComponent

Holds the value of the class attribute of an element.

Class Members
RcString className The value of the class attribute.

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

Class Members
vector< ClipPath > clipPaths All clip paths, in order they need to be applied based on their layer.

◆ donner::svg::components::ConditionalProcessingComponent

struct donner::svg::components::ConditionalProcessingComponent

Stores the SVG conditional-processing attributes (requiredFeatures, requiredExtensions, systemLanguage) for an element.

Attached only when at least one of the attributes is present.

These attributes control whether an element renders: on a direct child of <switch> they select the first matching child, and on any other rendered element they disable rendering of the element (and its subtree) when they evaluate to false.

See https://www.w3.org/TR/SVG2/struct.html#ConditionalProcessing

Class Members
optional< RcString > requiredExtensions Raw requiredExtensions attribute value, a whitespace-separated list of extension IRIs.

Donner supports no extensions, so any non-empty value evaluates to false.

optional< RcString > requiredFeatures Raw requiredFeatures attribute value.

Deprecated in SVG2; always evaluates to true, matching resvg's behavior. Stored so the DOM state reflects the document.

optional< RcString > systemLanguage Raw systemLanguage attribute value, a comma-separated list of BCP 47 language tags.

Evaluates to true if any listed tag matches a user-preferred language.

◆ donner::svg::components::DescriptiveTextComponent

struct donner::svg::components::DescriptiveTextComponent

Stores the concatenated text content of a descriptive element, such as <title>, <desc>, or <metadata>.

Descriptive elements are never rendered; their text is retained purely so it can be surfaced through the DOM (for accessibility tooling, tooltips, and document metadata). The SVG element tree does not keep the source Data/CData child nodes that the XML parse tree carried, so this component is the authoritative live text source, mirroring how StylesheetComponent retains the raw CSS text for <style>.

Class Members
RcString text The concatenated text content of the descriptive element.

◆ donner::svg::components::RenderTreeState

struct donner::svg::components::RenderTreeState

Global invalidation state, stored in the registry context via Registry::ctx().

Tracks whether a full render tree rebuild is required (e.g., after setTime() or setCanvasSize()), separate from per-entity dirty flags.

Class Members
bool hasBeenBuilt = false True if the render tree has been built at least once.
bool needsFullRebuild = true True if the render tree needs a full rebuild (structure changed, canvas resized, etc.).
bool needsFullStyleRecompute = true True if styles must be recomputed for the whole tree because selector dependencies may be non-local (for example class/id/attribute changes or tree mutations).

◆ donner::svg::components::DocumentResourceFamilyContext

struct donner::svg::components::DocumentResourceFamilyContext
Class Members
shared_ptr< DocumentResourceFamilyBudget > budget

◆ 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::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
optional< ColorInterpolationFilters > colorInterpolationFilters The parsed value of the "color-interpolation-filters" property, which specifies the color space for filter operations.
optional< FilterUnits > filterUnits 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).
optional< Reference > href An optional href to another filter, used to inherit attributes and primitive children.
optional< PrimitiveUnits > primitiveUnits 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::ComputedFilterComponent

struct donner::svg::components::ComputedFilterComponent

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

Class Members
ColorInterpolationFilters colorInterpolationFilters = ColorInterpolationFilters::Default
vector< FilterEffect > effectChain Parsed list of effects for backward-compatibility with existing renderer push/pop interface. Will be removed once the graph-based renderer API is complete.
FilterGraph filterGraph The filter graph built from child filter primitives.
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. The computed color interpolation mode for filter operations.
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::FilterNode

struct donner::svg::components::FilterNode

A single node in the filter graph, representing one filter primitive.

Nodes are executed in document order. Each node reads from its inputs (which may be standard inputs like SourceGraphic, or outputs of prior nodes), applies its primitive operation, and writes to an output buffer.

Class Members
optional< ColorInterpolationFilters > colorInterpolationFilters Per-primitive color-interpolation-filters. When set, overrides the graph-level default.
optional< Lengthd > height Primitive subregion height.
vector< FilterInput > inputs Input(s) to this primitive. A slot this list leaves unpopulated resolves exactly like an unspecified in/in2 attribute: to the previous primitive's result, and to SourceGraphic only when the node is the first primitive in the graph. A Composite, Blend, or DisplacementMap node built with a single input therefore reads the previous result as its second input, never the source graphic.
FilterPrimitive primitive The filter primitive operation.
optional< RcString > result Named output (for result attribute).
optional< Lengthd > width Primitive subregion width.
optional< Lengthd > x Primitive subregion X.
optional< Lengthd > y Primitive subregion Y.

◆ donner::svg::components::FilterPrimitiveComponent

struct donner::svg::components::FilterPrimitiveComponent
Class Members
optional< Lengthd > height The height of the filter region.
optional< FilterInput > in The input specification for this filter primitive. Parsed from the in attribute. When nullopt, defaults to Previous (output of preceding primitive, or SourceGraphic for the first).
optional< FilterInput > in2 The second input specification for two-input primitives (e.g., feComposite, feBlend). Parsed from the in2 attribute.
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::FEFloodComponent

struct donner::svg::components::FEFloodComponent

Parameters for SVGFEFloodElement.

Class Members
Property< Color > floodColor The flood fill color, defaults to black.
Property< double > floodOpacity {"flood-opacity", []() -> std::optional<double> { return 1.0; }} The flood fill opacity, defaults to 1. Range is [0, 1].

◆ donner::svg::components::FEOffsetComponent

struct donner::svg::components::FEOffsetComponent

Parameters for SVGFEOffsetElement.

Class Members
double dx = 0.0 The horizontal offset.
double dy = 0.0 The vertical offset.

◆ donner::svg::components::FEDropShadowComponent

struct donner::svg::components::FEDropShadowComponent

Parameters for SVGFEDropShadowElement.

Class Members
double dx = 2.0 Horizontal offset.
double dy = 2.0 Vertical offset.
Property< Color > floodColor The flood fill color, defaults to black.
Property< double > floodOpacity {"flood-opacity", []() -> std::optional<double> { return 1.0; }} The flood fill opacity, defaults to 1.
double stdDeviationX = 2.0 Blur standard deviation in X.
double stdDeviationY = 2.0 Blur standard deviation in Y.

◆ donner::svg::components::FEComponentTransferComponent

struct donner::svg::components::FEComponentTransferComponent

Marker component for SVGFEComponentTransferElement.

The element itself has no parameters; its children (feFuncR/G/B/A) define the transfer functions for each channel.

Class Members
int placeholder = 0 Placeholder to avoid empty struct issues with entt.

◆ donner::svg::components::FETileComponent

struct donner::svg::components::FETileComponent

Marker component for SVGFETileElement.

The feTile element has no element-specific parameters. It tiles its input's content (within the input's primitive subregion) across its own primitive subregion.

Class Members
int placeholder = 0 Placeholder to avoid empty struct issues with entt.

◆ donner::svg::components::FEImageComponent

struct donner::svg::components::FEImageComponent

Parameters for SVGFEImageElement.

Class Members
RcString href Image URL or fragment reference.
PreserveAspectRatio preserveAspectRatio How to fit the image.

◆ donner::svg::components::FEMergeComponent

struct donner::svg::components::FEMergeComponent

Marker component for SVGFEMergeElement.

The merge element itself has no parameters; its children (feMergeNode) specify the inputs.

Class Members
int placeholder = 0 Placeholder to avoid empty struct issues with entt.

◆ donner::svg::components::FEMergeNodeComponent

struct donner::svg::components::FEMergeNodeComponent

Parameters for a feMergeNode child element within feMerge.

Each merge node specifies an input via the in attribute. The inputs are composited bottom-to-top using Source Over.

Class Members
optional< FilterInput > in The input to this merge node. Parsed from the in attribute.

◆ donner::svg::components::FEDiffuseLightingComponent

struct donner::svg::components::FEDiffuseLightingComponent
Class Members
double diffuseConstant = 1.0 Diffuse reflection constant (kd).
Property< Color > lightingColor lighting-color property, specifying the color of the light source (default: white).
double surfaceScale = 1.0 Height of surface when alpha=1.

◆ donner::svg::components::FESpecularLightingComponent

struct donner::svg::components::FESpecularLightingComponent
Class Members
Property< Color > lightingColor lighting-color property, specifying the color of the light source (default: white).
double specularConstant = 1.0 Specular reflection constant (ks).
double specularExponent = 1.0 Specular exponent (1..128).
double surfaceScale = 1.0 Height of surface when alpha=1.

◆ donner::svg::components::HyperlinkComponent

struct donner::svg::components::HyperlinkComponent

Stores the hyperlink target for an <a> element.

The <a> element is a transparent grouping/text-content container whose only element-specific state is the link target (href / xlink:href). The reference is retained so it round-trips through the DOM, but it does not affect rendering - Donner has no interactive navigation, so the link target is purely informational, matching how resvg rasterizes <a>.

Class Members
RcString href Link target, an IRI reference (e.g. "https://example.com/" or "#fragment").

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

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

Class Members
Box2d bounds The computed rect of this sized element.
Box2d inheritedViewBox The viewBox of the parent element, used for preserveAspectRatio transformations.

◆ donner::svg::components::ComputedShadowSizedElementComponent

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
Box2d bounds The computed rect of this sized element.

◆ donner::svg::components::SymbolComponent

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. Per SVG2 they accept a <length> (including percentages, which resolve against the symbol's viewBox at layout time) or a keyword that maps to a percentage: refX left/center/right → 0%/50%/100%, refY top/center/bottom → 0%/50%/100%.

Class Members
SizedElementProperties properties The properties of the sized element, x, y, width, height.
Lengthd refX The reference x coordinate. Defaults to 0 (no unit).
Lengthd refY The reference y coordinate. Defaults to 0 (no unit).

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

Class Members
Property< CssTransform > transform Parsed value of the transform="..." presentation attribute / CSS transform property. Applied to entity-local coords, returns parent-space coords (i.e. parentFromEntity).

◆ donner::svg::components::ComputedLocalTransformComponent

struct donner::svg::components::ComputedLocalTransformComponent

Stores the computed local transform for an entity (after CSS cascade + percentage/viewport resolution).

Class Members
Transform2d parentFromEntity Local transform that maps entity coords to the parent's coord system. Applying parentFromEntity to a point expressed in the entity's own coord system yields its position in the parent coord system. For <rect x=0 y=0 ... transform="translate(100, 0)"/>, this matrix is Translate(100, 0), and the rect ends up at x=100 in the parent.
CssTransform rawCssTransform Raw CSS transform value, before resolving percentages relative to the viewport.
Vector2d transformOrigin Resolved transform origin in pixels.

◆ donner::svg::components::ComputedAbsoluteTransformComponent

struct donner::svg::components::ComputedAbsoluteTransformComponent

Stores the computed absolute transform for an entity - the full cascade of ancestor transforms composed together.

Class Members
Transform2d worldFromEntity Transform that maps entity-local coords through every ancestor's local transform to world (canvas) coords. This is the cascade of every parentFromEntity up the tree, composed together.
bool worldIsCanvas = true Set to false if this entity rebases the coordinate system and is not relative to the canvas (e.g. sub-document boundaries).

◆ 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< Box2d > viewBox Stored viewBox, if any.

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

Class Members
Box2d viewBox The viewBox of the element, or the viewBox of the nearest ancestor.

◆ donner::svg::components::NodeExternalRefState

struct donner::svg::components::NodeExternalRefState

Shared control block retained by public SVG DOM element wrappers.

Class Members
atomic< bool > isDetached = true Fast release-path hint for collection.

◆ 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::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::MarkerComponent

struct donner::svg::components::MarkerComponent

Stores the marker data for an SVG element.

Lengths are stored unresolved (Lengthd) so that percentage units - which resolve against the viewport of the element referencing the marker - are computed at render time. markerWidth/refX resolve against the viewport width (Lengthd::Extent::X) and markerHeight/refY against the viewport height (Lengthd::Extent::Y).

Class Members
Lengthd markerHeight {3.0, Lengthd::Unit::None} Height of the marker viewport.
MarkerUnits markerUnits Coordinate system for marker attributes and contents.
Lengthd markerWidth {3.0, Lengthd::Unit::None} Width of the marker viewport.
MarkerOrient orient Orientation of the marker.
Lengthd refX {0.0, Lengthd::Unit::None} X coordinate for the reference point.
Lengthd refY {0.0, Lengthd::Unit::None} Y coordinate for the reference point.

◆ donner::svg::components::PatternComponent

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.

◆ donner::svg::components::StopComponent

struct donner::svg::components::StopComponent

Stores the properties of a <stop> element.

Class Members
StopProperties properties The properties of the <stop> element.

◆ 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::PreserveAspectRatioComponent

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

◆ 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::PaintContextRemap

struct donner::svg::components::PaintContextRemap

Remap information for a paint inherited through the SVG2 context-fill / context-stroke keywords (https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint).

The inherited paint server is evaluated in the context element's user space - the <use> element for <use> shadow trees, or the shape referencing a <marker> for marker content: objectBoundingBox paint units resolve against the context element's bounding box, and the resulting paint is transformed into the consuming entity's local space.

Class Members
Box2d contextBounds Bounding box of the context element in its own user space, used to resolve objectBoundingBox paint units. May be empty (e.g. for a zero-size shape), in which case objectBoundingBox context paints fail to instantiate and render nothing.
Transform2d entityFromContextTransform Maps the context element's user space into the consuming entity's local space. When resolveAtDrawTime is set this value is not yet meaningful - the renderer driver substitutes the concrete per-placement transform before handing the paint to the backend.
bool resolveAtDrawTime = false True when entityFromContextTransform cannot be precomputed at render-tree instantiation time: the consuming entity lives in a marker's offscreen coordinate space, which is placed at multiple positions (one per path vertex) at draw time. The renderer driver resolves the concrete transform per placement.
bool seededFromStroke = false For resolveAtDrawTime remaps: identifies which of the referencing shape's paints seeded the context (false = the shape's fill, true = the shape's stroke), so the driver can chain through the shape's own context remap if its paint was itself inherited.

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

Class Members
optional< PaintContextRemap > contextRemap Set when this paint was inherited through context-fill / context-stroke; carries how to evaluate the paint in the context element's space. See PaintContextRemap.
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::FontResource

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.

◆ donner::svg::components::ImageComponent

struct donner::svg::components::ImageComponent

Parameters for the <image> element.

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::LoadedSVGImageComponent

struct donner::svg::components::LoadedSVGImageComponent

Loaded SVG sub-document, created from a ImageComponent when the href references an SVG file (image/svg+xml).

Stores the shared internal document handle used by SVGDocument.

Class Members
SVGDocumentHandle subDocument Parsed external SVG sub-document handle.

◆ donner::svg::components::ExternalUseComponent

struct donner::svg::components::ExternalUseComponent

Loaded external SVG sub-document referenced by a <use> element.

When a <use> element's href points to an external SVG file, the document is loaded via SubDocumentCache and stored here as an SVGDocumentHandle for rendering as a nested sub-document.

Class Members
RcString fragment Fragment identifier within the external document (e.g., "elementId" from "file.svg#elementId"). Empty if the whole document is referenced.
SVGDocumentHandle subDocument Parsed external SVG sub-document handle.

◆ 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::ShadowTreeRootComponent

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.

◆ donner::svg::components::CircleComponent

struct donner::svg::components::CircleComponent

Parameters for a <circle> element.

Class Members
CircleProperties properties The properties for the circle.

◆ donner::svg::components::EllipseComponent

struct donner::svg::components::EllipseComponent

Parameters for a <ellipse> element.

Class Members
EllipseProperties properties The properties of the ellipse.

◆ 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 , u2019:x1', , u2019:y1', , u2019:x2', and , u2019: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.

◆ donner::svg::components::RectComponent

struct donner::svg::components::RectComponent

Parameters for a <rect> element.

Class Members
RectProperties properties The properties of the rectangle.

◆ 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::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::ComputedTextComponent

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

Note
This structure is internal to the rendering pipeline and is not exposed through the public DOM API.
Class Members
SmallVector< TextSpan, 1 > spans

◆ donner::svg::components::ComputedTextGeometryComponent

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.

◆ donner::svg::components::TextComponent

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 <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.
SmallVector< RcString, 1 > textChunks Direct text chunks between child elements, in DOM order.

Chunk 0 is the text before the first child element, chunk 1 is the text between the first and second child elements, and so on. Empty chunks are preserved so mixed text and element content can be reconstructed in order during layout.

optional< Lengthd > textLength Override for the text length. If empty, the property is not set.

◆ donner::svg::components::TextPathComponent

struct donner::svg::components::TextPathComponent

Stores attributes specific to <textPath> elements.

The <textPath> element renders text along an arbitrary path referenced by href.

Class Members
RcString href Reference to a <path> element (IRI fragment, e.g., "#myPath").
TextPathMethod method = TextPathMethod::Align How glyphs are placed on the path.
TextPathSide side = TextPathSide::Left Which side of the path to render text.
TextPathSpacing spacing = TextPathSpacing::Exact Spacing control.
optional< Lengthd > startOffset Offset along the path where text begins. Percentages are relative to path length.

◆ donner::svg::components::TextPositioningComponent

struct donner::svg::components::TextPositioningComponent

Defines the positioning of a text element, which may have other text elements as children.

Created on each <text> and <tspan> element.

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.

◆ donner::svg::components::TextRootComponent

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.

◆ donner::svg::components::TinySkiaPathCacheComponent

struct donner::svg::components::TinySkiaPathCacheComponent

Per-entity cache of a shape's donner::Path converted to tiny_skia::Path.

Installed lazily at the draw call sites via get_or_emplace, keyed by PathShape::sourceEntity; removed by the ComputedPathComponent listener when the geometry changes or the entity goes away. A null source entity (overlay drawing, test harnesses) is not cached and converts inline, exactly as before the cache existed.

Lives in donner::svg::components, alongside ComputedPathComponent and every other component it derives from, rather than in a backend-private namespace. (Geode's equivalent sits in donner::geode instead, to match the other Geode types its renderer references unqualified; the tiny-skia backend has no such namespace and already spells its component dependencies components::.)

Class Members
optional< Path > closedPath Conversion that preserves ClosePath verbs. Used by fills and by every ordinary stroke.
optional< Path > openedPath Conversion that replaces each ClosePath with an explicit closing line. Used only by the dash-stroke path that has to emit caps at a closed contour's seam, so it is filled in on demand rather than alongside closedPath.

◆ donner::svg::components::TinySkiaImageCacheComponent

struct donner::svg::components::TinySkiaImageCacheComponent

Per-entity cache of a LoadedImageComponent's pixels converted from the straight-alpha ImageResource contract to the premultiplied form tiny-skia samples.

Installed lazily by drawImage via get_or_emplace, keyed by ImageParams::sourceEntity; removed by the LoadedImageComponent listener when the element loads different pixels or goes away. The dimensions are stored alongside the payload and rechecked on every hit, so a draw whose source no longer matches the cached buffer reconverts instead of sampling the wrong extent.

Residency tradeoff: the cached payload is a second full copy of the element's decoded pixels and there is no eviction, so a drawn image stays doubled in resident bytes for as long as the document holds it. That is bounded by the images the document actually draws (an undrawn or removed image holds nothing), and it buys a full-buffer conversion pass and allocation per image per frame; a document with a large enough image working set to care would need an eviction policy this cache deliberately does not have.

See also
TinySkiaPathCacheComponent for the namespace-placement rationale.
Class Members
int height = 0 Height the payload was converted at, in pixels.
vector< uint8_t > premultiplied Premultiplied RGBA8, tightly packed.
int width = 0 Width the payload was converted at, in pixels.

Typedef Documentation

◆ FilterPrimitive

Initial value:
Parameters for feDiffuseLighting.
Definition FilterGraph.h:412
Parameters for feDropShadow.
Definition FilterGraph.h:250
Parameters for feFlood.
Definition FilterGraph.h:176
Parameters for feMerge. Children are represented as additional inputs on the FilterNode.
Definition FilterGraph.h:247
Parameters for feOffset.
Definition FilterGraph.h:182
Parameters for feSpecularLighting.
Definition FilterGraph.h:420
Parameters for feTile.
Definition FilterGraph.h:321
Parameters for feBlend.
Definition FilterGraph.h:188
Parameters for feColorMatrix.
Definition FilterGraph.h:233
Parameters for feComponentTransfer.
Definition FilterGraph.h:260
Parameters for feComposite.
Definition FilterGraph.h:213
Parameters for feConvolveMatrix.
Definition FilterGraph.h:288
Parameters for feDisplacementMap.
Definition FilterGraph.h:378
Parameters for feGaussianBlur.
Definition FilterGraph.h:162
Parameters for feImage.
Definition FilterGraph.h:340
Parameters for feMorphology.
Definition FilterGraph.h:308
Parameters for feTurbulence.
Definition FilterGraph.h:324

Variant holding any filter primitive type.

◆ ResolvedPaintServer

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

The resolved paint server for a fill or stroke.

◆ ShadowSizedElementHandler

Initial value:
std::function<bool(
Registry& registry, Entity shadowEntity, EntityHandle useEntity, Entity symbolEntity,
ShadowBranchType branchType, ParseWarningSink& warningSink)>
Collects parse warnings during parsing.
Definition ParseWarningSink.h:29
ShadowBranchType
There are two types of shadow trees:
Definition ShadowBranch.h:22
entt::basic_registry< Entity > Registry
Registry type for the SVG ECS, which is the entry point for storing all data.
Definition EcsRegistry.h:50
entt::entity Entity
Entity type for the Registry, a std::uint32_t alias.
Definition EcsRegistry.h:20
entt::basic_handle< Registry > EntityHandle
Convenience handle for a Entity with an attached Registry.
Definition EcsRegistry.h:57

Type definition for a callback to process sized elements.

This allows systems that can't directly depend on LayoutSystem to request sized element processing.

Parameters
registryECS registry.
shadowEntityThe shadow entity to create a computed component for.
useEntityThe source <use> that may provide size override.
symbolEntityThe target <symbol> entity whose properties might be overridden.
branchTypeThe type of branch being created.
warningSinkOutput vector of parse errors, if any.
Returns
true if a component was created, false otherwise.

Enumeration Type Documentation

◆ AnimationFill

enum class donner::svg::components::AnimationFill : uint8_t
strong

Fill behavior when an animation finishes.

Enumerator
Remove 

Revert to base value when the animation ends.

Freeze 

Persist the final animation value.

◆ AnimationPhase

enum class donner::svg::components::AnimationPhase : uint8_t
strong

Phase of an animation element's lifecycle.

Enumerator
Before 

Document time is before the animation's begin time.

Active 

Animation is currently active.

After 

Animation has finished its active duration.

◆ AnimationRestart

enum class donner::svg::components::AnimationRestart : uint8_t
strong

Restart behavior for an animation.

Enumerator
Always 

Can always restart.

WhenNotActive 

Can only restart when not active.

Never 

Cannot restart.

◆ CalcMode

enum class donner::svg::components::CalcMode : uint8_t
strong

Interpolation mode for <animate>.

The current SMIL subset supports discrete and linear only; paced and spline are deferred. The parser maps unsupported modes to Linear.

Enumerator
Discrete 

Jump between values at keyTime boundaries.

Linear 

Linear interpolation (default for <animate>).

◆ FilterMemoryModel

enum class donner::svg::components::FilterMemoryModel : std::uint8_t
strong

Intermediate-retention behavior used to estimate backend memory before filter execution.

Enumerator
CpuFloatNamedResults 

TinySkia retains named float RGBA results (16 bytes per pixel).

GpuAllNodes 

Geode may retain several RGBA textures for every graph node.

◆ FilterStandardInput

enum class donner::svg::components::FilterStandardInput : std::uint8_t
strong

Standard named inputs available to filter primitives.

See also
https://drafts.fxtf.org/filter-effects/#FilterPrimitiveSubRegion
Enumerator
SourceGraphic 

The original element rendering.

SourceAlpha 

Alpha channel of SourceGraphic (RGB = 0).

FillPaint 

The element's fill paint, conceptually infinite.

StrokePaint 

The element's stroke paint, conceptually infinite.

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

OffscreenFeImage 

For feImage fragment references.

◆ TextPathMethod

Method for placing glyphs along a path in <textPath>.

Enumerator
Align 

Glyphs are aligned to the tangent of the path.

Stretch 

Glyphs are stretched along the tangent to match path curvature.

◆ TextPathSide

Which side of the path to render text in <textPath>.

Enumerator
Left 

Text rendered on the left side (default).

Right 

Text rendered on the right side (reversed direction).

◆ TextPathSpacing

Spacing mode for <textPath>.

Enumerator
Auto 

UA determines spacing.

Exact 

Exact inter-character spacing.

◆ TransformAnimationType

Transform type for <animateTransform>.

Enumerator
Translate 

translate(tx [ty])

Scale 

scale(sx [sy])

Rotate 

rotate(angle [cx cy])

SkewX 

skewX(angle)

SkewY 

skewY(angle)

Function Documentation

◆ EvaluateConditionalProcessing() [1/2]

bool donner::svg::components::EvaluateConditionalProcessing ( const ConditionalProcessingComponent & conditional)

Overload of EvaluateConditionalProcessing that uses the default user language list of {"en"}, matching resvg's default (the resvg-test-suite goldens are rendered with it).

Parameters
conditionalConditional-processing attribute values to evaluate.
Returns
true if all present attributes evaluate to true (the element may render).

◆ EvaluateConditionalProcessing() [2/2]

bool donner::svg::components::EvaluateConditionalProcessing ( const ConditionalProcessingComponent & conditional,
std::span< const RcString > userLanguages )

Evaluates an element's conditional-processing attributes.

Matches resvg's evaluation rules so rendering agrees with the resvg-test-suite goldens:

  • requiredFeatures always evaluates to true (deprecated in SVG2, ignored).
  • requiredExtensions evaluates to true only when empty (no extensions are supported).
  • systemLanguage evaluates to true if any comma-separated tag equals a user language or is a sub-tag of it (e.g. both "en" and "en-GB" match the default user language "en").
Parameters
conditionalConditional-processing attribute values to evaluate.
userLanguagesUser's preferred languages, in priority order (see SVGDocument::setUserLanguages). A systemLanguage value matches if any of these languages matches per SystemLanguageMatches. An empty list disables all systemLanguage matches.
Returns
true if all present attributes evaluate to true (the element may render).

◆ FilterGraphExecutionCost()

bool donner::svg::components::FilterGraphExecutionCost ( const FilterGraph & graph,
std::uint64_t pixelCount,
FilterMemoryModel memoryModel,
std::uint64_t & workUnitsOut,
std::uint64_t & intermediateBytesOut )
inline

Estimate a filter graph's aggregate execution cost for a pixel surface.

This rejects attacker-controlled graphs before allocating per-node buffers or starting convolution loops. The estimate is intentionally conservative: GPU primitives may need up to four intermediate RGBA textures, while the CPU backend retains every named float result.

◆ FindAttachedEntityById()

Entity donner::svg::components::FindAttachedEntityById ( Registry & registry,
const RcString & id )

Finds an attached document-tree entity with the given ID.

Uses SVGDocumentContext's ID map as the fast path. If that map points to a detached or stale entity, falls back to a document-order tree scan so detached-but-held duplicate IDs do not mask an attached element.

Parameters
registryDocument registry.
idID to resolve.
Returns
The attached entity with id, or entt::null when none exists.

◆ HasConditionalProcessingAttributes()

bool donner::svg::components::HasConditionalProcessingAttributes ( const ConditionalProcessingComponent & conditional)

Return true if any conditional-processing attribute is still present on conditional.

Parameters
conditionalComponent to inspect.
Returns
true if any conditional-processing field is present.

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

◆ InvalidateTextLayout()

Entity donner::svg::components::InvalidateTextLayout ( EntityHandle handle)

Drop the cached text layout of the text root enclosing handle.

ComputedTextGeometryComponent is a memoized layout derived from the text root's computed style, text content, and positioning attributes. Both renderers draw straight out of it, so any mutation that can change one of those inputs must drop it or the old glyphs keep rendering.

Walks up from handle until it finds the TextRootComponent, so it is safe to call with a <tspan>, <textPath>, or the <text> root itself. Calling it on an entity outside any text subtree is a no-op.

Parameters
handleElement whose enclosing text root should be invalidated.
Returns
The text root entity that was invalidated, or entt::null if handle is not inside a text subtree.

◆ IsConditionalProcessingAttribute()

bool donner::svg::components::IsConditionalProcessingAttribute ( const xml::XMLQualifiedNameRef & name)

Return true if name is one of the SVG conditional-processing attributes.

Parameters
nameAttribute name to inspect.
Returns
true if name is requiredFeatures, requiredExtensions, or systemLanguage.

◆ IsEntityAttachedToDocument()

bool donner::svg::components::IsEntityAttachedToDocument ( const Registry & registry,
Entity entity )
inline

Returns true when an entity is currently part of the live document tree.

Entities without a NodeLifetimeComponent are treated as attached so legacy raw-ECS tests and transitional call sites keep their previous behavior until every SVG entity is lifetime annotated.

Parameters
registryRegistry that owns entity.
entityEntity to inspect.

◆ ParseTextPositioningPresentationAttribute()

ParseResult< bool > donner::svg::components::ParseTextPositioningPresentationAttribute ( EntityHandle handle,
std::string_view name,
const parser::PropertyParseFnParams & params )

Parse the text positioning presentation attributes (x, y, dx, dy, rotate) on <text> / <tspan> / <textPath> elements into TextPositioningComponent, and invalidate the text root's cached layout so the next render picks the new positions up.

This is the programmatic-mutation counterpart of the XML parse path (ParseAttribute<SVGTextElement> in AttributeParser.cc): without it, a setAttribute("x", ...) on a text element stores the raw attribute but never updates the layout input, so programmatically positioned text renders at the origin.

Parameters
handleEntity handle of the text content element.
nameAttribute name.
paramsParse parameters containing the attribute value.
Returns
true if the attribute was handled, false for unrelated attributes.

◆ RemoveConditionalProcessingAttribute()

bool donner::svg::components::RemoveConditionalProcessingAttribute ( ConditionalProcessingComponent & conditional,
const xml::XMLQualifiedNameRef & name )

Clear a conditional-processing attribute value.

Parameters
conditionalComponent to update.
nameConditional-processing attribute name.
Returns
true if name was a conditional-processing attribute and conditional was updated.

◆ SetConditionalProcessingAttribute()

bool donner::svg::components::SetConditionalProcessingAttribute ( ConditionalProcessingComponent & conditional,
const xml::XMLQualifiedNameRef & name,
std::string_view value )

Store a conditional-processing attribute value.

Parameters
conditionalComponent to update.
nameConditional-processing attribute name.
valueRaw attribute value.
Returns
true if name was a conditional-processing attribute and conditional was updated.

◆ SystemLanguageMatches()

bool donner::svg::components::SystemLanguageMatches ( std::string_view systemLanguage,
std::string_view userLanguage )

Evaluates a single systemLanguage attribute value against the user-preferred language.

Parameters
systemLanguageComma-separated list of BCP 47 language tags (e.g. "ru, en").
userLanguageUser-preferred language tag to match against (e.g. "en"). A document tag matches if it equals userLanguage or starts with userLanguage + "-", compared case-insensitively.
Returns
true if any tag in the list matches the user language.

Variable Documentation

◆ kMaximumFilterFrameBytes

std::uint64_t donner::svg::components::kMaximumFilterFrameBytes = 256ULL * 1024 * 1024
inlineconstexpr

Maximum filter memory reserved across one frame, including RGBA capture surfaces.

Native builds allow one established high-zoom blur capture plus its in-place float surface. Wasm retains the lower ceiling because its fixed heap cannot safely admit that desktop-only workload. Renderer surfaces and decoded resources remain separately bounded.

◆ kMaximumFilterFrameWorkUnits

std::uint64_t donner::svg::components::kMaximumFilterFrameWorkUnits = 512ULL * 1024 * 1024
inlineconstexpr

Maximum aggregate pixel operations accepted across one rendered frame.

The established splash asset contains three independent high-zoom blur layers. This allows that bounded workload while rejecting a fourth full-envelope blur and large repeated graphs.

◆ kMaximumFilterIntermediateBytes

std::uint64_t donner::svg::components::kMaximumFilterIntermediateBytes = 256ULL * 1024 * 1024
inlineconstexpr

Maximum estimated bytes retained by filter intermediates during one execution.

This keeps ordinary production-sized filters available while preventing one graph from consuming a large fraction of the desktop or Wasm heap.

◆ kMaximumFilterKernelValues

std::size_t donner::svg::components::kMaximumFilterKernelValues
inlineconstexpr
Initial value:
=
constexpr int kMaximumFilterConvolveOrder
Maximum convolve order on either axis and aggregate kernel payload.
Definition FilterGraph.h:70

◆ kMaximumFilterMorphologyRetainedBuffers

std::uint64_t donner::svg::components::kMaximumFilterMorphologyRetainedBuffers
inlineconstexpr
Initial value:
=
constexpr std::uint64_t kMaximumFilterMorphologyPassesPerAxis
Geode decomposes morphology into shader passes whose per-axis radius is at most 31.
Definition FilterGraph.h:42

◆ kMaximumFilterMorphologyWorkMultiplier

std::uint64_t donner::svg::components::kMaximumFilterMorphologyWorkMultiplier
inlineconstexpr
Initial value:
=
constexpr int kMaximumFilterPixelRadius
Maximum blur standard deviation or morphology radius after conversion to device pixels.
Definition FilterGraph.h:39

◆ kMaximumFilterSurfacePixels

std::size_t donner::svg::components::kMaximumFilterSurfacePixels = 12 * 1024 * 1024
inlineconstexpr

Maximum pixel area of a filter-specific intermediate surface.

CPU filter execution expands each pixel into several float buffers. Keep the limit below a 4096-by-4096 surface while retaining the established high-zoom rendering envelope.