Skip to main content

render

Function render 

Source
pub fn render(
    tree: &Tree,
    transform: Transform,
    pixmap: &mut PixmapMut<'_>,
    cache: &mut SvgrCache,
    pixmap_pool: &PixmapPool,
    ctx: &Context,
)
Expand description

Renders a tree onto the pixmap.

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

The cache provides both LRU caching for dynamic elements and permanent caching for static elements (those with compile-time known content identified by static_hash). Static elements are rendered once and cached permanently, never re-rendered.

The produced content is in the sRGB color space.