|
|
Donner 0.5.0
Embeddable browser-grade SVG2 engine
|
Public Member Functions | |
| void | draw (SVGDocument &document) override=0 |
| Renders the given SVG document. | |
| int | width () const override=0 |
| Returns the rendered width in device pixels. | |
| int | height () const override=0 |
| Returns the rendered height in device pixels. | |
| Public Member Functions inherited from donner::svg::RendererInterface | |
| virtual void | beginFrame (const RenderViewport &viewport)=0 |
| Begins a render pass with the given viewport. | |
| virtual void | endFrame ()=0 |
| Completes the current render pass, flushing any pending work. | |
| virtual void | setTransform (const Transform2d &transform)=0 |
| Sets the absolute transform on the renderer, replacing the current matrix. | |
| virtual void | pushTransform (const Transform2d &transform)=0 |
| Pushes a transform onto the renderer stack, composing with the current transform. | |
| virtual void | popTransform ()=0 |
| Pops the most recent transform from the renderer stack. | |
| virtual void | pushClip (const ResolvedClip &clip)=0 |
| Pushes a clip path/mask onto the renderer stack. | |
| virtual void | popClip ()=0 |
| Pops the most recent clip from the renderer stack. | |
| virtual void | pushIsolatedLayer (double opacity, MixBlendMode blendMode)=0 |
| Pushes an isolated compositing layer with the given opacity and blend mode. | |
| virtual void | popIsolatedLayer ()=0 |
| Pops the most recent isolated layer, compositing it with the given opacity. | |
| virtual void | pushFilterLayer (const components::FilterGraph &filterGraph, const std::optional< Box2d > &filterRegion)=0 |
| Pushes a filter layer that applies the given filter graph to all content drawn within it. | |
| virtual void | popFilterLayer ()=0 |
| Pops the most recent filter layer. | |
| virtual void | pushMask (const std::optional< Box2d > &maskBounds)=0 |
| Begins mask rendering. | |
| virtual void | transitionMaskToContent ()=0 |
| Transitions from rendering mask content to rendering masked content. | |
| virtual void | popMask ()=0 |
| Pops the mask layer stack, compositing the masked content. | |
| virtual void | beginPatternTile (const Box2d &tileRect, const Transform2d &targetFromPattern)=0 |
| Begins recording content into a pattern tile. | |
| virtual void | endPatternTile (bool forStroke)=0 |
| Ends pattern tile recording and sets the resulting tiled shader as the current fill or stroke paint. | |
| virtual void | setPaint (const PaintParams &paint)=0 |
| Sets the active paint parameters used by subsequent draw calls. | |
| virtual void | drawPath (const PathShape &path, const StrokeParams &stroke)=0 |
| Draws an arbitrary path using the current paint state. | |
| virtual void | drawRect (const Box2d &rect, const StrokeParams &stroke)=0 |
| Convenience helper for drawing axis-aligned rectangles. | |
| virtual void | drawEllipse (const Box2d &bounds, const StrokeParams &stroke)=0 |
| Convenience helper for drawing ellipses bounded by the provided box. | |
| virtual void | drawImage (const ImageResource &image, const ImageParams ¶ms)=0 |
| Draws an image resource into the given target rectangle. | |
| virtual void | drawText (Registry ®istry, const components::ComputedTextComponent &text, const TextParams ¶ms)=0 |
| Draws pre-shaped text with the provided paint parameters. | |
| virtual RendererBitmap | takeSnapshot () const =0 |
| Captures a CPU-readable snapshot of the current frame buffer for testing or downstream consumers. | |
| virtual std::unique_ptr< RendererInterface > | createOffscreenInstance () const |
| Creates an independent offscreen renderer instance of the same type as this one. | |
|
overridepure virtual |
Renders the given SVG document.
Implementations prepare the document, traverse the render tree, and emit drawing commands.
Implements donner::svg::RendererInterface.
|
nodiscardoverridepure virtual |
Returns the rendered height in device pixels.
Implements donner::svg::RendererInterface.
|
nodiscardoverridepure virtual |
Returns the rendered width in device pixels.
Implements donner::svg::RendererInterface.