ImageRefExt

Trait ImageRefExt 

Source
pub trait ImageRefExt: ImageRef {
    // Provided methods
    fn bounds_check(&self) -> Result<(), BoundsCheckError> { ... }
    fn crop(self, window: Window) -> Result<Cropped<Self>, CropError>
       where Self: Sized { ... }
    fn crop_even(self) -> Result<Cropped<Self>, CropError>
       where Self: Sized { ... }
}
Expand description

ImageRef extension methods

Provided Methods§

Source

fn bounds_check(&self) -> Result<(), BoundsCheckError>

Perform a bounds check, return an error when it fails

Source

fn crop(self, window: Window) -> Result<Cropped<Self>, CropError>
where Self: Sized,

Crop the image with the given window

Source

fn crop_even(self) -> Result<Cropped<Self>, CropError>
where Self: Sized,

Crop the image to the next lowest even resolution

Implementors§