Expand description
The layout engine shared by every takumi output. It holds the node tree, the CSS cascade, layout, text shaping, and font and image resources. Its block, inline, flexbox, grid, and table layout port Chromium’s Blink.
Each backend builds on these types: takumi-raster for
images, takumi-svg for SVG, and the PDF and paint-tree
builds behind the takumi-pdf and takumi-paint npm packages.
Depend on the takumi crate instead. Its prelude re-exports the
stable subset of these types.
Re-exports§
Modules§
- blur
- Gaussian blur of pixels, as Skia’s raster blur engine runs it.
Gaussian blur as Skia’s raster
SkBlurEngineruns it for Chrome’s filters and text shadows. Follows Skia under the notice in LICENSE-CHROMIUM. - context
- Render context threading style, sizing, and resources through layout.
- error
- Error types.
- filter
- A CSS
filterfunction as a colour matrix. The colour-matrix CSSfilterfunctions, as Filter Effects defines eachfeColorMatrix. - font_
style - Font style resolved against a sizing context.
- form_
control - HTML form control state, read from attributes.
- geometry
- Transform geometry helpers shared across backends.
- html
- Parse HTML markup into a takumi
Nodetree. - keyframes
@keyframesrules and animation timing. Shared keyframe input parsing used by external bindings.- layout
- Style resolution and box/inline layout.
- math
- Deterministic float math shared by the painting paths. Float math that renders the same on every platform, unlike libm, for finite pixel-scale inputs.
- page_
stream - A render tree laid out a page at a time, painted from the pages that settle. A render tree laid out a page at a time, with the pages no later page can paint on handed out.
- paint
- Backend painting helpers (gradient LUTs, tile positioning, transfer tables) shared with the raster and SVG renderers.
- paint_
chunk - A scene flattened into paint chunks in paint order, and the conversion that moves a device
between their clip and effect states, after Blink’s
PaintChunkand theConversionContextinpaint_chunks_to_cc_layer.cc. - paint_
property - Clip and effect trees every painted box refers to, after Blink’s paint property trees.
- paint_
tree - A paint document: what the backends paint for a node tree, in device pixels, recorded instead of drawn.
- painter
- The seam between deciding what to paint and painting it.
- path_
data - Compact SVG path
ddata, as SVG output and the paint document write it. - resources
- Font and image resource management.
- scene
- Backend-agnostic paint scene: the stacking-context tree that decides paint order, grouping, and bounds.
- shadow
- Box, text, and inset shadow resolution.
- style
- CSS value types, parsing, and the cascade.
- units
- CSS absolute length units in 96 dpi pixels, shared by every crate.
- viewport
- Viewport dimensions and device-pixel-ratio resolution.