Struct kernel::graphics::display::Display [] [src]

pub struct Display {
    pub offscreen: usize,
    pub onscreen: usize,
    pub size: usize,
    pub bytesperrow: usize,
    pub width: usize,
    pub height: usize,
    pub root: bool,
}

A display

Fields

offscreen
onscreen
size
bytesperrow
width
height
root

Methods

impl Display

unsafe fn root() -> Box<Self>

fn new(width: usize, height: usize) -> Box<Self>

Create a new display

unsafe fn set_run(data: u32, dst: usize, len: usize)

unsafe fn copy_run(src: usize, dst: usize, len: usize)

fn set(&self, color: Color)

Set the color

fn scroll(&self, rows: usize)

Scroll the display

fn flip(&self)

Flip the display

fn rect(&self, point: Point, size: Size, color: Color)

Draw a rectangle

fn pixel(&self, point: Point, color: Color)

Set the color of a pixel

fn line(&self, point_a: Point, point_b: Point, color: Color)

Draw an line (without antialiasing) with width 1 (using Bresenham's algorithm)

unsafe fn image(&self, point: Point, data: *const u32, size: Size)

Draw an image

unsafe fn image_alpha(&self, point: Point, data: *const u32, size: Size)

Draw a image with opacity

unsafe fn set_run_alpha(premul: u32, n_alpha: u32, dst: usize, len: usize)

unsafe fn copy_run_alpha(src: usize, dst: usize, len: usize)

fn char(&self, point: Point, character: char, color: Color)

Draw a char

Trait Implementations

impl Drop for Display

fn drop(&mut self)