1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// stet - A PostScript Interpreter
// Copyright (c) 2026 Scott Bowman
// SPDX-License-Identifier: Apache-2.0 OR MIT
//! `stet-tiny-skia`-based rasterizer for stet display lists.
//!
//! This crate rasterizes any
//! [`DisplayList`](stet_graphics::display_list::DisplayList) to RGBA pixels
//! — whether the list came from the PostScript interpreter
//! ([`stet-core`](https://crates.io/crates/stet-core)) or the PDF reader
//! ([`stet-pdf-reader`](https://crates.io/crates/stet-pdf-reader)) makes
//! no difference. Rendering is multi-threaded and banded (sized to fit
//! L2), with mask caching, clip fast paths, and ICC-aware CMYK handling.
//!
//! # Two ways to render
//!
//! - [`render_to_rgba`] — one-shot: a `DisplayList` in, a `Vec<u8>` of
//! RGBA out. Banded page rasterizer with automatic parallelism.
//! - [`prepare_display_list`] + [`render_region_prepared`] — viewport
//! rendering: pre-compute bounding boxes once, then render any
//! rectangular region at any zoom without reinterpreting or
//! reallocating. Used by the interactive viewer and the WASM frontend.
//!
//! # Sinks
//!
//! [`PngSinkFactory`] streams banded output straight to a PNG file.
//! Implement [`stet_graphics::device::PageSink`] /
//! [`PageSinkFactory`](stet_graphics::device::PageSinkFactory) yourself
//! for other streaming destinations.
//!
//! Most users should use the [`stet`](https://crates.io/crates/stet)
//! facade crate rather than depending on `stet-render` directly.
pub use PngSinkFactory;
pub use ImageCache;
pub use PreparedDisplayList;
pub use SkiaDevice;
pub use build_icc_cache_for_list;
pub use debug_bbox_comparison;
pub use prepare_display_list;
pub use render_region;
pub use render_region_prepared;
pub use render_region_prepared_parallel;
pub use render_region_prepared_parallel_cancellable;
pub use render_region_prepared_parallel_with_progress;
pub use render_region_single_band;
pub use render_to_rgba;
pub use render_to_rgba_viewport;
pub use render_to_rgba_with_layers;
pub use viewport_band_count;