[][src]Trait vga::writers::GraphicsWriter

pub trait GraphicsWriter<Color> {
    fn clear_screen(&self, color: Color);
fn draw_line(&self, start: Point<isize>, end: Point<isize>, color: Color);
fn draw_character(&self, x: usize, y: usize, character: char, color: Color);
fn set_pixel(&self, x: usize, y: usize, color: Color);
fn set_mode(&self); fn get_frame_buffer(&self) -> *mut u8 { ... } }

A helper trait used to interact with various vga graphics modes.

Required methods

fn clear_screen(&self, color: Color)

Clears the screen by setting all pixels to the specified color.

fn draw_line(&self, start: Point<isize>, end: Point<isize>, color: Color)

Draws a line from start to end with the specified color.

fn draw_character(&self, x: usize, y: usize, character: char, color: Color)

Draws a character at the given (x, y) coordinant to the specified color.

fn set_pixel(&self, x: usize, y: usize, color: Color)

Sets the given pixel at (x, y) to the given color.

fn set_mode(&self)

Sets the graphics device to a VideoMode.

Loading content...

Provided methods

fn get_frame_buffer(&self) -> *mut u8

Returns the frame buffer for this vga mode.

Loading content...

Implementors

impl GraphicsWriter<Color16> for Graphics640x480x16[src]

fn set_pixel(&self, x: usize, y: usize, color: Color16)[src]

Note: This method is provided for convenience, but has terrible performance since it needs to ensure the correct WriteMode per pixel drawn. If you need to draw more then one pixel, consider using a method such as draw_line.

impl GraphicsWriter<u8> for Graphics320x200x256[src]

impl GraphicsWriter<u8> for Graphics320x240x256[src]

Loading content...