|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
Rendering controller, which instantiates and and manages the rendering tree. More...
#include "donner/svg/renderer/RenderingContext.h"
Classes | |
| struct | FeImageSubtreeResult |
| Result from createFeImageShadowTree. More... | |
Public Member Functions | |
| RenderingContext (Registry ®istry) | |
| Constructor. | |
| void | instantiateRenderTree (bool verbose, ParseWarningSink &warningSink) |
| Create the render tree for the document, optionally returning parse warnings found when parsing deferred parts of the tree. | |
| void | ensureComputedComponents (ParseWarningSink &warningSink) |
| Create all computed components needed for text/layout/style queries without instantiating render instances. | |
| Entity | findIntersecting (const Vector2d &point) |
| Find the first entity that intersects the given point, using spatial acceleration when the document has enough elements. | |
| std::vector< Entity > | findAllIntersecting (const Vector2d &point) |
| Find all entities that intersect the given point, ordered front-to-back. | |
| std::vector< Entity > | findIntersectingRect (const Box2d &rect) |
| Find all entities whose world-space bounds intersect the given rectangle, ordered front-to-back. | |
| std::optional< Box2d > | getWorldBounds (Entity entity) |
| Get the world-space bounding box of an entity (fill bounds only, not including stroke). | |
| void | invalidateRenderTree () |
| Invalidate the rendering tree, forcing it to be recreated on the next render. | |
| std::optional< FeImageSubtreeResult > | createFeImageShadowTree (Entity hostEntity, Entity targetEntity, bool verbose) |
| Create a shadow tree for an feImage fragment reference, allowing elements inside <defs> to be rendered offscreen. | |
| void | setInitialContextPaint (const ResolvedPaintServer &fill, const ResolvedPaintServer &stroke) |
| Set initial context-fill and context-stroke values for sub-document rendering. | |
| void | clearInitialContextPaint () |
| Clear previously set context-fill and context-stroke values. | |
Rendering controller, which instantiates and and manages the rendering tree.
Used during the rendering phase in combination with the rendering backend.
| struct donner::svg::components::RenderingContext::FeImageSubtreeResult |
| void donner::svg::components::RenderingContext::clearInitialContextPaint | ( | ) |
Clear previously set context-fill and context-stroke values.
Call after rendering a sub-document to prevent stale context paint from leaking to subsequent renders of the same cached sub-document handle.
| void donner::svg::components::RenderingContext::ensureComputedComponents | ( | ParseWarningSink & | warningSink | ) |
Create all computed components needed for text/layout/style queries without instantiating render instances.
| warningSink | Sink to collect warnings. |
| std::vector< Entity > donner::svg::components::RenderingContext::findAllIntersecting | ( | const Vector2d & | point | ) |
Find all entities that intersect the given point, ordered front-to-back.
| point | Point to find intersecting entities for |
Find the first entity that intersects the given point, using spatial acceleration when the document has enough elements.
| point | Point to find the intersecting entity for |
| std::vector< Entity > donner::svg::components::RenderingContext::findIntersectingRect | ( | const Box2d & | rect | ) |
Find all entities whose world-space bounds intersect the given rectangle, ordered front-to-back.
Uses the spatial grid for acceleration when available.
| rect | Rectangle in world coordinates to test intersection against |
Get the world-space bounding box of an entity (fill bounds only, not including stroke).
| entity | Entity to get bounds for |
| void donner::svg::components::RenderingContext::instantiateRenderTree | ( | bool | verbose, |
| ParseWarningSink & | warningSink ) |
Create the render tree for the document, optionally returning parse warnings found when parsing deferred parts of the tree.
| verbose | If true, enable verbose logging. |
| warningSink | Sink to collect warnings. |
| void donner::svg::components::RenderingContext::setInitialContextPaint | ( | const ResolvedPaintServer & | fill, |
| const ResolvedPaintServer & | stroke ) |
Set initial context-fill and context-stroke values for sub-document rendering.
When a <use> element references an external SVG, the <use> element's resolved fill and stroke become the initial context-fill/context-stroke in the sub-document.
| fill | Initial context-fill value. |
| stroke | Initial context-stroke value. |