Function fltk::draw::capture_window [−][src]
pub fn capture_window<Win: WindowExt>(
win: &mut Win
) -> Result<RgbImage, FltkError>
Captures part of the window and returns raw data. Example usage:
use fltk::*; let mut win = window::Window::default(); let image = draw::capture_window(&mut win).unwrap().into_jpeg().unwrap(); image .write_to_file(&std::path::PathBuf::from("test.jpg")) .unwrap();