|
|
Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
|
#include <entt/entity/helper.hpp>#include <optional>#include "donner/base/Box.h"#include "donner/base/EcsRegistry.h"#include "donner/base/Transform.h"#include "donner/svg/components/filter/FilterEffect.h"#include "donner/svg/core/ClipPathUnits.h"#include "donner/svg/core/MarkerUnits.h"#include "donner/svg/core/MaskUnits.h"#include "donner/svg/properties/PaintServer.h"Classes | |
| 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. More... | |
| 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). More... | |
| 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. More... | |
| struct | donner::svg::components::ResolvedClipPath |
| Contains resolved information about the clip-path property, such as which element it is pointing to. More... | |
| struct | donner::svg::components::ResolvedMask |
| Contains resolved information about the mask property, such as which element it is pointing to. More... | |
| struct | donner::svg::components::ResolvedMarker |
| Resolved <marker> reference applied to a rendering instance. More... | |
| struct | donner::svg::components::RenderingInstanceComponent |
| An instance of the entity in the rendering tree. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
| namespace | donner::svg |
| Donner SVG library, which can load, manipulate and render SVG files. | |
| namespace | donner::svg::components |
| Contains the implementation of the Donner ECS,. | |
Typedefs | |
| using | donner::svg::components::ResolvedPaintServer |
| The resolved paint server for a fill or stroke. | |
| using | donner::svg::components::ResolvedFilterEffect = std::variant<std::vector<FilterEffect>, ResolvedReference> |
| The resolved filter effect for a filter. | |
Functions | |
| bool | donner::svg::components::HasPaint (const ResolvedPaintServer &paint) |
| Returns true if the paint server is not a PaintServer::None. | |
| struct donner::svg::components::SubtreeInfo |
Created on the start of a subtree, to inform the renderer about which element ends the current subtree, plus how many isolated layers need to be popped when the subtree is complete.
| Class Members | ||
|---|---|---|
| Entity | firstRenderedEntity | Indicates the first entity within the current subtree. The renderer will continue rendering entities until it reaches this one, then it will pop restorePopDepth isolated layers from the render state. |
| Entity | lastRenderedEntity | Indicates the last entity within the current subtree. The renderer will continue rendering entities until it reaches this one, then it will pop restorePopDepth isolated layers from the render state. |
| int | restorePopDepth = 0 | How many isolated layers to pop after rendering this entity. |
| struct donner::svg::components::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. |
| 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. |