|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
#include <cstddef>#include <optional>#include <span>#include <vector>#include "donner/base/Box.h"#include "donner/base/EcsRegistry_fwd.h"#include "donner/base/FillRule.h"#include "donner/base/Path.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/css/FontFace.h"#include "donner/svg/components/RenderingInstanceComponent.h"#include "donner/svg/components/filter/FilterEffect.h"#include "donner/svg/components/filter/FilterGraph.h"#include "donner/svg/components/text/ComputedTextComponent.h"#include "donner/svg/core/DominantBaseline.h"#include "donner/svg/core/LengthAdjust.h"#include "donner/svg/core/MixBlendMode.h"#include "donner/svg/core/TextAnchor.h"#include "donner/svg/core/TextDecoration.h"#include "donner/svg/core/WritingMode.h"#include "donner/svg/renderer/StrokeParams.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::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... | |
| 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 | ||
|---|---|---|
| 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. |
| 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 | |
| Box2d | 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 | |
| Box2d | targetRect | Destination rectangle in device-independent units. |
| struct donner::svg::TextParams |
Parameters describing how text is drawn and outlined.
| 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. |