Skip to main content

Module svg

Module svg 

Source
Expand description

Svg item

Structsยง

SvgItem
An Svg Item.

Functionsยง

build_group_node ๐Ÿ”’
Build a group node from a usvg group and the absolute transform of its parent group.
build_path_leaf ๐Ÿ”’
Build a leaf node from a usvg path and the absolute transform of its parent group.
parse_paint ๐Ÿ”’
rel_transform ๐Ÿ”’
The transform of a node relative to its parent: parent_abs^-1 * abs.
usvg_transform_to_daffine2 ๐Ÿ”’
Convert a usvg (tiny-skia) row-major transform into a [DAffine2].
vitems_from_svg
The first leaf (depth-first) under the first node whose id matches. Construct a Vec<VItem from &str of a SVG
vitems_from_tree
Construct a Vec<VItem> from &usvg::Tree
widen_to_daffine3 ๐Ÿ”’
Widen a 2D affine into a 3D one, embedding the xy plane at z = 0.