screen_layer
This crate provides layer structure of the screen, which is useful for developing an OS.
This crate uses features of alloc crate, so you have to extern alloc crate. This means you
have to define your own heap allocator.
Currently this crate only supports 24 or 32 bits color of BGR order.
Examples
use ;
const SCREEN_WIDTH: usize = 10;
const SCREEN_HEIGHT: usize = 10;
const BPP: usize = 32;
let mut pseudo_vram = ;
let ptr = pseudo_vram.as_ptr as usize;
let mut controller =
unsafe ;
const LAYER_WIDTH: usize = 5;
const LAYER_HEIGHT: usize = 5;
let layer = new;
let id = controller.add_layer;
controller
.edit_layer
.unwrap;
for i in 0..LAYER_WIDTH
controller.set_pixel;
assert_eq!;
assert_eq!;
assert_eq!;
License: MPL-2.0