Struct flic::RasterMut [] [src]

pub struct RasterMut<'a> { /* fields omitted */ }

Mutable raster structure.

Methods

impl<'a> RasterMut<'a>
[src]

Allocate a new raster for the given screen buffer and palette memory slices.

Examples

const SCREEN_W: usize = 320;
const SCREEN_H: usize = 200;
const NUM_COLS: usize = 256;
let mut buf = [0; SCREEN_W * SCREEN_H];
let mut pal = [0; 3 * NUM_COLS];

flic::RasterMut::new(SCREEN_W, SCREEN_H, &mut buf, &mut pal);

Allocate a new raster for the given screen buffer and palette memory slices, with an offset and stride.

Examples

const SCREEN_W: usize = 320;
const SCREEN_H: usize = 200;
const NUM_COLS: usize = 256;
let mut buf = [0; SCREEN_W * SCREEN_H];
let mut pal = [0; 3 * NUM_COLS];

flic::RasterMut::with_offset(0, 0, SCREEN_W, SCREEN_H, SCREEN_W, &mut buf, &mut pal);