#![doc = include_str!("../README.md")]
#![forbid(unsafe_code)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(clippy::indexing_slicing)]
mod clip;
mod color;
mod ctx;
mod device;
mod error;
mod group;
mod image;
mod imagecache;
mod options;
mod paint;
mod path;
mod pattern;
mod region;
mod shading;
mod shear;
mod softmask;
mod stretch;
mod stroke;
mod text;
mod transfer;
mod type3;
mod walk;
mod window;
mod zero_area;
pub mod blend;
pub mod glyph;
pub mod pixmap;
pub mod scanline;
#[cfg(feature = "profiling")]
pub mod walkprofile;
#[cfg(not(feature = "profiling"))]
mod walkprofile;
pub use color::{Argb, ObjectKind};
pub use ctx::RenderCaches;
pub use device::{
AntiAlias, Brush, FillRule, ImageQuality, MAX_TARGET_DIMENSION, RasterBackend, RasterImage,
RenderDevice,
};
pub use error::Error;
pub use options::{ColorMode, ColorScheme, RenderOptions, TextAa};
pub use pixmap::{AlphaMask, Pixmap};
pub use region::{DeviceRect, Region};
pub use walk::{
RenderSession, needs_alpha_background, render_page, render_page_to_device,
render_page_to_device_with, render_page_with,
};
#[must_use]
pub fn image_to_pixmap(image: &pdfrum_page::ImageData) -> Pixmap {
image::to_pixmap(image, Argb::BLACK, None)
}