Skip to main content

stet_graphics/
lib.rs

1// stet - A PostScript Interpreter
2// Copyright (c) 2026 Scott Bowman
3// SPDX-License-Identifier: Apache-2.0 OR MIT
4
5//! Graphics foundation for the stet PostScript and PDF rendering stack:
6//! colours, the display list, ICC profile management, and mesh / patch
7//! shading parsers.
8//!
9//! Only depends on [`stet-fonts`](https://crates.io/crates/stet-fonts), so
10//! it is usable on its own when any of these subsystems is what you
11//! actually want:
12//!
13//! - [`icc`] — ICC colour management (CMYK↔sRGB, bulk image conversion,
14//!   black-point compensation) via `moxcms`.
15//! - [`mesh_shading`] — decoders for PDF Type 4/5 (Gouraud triangle mesh)
16//!   and Type 6/7 (Coons / tensor patch) shading streams.
17//! - [`display_list`] — the [`DisplayList`](display_list::DisplayList) /
18//!   [`DisplayElement`](display_list::DisplayElement) types that both the
19//!   PostScript interpreter and `stet-pdf-reader` emit into. Custom
20//!   output devices, PDF rewriters, and diff tools consume these.
21//! - [`color`] and [`device`] — colour types, line-style primitives,
22//!   paint-parameter structs, and the [`PageSink`](device::PageSink) /
23//!   [`PageSinkFactory`](device::PageSinkFactory) streaming traits.
24//!
25//! Most users should use the [`stet`](https://crates.io/crates/stet)
26//! facade crate to render PostScript or PDF, and
27//! [`stet-pdf-reader`](https://crates.io/crates/stet-pdf-reader) to parse
28//! PDFs into `DisplayList`s.
29
30pub mod color;
31pub mod device;
32pub mod display_list;
33pub mod icc;
34pub mod layer_set;
35pub mod mesh_shading;