|
|
Donner 0.5.0
Embeddable browser-grade SVG2 engine
|
CPU-side Slug band decomposition: converts a Path into GPU-ready band data. More...
#include <cstdint>#include <span>#include <vector>#include "donner/base/Box.h"#include "donner/base/Vector2.h"Classes | |
| struct | donner::geode::EncodedPath |
| GPU-ready encoded path data produced by the Slug band decomposition algorithm. More... | |
| struct | donner::geode::EncodedPath::Curve |
| A quadratic Bézier curve segment (3 control points) stored as floats for GPU consumption. More... | |
| struct | donner::geode::EncodedPath::Band |
| Metadata for one horizontal band. More... | |
| struct | donner::geode::EncodedPath::Vertex |
| Vertex for the band bounding quad (input to the Slug vertex shader). More... | |
| class | donner::geode::GeodePathEncoder |
| Encodes a Path into Slug band decomposition format for GPU rendering. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
CPU-side Slug band decomposition: converts a Path into GPU-ready band data.
| struct donner::geode::EncodedPath::Curve |
| struct donner::geode::EncodedPath::Band |
Metadata for one horizontal band.
Layout matches the WGSL Band struct in shaders/slug_fill.wgsl exactly (8 × 4 bytes = 32 bytes per band). Two trailing pad fields are required because storage buffer struct stride must be 16-byte aligned, and without them WGSL would round the struct to 32 bytes anyway.
| struct donner::geode::EncodedPath::Vertex |
Vertex for the band bounding quad (input to the Slug vertex shader).
| Class Members | ||
|---|---|---|
| uint32_t | bandIndex | Which band this vertex belongs to. |
| float | normalX | |
| float | normalY | Outward normal (for dynamic half-pixel dilation). |
| float | posX | |
| float | posY | Position in path space. |