Skip to main content

rasterrocket_render/
lib.rs

1// Enable SVE2 intrinsics when the `nightly-sve2` feature is active.
2// This is a no-op on stable (the cfg is false); the feature gate only fires
3// on nightly when a caller explicitly opts in with `--features nightly-sve2`.
4#![cfg_attr(
5    all(target_arch = "aarch64", feature = "nightly-sve2"),
6    feature(stdarch_aarch64_sve)
7)]
8
9//! # raster
10//!
11//! Pure software rasterizer for PDF page content — no I/O, no PDF parsing,
12//! no SIMD (Phase 1).
13//!
14//! ## Phase 1 scope
15//! Foundation types only: pixel buffers, path geometry, edge tables, clip
16//! regions, halftone screens, and graphics state. Rendering (pipe, fill,
17//! stroke, image, shading, glyph, transparency) is Phase 2.
18//!
19//! ## Module layout
20//! - [`types`] — raster-local enums and constants (re-exports [`color`] types)
21//! - [`bitmap`] — [`Bitmap<P>`] and [`AaBuf`]
22//! - [`path`] — [`Path`], [`PathBuilder`], Bezier flattening, stroke adjustment
23//! - [`xpath`] — [`XPath`] edge table (flattened, matrix-transformed segments)
24//! - [`scanner`] — [`XPathScanner`] and [`crate::ScanIterator`] (scanline span emission)
25//! - [`clip`] — [`Clip`] (rect + arbitrary path clip stack)
26//! - [`screen`] — [`HalftoneScreen`] (Bayer / stochastic threshold matrix)
27//! - [`state`] — [`GraphicsState`] and [`StateStack`]
28//! - [`pipe`] — compositing pipeline (simple, AA, general; blend modes; Pattern trait)
29
30pub mod bitmap;
31pub mod clip;
32pub mod fill;
33pub mod glyph;
34pub mod image;
35pub mod path;
36pub mod pipe;
37pub mod scanner;
38pub mod screen;
39pub mod shading;
40pub mod simd;
41pub mod state;
42pub mod stroke;
43pub mod tiling;
44pub mod transparency;
45pub mod types;
46pub mod xpath;
47
48#[cfg(test)]
49pub(crate) mod testutil;
50
51#[cfg(feature = "rayon")]
52pub use bitmap::BitmapBand;
53pub use bitmap::{AaBuf, Bitmap};
54pub use clip::{Clip, ClipResult};
55#[cfg(feature = "rayon")]
56pub use fill::{PARALLEL_FILL_MIN_HEIGHT, eo_fill_parallel, fill_parallel};
57pub use fill::{eo_fill, fill};
58pub use glyph::{GlyphBitmap, blit_glyph, fill_glyph};
59pub use image::{ImageResult, ImageSource, MaskSource, draw_image, fill_image_mask};
60pub use path::{Path, PathBuilder, PathFlags, PathPoint, StrokeAdjustHint};
61pub use pipe::{Pattern, PipeSrc, PipeState};
62pub use scanner::iter::ScanIterator;
63pub use scanner::{Intersect, XPathScanner};
64pub use screen::HalftoneScreen;
65pub use shading::axial::AxialPattern;
66pub use shading::function::FunctionPattern;
67pub use shading::gouraud::{GouraudVertex, gouraud_triangle_fill};
68pub use shading::radial::RadialPattern;
69pub use shading::shaded_fill;
70pub use simd::{blend_solid_gray8, blend_solid_rgb8, composite_aa_rgb8_opaque, unpack_mono_row};
71pub use state::{GraphicsState, StateStack, TransferSet};
72pub use stroke::{StrokeParams, stroke};
73pub use tiling::TiledPattern;
74pub use types::*;
75pub use xpath::{XPath, XPathFlags, XPathSeg};