Donner 0.5.1
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
RendererInterface.h File Reference
Include dependency graph for RendererInterface.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::svg::RenderViewport
 Describes the viewport for a render pass. More...
struct  donner::svg::RendererBitmap
 CPU-readable bitmap produced by a renderer snapshot. More...
struct  donner::svg::PathShape
 Represents a resolved path along with its fill rule, transform, and layer index for boolean ops. More...
struct  donner::svg::PaintParams
 Paint state derived from resolved style for the current node. More...
struct  donner::svg::ResolvedClip
 Clip stack entry combining rectangles, paths, and optional masks. More...
struct  donner::svg::ImageParams
 Parameters describing how an image should be drawn. More...
struct  donner::svg::TextParams
 Parameters describing how text is drawn and outlined. More...
class  donner::svg::RendererInterface
 Backend-agnostic rendering interface consumed by RendererDriver during document traversal. 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.

Enumerations

enum class  donner::svg::AlphaType : uint8_t {
  donner::svg::Premultiplied ,
  donner::svg::Unpremultiplied
}
 Alpha channel interpretation for pixel data. More...

Class Documentation

◆ donner::svg::RenderViewport

struct donner::svg::RenderViewport

Describes the viewport for a render pass.

Collaboration diagram for donner::svg::RenderViewport:
[legend]
Class Members
double devicePixelRatio = 1.0 Device pixel ratio used to map logical coordinates to device pixels.
Vector2d size = Vector2d::Zero() Logical size in CSS/SVG units after layout.

◆ donner::svg::PathShape

struct donner::svg::PathShape

Represents a resolved path along with its fill rule, transform, and layer index for boolean ops.

Collaboration diagram for donner::svg::PathShape:
[legend]
Class Members
FillRule fillRule = FillRule::NonZero
int layer = 0 Layer index for boolean combination: paths on the same layer are unioned, layers are intersected.
Transform2d parentFromEntity Transform from clip path child to the clip path's coordinate system.
Path path
EntityHandle sourceEntity Source entity this path was derived from. Set by the driver at the drawPath call site (RendererDriver::traverseRange). Backends that cache per-entity state key off this (see GeodePathCacheComponent). A null EntityHandle (the default) means "no associated entity" — non-driver callers (overlay drawing, test harnesses) leave it null and backends fall back to the un-cached path.

◆ donner::svg::PaintParams

struct donner::svg::PaintParams

Paint state derived from resolved style for the current node.

Collaboration diagram for donner::svg::PaintParams:
[legend]
Class Members
Color currentColor = css::Color(css::RGBA()) CurrentColor value for paint server resolution.
ResolvedPaintServer fill = PaintServer::None{}
double fillOpacity = 1.0
double opacity = 1.0 Multiplicative opacity applied to all drawing.
ResolvedPaintServer stroke = PaintServer::None{}
double strokeOpacity = 1.0
StrokeParams strokeParams
Box2d viewBox View box used for unit resolution and gradient coordinate conversion.

◆ donner::svg::ImageParams

struct donner::svg::ImageParams

Parameters describing how an image should be drawn.

Collaboration diagram for donner::svg::ImageParams:
[legend]
Class Members
bool imageRenderingPixelated = false Whether to favor nearest-neighbor sampling for pixelated rendering.
double opacity = 1.0
Box2d targetRect Destination rectangle in device-independent units.

◆ donner::svg::TextParams

struct donner::svg::TextParams

Parameters describing how text is drawn and outlined.

Collaboration diagram for donner::svg::TextParams:
[legend]
Class Members
DominantBaseline dominantBaseline = DominantBaseline::Auto
Color fillColor = css::Color(css::RGBA())
span< const FontFace > fontFaces @font-face declarations for custom font resolution.
SmallVector< RcString, 1 > fontFamilies
FontMetrics fontMetrics
Lengthd fontSize
LengthAdjust lengthAdjust = LengthAdjust::Default
double letterSpacingPx = 0.0 Extra spacing added after each character (CSS letter-spacing). 0 = normal.
double opacity = 1.0
Color strokeColor = css::Color(css::RGBA())
StrokeParams strokeParams
TextAnchor textAnchor = TextAnchor::Start
TextDecoration textDecoration = TextDecoration::None
optional< Lengthd > textLength If set, stretches or compresses text to fill the given length.
entity textRootEntity = entt::null Entity of the text root element, for cached layout lookup. entt::null if unknown.
Box2d viewBox
double wordSpacingPx = 0.0 Extra spacing added after each word/space character (CSS word-spacing). 0 = normal.
WritingMode writingMode = WritingMode::HorizontalTb CSS writing-mode for this text element. Controls horizontal vs vertical text flow.