aphrodite::display

Trait TextDisplay

Source
pub trait TextDisplay {
    // Required methods
    fn write_char(
        &self,
        pos: (u32, u32),
        char: u8,
        color: Color,
    ) -> Result<(), Error<'static>>;
    fn get_size(&self) -> (u32, u32);
}
Expand description

Some form of display that can be written to with text.

Required Methods§

Source

fn write_char( &self, pos: (u32, u32), char: u8, color: Color, ) -> Result<(), Error<'static>>

Writes a single character to the specified position.

Source

fn get_size(&self) -> (u32, u32)

Gets the size of the screen.

Implementations§

Source§

impl dyn TextDisplay + '_

Source

pub fn clear_screen(&self, color: Color)

Clears the screen.

Source

pub fn write_str( &self, pos: (u32, u32), str: &str, color: Color, ) -> Result<(u32, u32), Error<'static>>

Writes a &str to the screen.

Source

pub fn write_bytes( &self, pos: (u32, u32), str: &[u8], color: Color, ) -> Result<(u32, u32), Error<'static>>

Writes a &[u8] to the screen.

Implementors§