Struct vga::writers::Graphics640x480x16[][src]

pub struct Graphics640x480x16;

A basic interface for interacting with vga graphics mode 640x480x16

Examples

Basic usage:

use vga::colors::Color16;
use vga::writers::{Graphics640x480x16, GraphicsWriter};
let mode = Graphics640x480x16::new();
mode.set_mode();
mode.clear_screen(Color16::Black);
mode.draw_line((80, 60), (80, 420), Color16::White);
mode.draw_line((80, 60), (540, 60), Color16::White);
mode.draw_line((80, 420), (540, 420), Color16::White);
mode.draw_line((540, 420), (540, 60), Color16::White);
mode.draw_line((80, 90), (540, 90), Color16::White);
for (offset, character) in "Hello World!".chars().enumerate() {
    mode.draw_character(270 + offset * 8, 72, character, Color16::White)
}

Implementations

impl Graphics640x480x16[src]

pub const fn new() -> Graphics640x480x16[src]

Creates a new Graphics640x480x16.

Trait Implementations

impl Clone for Graphics640x480x16[src]

impl Copy for Graphics640x480x16[src]

impl Debug for Graphics640x480x16[src]

impl Default for Graphics640x480x16[src]

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 Screen for Graphics640x480x16[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.