Function capture_window

pub fn capture_window<Win>(win: &mut Win) -> Result<RgbImage, FltkError> 
where Win: WindowExt,
Available on crate feature dep_fltk only.
Expand description

Captures 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