Struct kernel::graphics::bmp::BMPFile [] [src]

pub struct BMPFile {
    pub data: Vec<u32>,
    pub size: Size,
}

A bitmap

Fields

data

The data of the bitmap

size

The bitmap size

Methods

impl BMPFile

fn new() -> Self

Create a new empty bitmap

fn from_data(file_data: &Vec<u8>) -> Self

Create a bitmap from some data

fn as_slice(&self) -> &[[u8; 4]]

Convert to slice for drawing

fn draw(&self, display: &Display, point: Point)

Draw the bitmap to the screen