Function capture_offscreen
pub fn capture_offscreen(
offs: &mut Offscreen,
w: i32,
h: i32,
) -> Result<RgbImage, FltkError> ⓘ
Available on crate feature
dep_fltk
only.Expand description
Captures the offscreen and returns raw data. Example usage:
use fltk::{prelude::*, *};
let mut offs = draw::Offscreen::new(100, 100).unwrap();
let image = draw::capture_offscreen(&mut offs, 100, 100).unwrap();
§Errors
The api can fail to capture the offscreen object as an image