Skip to main content

Crate zenith_render

Crate zenith_render 

Source
Expand description

CPU PNG reference renderer for Zenith.

Owns the raster backend adapter trait (tiny-skia is the first engine), deterministic PNG production from a scene display list, SVG and raster image decode, glyph rasterization, and enforcement of all raster-time determinism rules. Backend types never appear in the public API.

Structs§

PdfOptions
Options controlling PDF emission.
RasterImage
A rasterized image in straight-alpha RGBA8 format (row-major).
RenderError
An error produced by the rasterization or encoding pipeline.
TinySkiaBackend
CPU rasterization backend backed by the tiny-skia library.

Traits§

RasterBackend
Trait that abstracts over different CPU rasterization backends.

Functions§

composite_spread
Composite two rasterized pages SIDE BY SIDE into one image with an optional transparent gutter between them.
render_image
Rasterize scene to a RasterImage (straight-alpha RGBA8 pixels).
render_pdf
Render scene to a deterministic vector PDF (a single page).
render_pdf_multi
Render scenes (one per document page, in order) to a single deterministic multi-page vector PDF, sharing one sequential object-id space.
render_pdf_multi_with
Like render_pdf_multi but with explicit PdfOptions.
render_pdf_with
Like render_pdf but with explicit PdfOptions (e.g. font subsetting).
render_png
Rasterize scene and encode the result as PNG bytes.
render_spread_png
Rasterize two scenes (left, right), composite them SIDE BY SIDE via composite_spread, and encode the result as deterministic PNG bytes.