pub struct ImagePrinter { /* private fields */ }Expand description
A printer that prints images. Multiple frames in a single image file will be printed as separate pages.
Implementations§
Source§impl ImagePrinter
impl ImagePrinter
Sourcepub fn new(printer: PrinterDevice) -> Self
pub fn new(printer: PrinterDevice) -> Self
Create a new ImagePrinter for the given printer device.
Sourcepub fn print_with_options(
&self,
path: &Path,
options: PrintTicket,
auto_rotate: bool,
) -> Result<(), ImagePrinterError>
pub fn print_with_options( &self, path: &Path, options: PrintTicket, auto_rotate: bool, ) -> Result<(), ImagePrinterError>
Print an image with additional options.
When auto_rotate is true, the image will be automatically rotated 90°
to best fit the paper orientation (only when the image and paper aspect
ratios mismatch). This is useful when no explicit orientation parameter
is provided by the caller.
Trait Implementations§
Source§impl FilePrinter for ImagePrinter
impl FilePrinter for ImagePrinter
Source§type Options = PrintTicket
type Options = PrintTicket
The options type for the printer.
Source§type Error = ImagePrinterError
type Error = ImagePrinterError
The error type for the printer.
Source§fn print(
&self,
path: &Path,
options: PrintTicket,
) -> Result<(), ImagePrinterError>
fn print( &self, path: &Path, options: PrintTicket, ) -> Result<(), ImagePrinterError>
Print the file with the given options.
Auto Trait Implementations§
impl Freeze for ImagePrinter
impl RefUnwindSafe for ImagePrinter
impl Send for ImagePrinter
impl Sync for ImagePrinter
impl Unpin for ImagePrinter
impl UnsafeUnpin for ImagePrinter
impl UnwindSafe for ImagePrinter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more