micropdf 0.15.15

A pure Rust PDF library - A pure Rust PDF library with fz_/pdf_ API compatibility
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Pixmap — compatibility shim.
//!
//! Re-exports from `crate::micropdf::pixmap`.

pub use crate::micropdf::pixmap::MpPixmap as Pixmap;

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_shim_reexport() {
        let cs = crate::fitz::colorspace::Colorspace::device_rgb();
        let pm = Pixmap::new(Some(cs), 10, 10, false).unwrap();
        assert_eq!(pm.width(), 10);
        assert_eq!(pm.height(), 10);
    }
}