mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-18 16:24:38 +00:00
* ps: add a write feature for PostScript tokens Numbers, strings, matrices, path data and Flate, so apps can emit a PostScript or EPS program without owning the token serializer. Path and paint operators can use the Language Reference names or the one-letter names a bound prolog defines. Container concerns stay in craft-eps. Part of #778 and #790. * ps: tighten write-feature number trimming and Flate bounds - Require flate2 1.1.10 so inflate rejects an incomplete zlib stream. - Trim trailing zeros only when the token has a decimal point, so places=0 keeps integer zeros at the 1e15 boundary. - Use saturating_add when bounding inflate, so max = u64::MAX does not overflow.
14 lines
559 B
Rust
14 lines
559 B
Rust
//! PostScript and EPS for the Craft apps.
|
|
//!
|
|
//! - [`write`] (feature `write`): numbers, strings, matrices, path data and Flate, so an app can
|
|
//! emit a PostScript or EPS program.
|
|
//! - [`read`] (feature `read`): runs an EPS and gives what it paints as a one-page vector PDF,
|
|
//! for apps that place EPS files as graphics.
|
|
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
|
#![forbid(unsafe_code)]
|
|
|
|
#[cfg(feature = "read")]
|
|
pub mod read;
|
|
#[cfg(feature = "write")]
|
|
pub mod write;
|