|
|
Donner
C++20 SVG rendering library
|
#include <cstddef>#include <optional>#include <span>#include <vector>#include "donner/base/Box.h"#include "donner/base/RcString.h"#include "donner/base/RelativeLengthMetrics.h"#include "donner/base/SmallVector.h"#include "donner/base/Transform.h"#include "donner/css/Color.h"#include "donner/svg/components/RenderingInstanceComponent.h"#include "donner/svg/components/filter/FilterEffect.h"#include "donner/svg/components/text/ComputedTextComponent.h"#include "donner/svg/core/FillRule.h"#include "donner/svg/core/PathSpline.h"#include "donner/svg/core/Stroke.h"#include "donner/svg/resources/ImageResource.h"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::StrokeParams |
| Stroke configuration used for path and primitive drawing. 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 the traversal driver. 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. | |
| struct donner::svg::RenderViewport |
Describes the viewport for a render pass.
| 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. |
| struct donner::svg::PathShape |
Represents a resolved path along with its fill rule, transform, and layer index for boolean ops.
| Class Members | ||
|---|---|---|
| Transformd | entityFromParent | Transform from clip path child to the clip path's coordinate system. |
| FillRule | fillRule = FillRule::NonZero | |
| int | layer = 0 | Layer index for boolean combination: paths on the same layer are unioned, layers are intersected. |
| PathSpline | path | |
| struct donner::svg::StrokeParams |
Stroke configuration used for path and primitive drawing.
| Class Members | ||
|---|---|---|
| vector< double > | dashArray | Dash pattern lengths alternating on/off segments. |
| double | dashOffset = 0.0 | Dash phase offset. |
| StrokeLinecap | lineCap = StrokeLinecap::Butt | |
| StrokeLinejoin | lineJoin = StrokeLinejoin::Miter | |
| double | miterLimit = 4.0 | Maximum miter ratio before converting to bevel. |
| double | pathLength = 0.0 | SVG pathLength attribute value; 0 means unused. When non-zero, dash arrays and offsets are scaled by the ratio of the actual path length to this value. |
| double | strokeWidth = 0.0 | Stroke width in user units. |
| struct donner::svg::PaintParams |
Paint state derived from resolved style for the current node.
| 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 | |
| Boxd | viewBox | View box used for unit resolution and gradient coordinate conversion. |
| struct donner::svg::ImageParams |
Parameters describing how an image should be drawn.
| Class Members | ||
|---|---|---|
| bool | imageRenderingPixelated = false | Whether to favor nearest-neighbor sampling for pixelated rendering. |
| double | opacity = 1.0 | |
| Boxd | targetRect | Destination rectangle in device-independent units. |
| struct donner::svg::TextParams |
Parameters describing how text is drawn and outlined.
| Class Members | ||
|---|---|---|
| Color | fillColor = css::Color(css::RGBA()) | |
| SmallVector< RcString, 1 > | fontFamilies | |
| FontMetrics | fontMetrics | |
| Lengthd | fontSize | |
| double | opacity = 1.0 | |
| Color | strokeColor = css::Color(css::RGBA()) | |
| StrokeParams | strokeParams | |
| Boxd | viewBox | |