[][src]Struct vga::Text40x25

pub struct Text40x25;

A basic interface for interacting with vga text mode 40x25

Examples

Basic usage:

use vga::Text40x25;

let text_mode = Text40x25::new();

text_mode.set_mode();
text_mode.clear_screen();

Methods

impl Text40x25[src]

pub fn new() -> Text40x25[src]

Creates a new Text40x25.

pub fn clear_screen(&self)[src]

Clears the screen by setting all cells to b' ' with a background color of Color16Bit::Black and a foreground color of Color16Bit::Yellow.

pub fn write_character(
    &self,
    x: usize,
    y: usize,
    character: u8,
    color: TextModeColor
)
[src]

Prints the given character and color at (x, y).

Panics if x >= 40 or y >= 25.

pub fn set_mode(&self)[src]

Sets the graphics device to VideoMode::Mode40x25.

Trait Implementations

impl Default for Text40x25[src]

Auto Trait Implementations

impl Send for Text40x25

impl Sync for Text40x25

impl Unpin for Text40x25

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.