Skip to main content

render_node

Function render_node 

Source
pub fn render_node(
    node: &Node,
    transform: Transform,
    pixmap: &mut PixmapMut<'_>,
    cache: &mut SvgrCache,
    pixmap_pool: &PixmapPool,
    ctx: &Context,
) -> Option<()>
Expand description

Renders a node onto the pixmap.

transform will be used as a root transform. Can be used to position SVG inside the pixmap.

The expected pixmap size can be retrieved from usvgr::Node::abs_layer_bounding_box().

Returns None when node has a zero size.

The produced content is in the sRGB color space.