INNER CODE UNIT · Rust

copy_to_pasteboard

autopilot-rs/autopy · src/bitmap.rs:119

    fn copy_to_pasteboard(&self) -> PyResult<()> {
        self.bitmap
            .copy_to_pasteboard()
            .map_err(FromImageError::from)?;
        Ok(())
    }

    /// Returns `True` if the given point is contained in `bmp.bounds`.
    fn point_in_bounds(&self, x: f64, y: f64) -> PyResult<bool> {
        Ok(self.bitmap.bounds().is_point_visible(Point::new(x, y)))
    }

    /// Returns `True` if the given rect of the form `((x, y), (width,
    /// height))` is contained in `bmp.bounds`.
    fn rect_in_bounds(&self, rect: ((f64, f64), (f64, f64))) -> PyResult<bool> {
        let rect = Rect::new(
            Point::new((rect.0).0, (rect.0).1),
            Size::new((rect.1).0, (rect.1).1),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…