Function fltk::draw::capture_offscreen

source ·
pub fn capture_offscreen(
    offs: &mut Offscreen,
    w: i32,
    h: i32
) -> Result<RgbImage, FltkError>
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