|
|
TextLayoutParams | donner::svg::ToTextLayoutParams (const TextParams ¶ms) |
| | Convert renderer-facing text parameters to the shared layout engine's input.
|
|
TextDrawGeometry | donner::svg::PrepareTextDrawGeometry (Registry ®istry, const components::ComputedTextComponent &text, const TextParams ¶ms, TextEngine &textEngine) |
| | Resolve one backend draw from a shared element preparation or the direct-caller fallback.
|
| Path | donner::svg::TransformPath (const Path &path, const Transform2d &transform) |
| | Apply an affine transform to every point of a path.
|
| Transform2d | donner::svg::GlyphPlacementTransform (const TextGlyph &glyph) |
| | The affine that places a glyph's unplaced outline at its baseline position in the text element's local space.
|
| GlyphOutlineAndPlacement | donner::svg::UnplacedGlyphOutline (const TextEngine &textEngine, FontHandle font, const TextGlyph &glyph, float scale) |
| | Build a glyph's unplaced outline and its placement transform.
|
| Path | donner::svg::PlacedGlyphOutline (const TextEngine &textEngine, FontHandle font, const TextRun &run, const TextGlyph &glyph, float scale, double warpTolerance) |
| | Build the placed outline for a single glyph in document space.
|
| bool | donner::svg::CanRenderTextRun (bool isBitmapFont, float scale) |
| | Whether a run has glyphs to draw: a bitmap-only face draws from its bitmap strikes, which need no outline scale, and any other face needs a nonzero one.
|
| std::optional< TextBackend::BitmapGlyph > | donner::svg::AdmitBitmapGlyph (TextEngine &textEngine, FontHandle font, int glyphIndex, float scale, RendererTextMaterializationBudget &budget, bool &rejected) |
| | Charges one bitmap glyph to budget, at twice the RGBA bytes its metadata reports, and decodes it within those bytes.
|
| GlyphFaceScale | donner::svg::ResolveGlyphFace (const TextEngine &textEngine, const TextRun &run, const TextGlyph &glyph, float runScale, bool runBitmapOnly) |
| | Resolves the face that draws glyph.
|
|
Path | donner::svg::WarpGlyphOutline (const Path &outline, const StretchedTextPath &mapping, const TextGlyph &glyph, double tolerance=Path::kLocalFlattenTolerance) |
| | Warp a glyph-local outline onto the perpendicular vectors of a stretched text path.
|
|
double | donner::svg::TextWarpToleranceFor (const Transform2d &deviceFromLocal) |
| | Derive a path-local warp tolerance from a local-to-device transform.
|
| Box2d | donner::svg::ComputeTextBounds (const TextEngine &textEngine, const std::vector< TextRun > &runs) |
| | Compute the text element's bounding box for objectBoundingBox paint.
|
| void | donner::svg::ClearUnpaintedSpanGlyphs (const components::ComputedTextComponent &text, entt::entity spanEffectOwner, std::vector< TextRun > &runs) |
| | Drop the glyphs of runs this draw is not responsible for painting.
|
|
template<typename DrawFn> |
| void | donner::svg::ForEachEmittingOrigin (std::span< const components::TextDecorationOrigin > origins, TextDecoration emittedLines, const DrawFn &draw) |
| | Call draw for each origin that has a line in emittedLines, so a paint pass skips origins it would draw nothing for before resolving their paint.
|
|
template<typename FillFn, typename StrokeFn> |
| void | donner::svg::PaintFillAndStroke (const PaintOrder &paintOrder, const FillFn &fill, const StrokeFn &stroke) |
| | Run fill and stroke in the order paintOrder gives them; SVG 2 section 11.11 orders a decoration's own fill and stroke by the paint-order where it is declared.
|
| void | donner::svg::EmitTextDecorationPaths (const TextRun &run, const components::TextDecorationOrigin &origin, TextDecoration emittedLines, std::size_t originCount, float fontSize, const TextEngine &engine, const Transform2d &deviceFromLocal, std::size_t &remainingWork, const std::function< void(const Path &)> &emit) |
| | Emit bounded decoration paths while preserving each originating declaration.
|
Shared, backend-agnostic text geometry and glyph admission for RendererInterface::drawText.
RendererTinySkia::drawText and RendererGeode::drawText both place glyphs (outline, stretch, translate, rotate), decorations and bitmap glyphs through this header, so the two renderers compute the same geometry and charge the frame text budget the same way.
Inputs and outputs are donner::Path, Transform2d, TextEngine and the renderer budgets; no backend paint types appear here. Bitmap glyph admission allocates the decoded glyph pixels.