Function capture_window_part

pub fn capture_window_part<Win>(
    win: &mut Win,
    x: i32,
    y: i32,
    w: i32,
    h: i32,
) -> Result<RgbImage, FltkError> 
where Win: WindowExt,
Available on crate feature dep_fltk only.
Expand description

Captures part of the window and returns raw data. Example usage:

use fltk::{prelude::*, *};
let mut win = window::Window::default();
let image = draw::capture_window(&mut win).unwrap();

§Errors

The api can fail to capture the window as an image