Struct flic::Raster [] [src]

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

Raster structure.

Methods

impl<'a> Raster<'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 buf = [0; SCREEN_W * SCREEN_H];
let pal = [0; 3 * NUM_COLS];

flic::Raster::new(SCREEN_W, SCREEN_H, &buf, &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 buf = [0; SCREEN_W * SCREEN_H];
let pal = [0; 3 * NUM_COLS];

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