Struct flic::pstamp::PostageStamp
[−]
[src]
pub struct PostageStamp<'a> { /* fields omitted */ }
FLIC postage stamp creator.
Methods
impl<'a> PostageStamp<'a>
[src]
fn new(flic_w: usize, flic_h: usize, dst: &'a mut RasterMut<'a>) -> Self
Allocate a new postage stamp creator.
Examples
const SCREEN_W: usize = 320; const SCREEN_H: usize = 200; const NUM_COLS: usize = 256; const PSTAMP_W: usize = 100; const PSTAMP_H: usize = 63; let mut buf = [0; PSTAMP_W * PSTAMP_H]; let mut pal = [0; 3 * NUM_COLS]; let mut raster = flic::RasterMut::new(PSTAMP_W, PSTAMP_H, &mut buf, &mut pal); flic::pstamp::PostageStamp::new(SCREEN_W, SCREEN_H, &mut raster);
fn feed(&mut self, magic: u16, buf: &[u8]) -> FlicResult<bool>
Feed a chunk (from the first frame) to the postage stamp.
Returns true if the postage stamp has been created.