Struct vga::writers::Graphics320x240x256 [−][src]
A basic interface for interacting with vga graphics mode 320x200x256.
Examples
Basic usage:
use vga::colors::Color16; use vga::writers::{Graphics320x240x256, GraphicsWriter}; let mode = Graphics320x240x256::new(); mode.set_mode(); mode.clear_screen(0); mode.draw_line((60, 20), (260, 20), 255); mode.draw_line((60, 20), (60, 180), 255); mode.draw_line((60, 180), (260, 180), 255); mode.draw_line((260, 180), (260, 20), 255); mode.draw_line((60, 40), (260, 40), 255); for (offset, character) in "Hello World!".chars().enumerate() { mode.draw_character(118 + offset * 8, 27, character, 255); }
Implementations
impl Graphics320x240x256
[src]
pub const fn new() -> Graphics320x240x256
[src]
Creates a new Graphics320x240x256
.
Trait Implementations
impl Clone for Graphics320x240x256
[src]
fn clone(&self) -> Graphics320x240x256
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Graphics320x240x256
[src]
impl Debug for Graphics320x240x256
[src]
impl Default for Graphics320x240x256
[src]
fn default() -> Graphics320x240x256
[src]
impl GraphicsWriter<u8> for Graphics320x240x256
[src]
fn clear_screen(&self, color: u8)
[src]
fn draw_line(&self, start: Point<isize>, end: Point<isize>, color: u8)
[src]
fn set_pixel(&self, x: usize, y: usize, color: u8)
[src]
fn draw_character(&self, x: usize, y: usize, character: char, color: u8)
[src]
fn set_mode(&self)
[src]
fn get_frame_buffer(&self) -> *mut u8
[src]
impl Screen for Graphics320x240x256
[src]
Auto Trait Implementations
impl Send for Graphics320x240x256
[src]
impl Sync for Graphics320x240x256
[src]
impl Unpin for Graphics320x240x256
[src]
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,
pub 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.
pub 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>,