Trait xray::ScreenshotCaptor[][src]

pub trait ScreenshotCaptor {
    fn capture_image(
        &self,
        x: i32,
        y: i32,
        width: u32,
        height: u32
    ) -> Result<DynamicImage, XrayError>; }

Captures a region of the screen for comparison against a reference image.

Required Methods

Takes a screenshot of the area (x, y, x + width, y + height) Returns a ScreenshotError::ErrorCapturingImage if the image could not be captured.

Implementors