skia-engine-core
The core crate provides the element tree and Skia renderer used by skia-engine.
Use it directly when you want to construct UI elements without the procedural
macros.
Elements
ElementNode currently supports:
Container, with aVec<ElementNode>of children.Rect, which represents a filled rectangle.
Both node types have a Props type with dimensions, position, alignment, color,
and border-radius settings. Container dimensions and background color are
optional. Rectangle dimensions and color have concrete values.
Example
use ;
use ;
let tree = Container ;
let mut surface = raster_n32_premul.unwrap;
render_tree;
Call render_tree with the Skia canvas, an optional parent element, and the root
element to draw the tree.