|
|
| RenderingInstanceComponent ()=default |
| | Default constructor.
|
|
bool | hasClipPath () const |
| | Whether either reference or CSS basic-shape clipping constrains this subtree.
|
| template<typename Visit> |
| void | forEachDrawnContent (Visit &&visit) const |
| | Calls visit with the mask, marker and pattern content drawn for this instance, including the pattern tiles of its text spans' own paint (spanPatternPaints).
|
| EntityHandle | dataHandle (Registry ®istry) const |
| | Shortcut for creating a handle for the dataEntity, the entity containing the structural components of the instance like ClassComponent.
|
| EntityHandle | styleHandle (Registry ®istry) const |
| | A handle for the entity containing style information, which may be different than the dataHandle if this instance is within a shadow tree.
|
| bool | isShadow (Registry ®istry) const |
| | Return true if this is a shadow tree instance.
|
|
|
int | drawOrder = 0 |
| | The draw order of the element, computed from the traversal order of the tree.
|
|
Entity | subtreeLastEntity = entt::null |
| | Last rendered descendant, including this instance when it has no rendered children.
|
|
bool | visible = true |
| | Whether the element is visible. Note that elements may still influence rendering behavior when they are hidden, such as <pattern> elements.
|
|
bool | isolatedLayer = false |
| | True if this instance establishes a new rendering layer, such as if there is opacity.
|
|
bool | feImageFragment = false |
| | True for instances created while instantiating an feImage fragment, including the paint, mask and marker content they draw. They are drawn only into the fragment, never by the main traversal.
|
|
Transform2d | worldFromEntityTransform |
| | Cascaded transform mapping entity-local coords to canvas coords. Applying this to a <circle>'s (cx, cy) yields that circle's canvas position. Composed with RendererDriver::surfaceFromCanvasTransform_ as worldFromEntityTransform * surfaceFromCanvasTransform_ (donner's left-first operator*: "apply entity→world, then world→surface") to form the final render CTM.
|
|
std::optional< Box2d > | clipRect |
| | The clip rect of the element, if set.
|
|
bool | basicClipPath = false |
| | A resolved CSS basic shape establishes a subtree clip.
|
|
std::optional< ResolvedClipPath > | clipPath |
| | The clip path of the element, if set.
|
|
std::optional< ResolvedMask > | mask |
| | The mask of the element, if set.
|
|
std::optional< ResolvedMarker > | markerStart |
| | The resolved marker for marker-start, if any.
|
|
std::optional< ResolvedMarker > | markerMid |
| | The resolved marker for marker-mid, if any.
|
|
std::optional< ResolvedMarker > | markerEnd |
| | The resolved marker for marker-end, if any.
|
|
Entity | dataEntity = entt::null |
| | The entity containing the structural components of the instance, element-specific components like IdComponent.
|
| Entity | textSpanRoot = entt::null |
| | Set when this instance paints part of a text element rather than its own geometry: the root <text> entity whose laid-out spans it draws.
|
|
ResolvedPaintServer | resolvedFill = PaintServer::None() |
| | The resolved paint server for the instance's fill, if any.
|
|
ResolvedPaintServer | resolvedStroke = PaintServer::None() |
| | The resolved paint server for the instance's stroke, if any.
|
| std::vector< SpanPatternPaint > | spanPatternPaints |
| | The distinct patterns that the text spans this instance paints reference from their own fill or stroke, other than the instance's own fill or stroke pattern.
|
|
std::optional< ResolvedFilterEffect > | resolvedFilter |
| | The resolved filter effect on this instance, if any.
|
|
std::optional< SubtreeInfo > | subtreeInfo |
| | Information about this elements subtree, if there is a rendering-influencing subtree attached to this entity.
|
An instance of the entity in the rendering tree.
Each renderered entity has an instance with a unique drawOrder, which enables this list to be sorted and traversed to render the tree.
template<typename Visit>
| void donner::svg::components::RenderingInstanceComponent::forEachDrawnContent |
( |
Visit && | visit | ) |
const |
|
inline |
Calls visit with the mask, marker and pattern content drawn for this instance, including the pattern tiles of its text spans' own paint (spanPatternPaints).
That content is instantiated once, as rendering instances of its own, after the first element that draws it, and shared by every later element that draws the same marker, mask or pattern. It reaches the frame only through the elements that draw it, never as content of its own.
- Parameters
-
| visit | Called with the SubtreeInfo of each content subtree. |
| Entity donner::svg::components::RenderingInstanceComponent::textSpanRoot = entt::null |
Set when this instance paints part of a text element rather than its own geometry: the root <text> entity whose laid-out spans it draws.
A <tspan> or <textPath> that carries clip-path, mask, or filter becomes its own instance so those effects get their own layer, while dataEntity stays the span so objectBoundingBox effect regions resolve against the span's own box. The text root's instance paints every span that no such instance claims. A span nested inside a claimed span is painted by the outer instance, so its own effects are not applied yet, and a claimed span paints after the text root's remaining spans rather than in document order. A <use> copy has no span instances of its own, so it paints every span without the span-level effects.