[−][src]Struct vga::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]
&self,
x: usize,
y: usize,
character: u8,
color: TextModeColor
)
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
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,