320x200x256 additions
This commit is contained in:
parent
699855669b
commit
225416353f
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "vga"
|
name = "vga"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
authors = ["Ryan Kennedy <rkennedy9064@gmail.com>"]
|
authors = ["Ryan Kennedy <rkennedy9064@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Support for vga specific functions, data structures, and registers."
|
description = "Support for vga specific functions, data structures, and registers."
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
# 0.2.1
|
||||||
|
|
||||||
|
- Added `Graphics320x200x256` mode.
|
||||||
|
- Implemented `Screen` for `Graphics640x480x16`.
|
||||||
|
|
||||||
# 0.2.0
|
# 0.2.0
|
||||||
|
|
||||||
## Breaking
|
## Breaking
|
||||||
|
|
|
@ -12,6 +12,27 @@ const HEIGHT: usize = 200;
|
||||||
const SIZE: usize = WIDTH * HEIGHT;
|
const SIZE: usize = WIDTH * HEIGHT;
|
||||||
|
|
||||||
/// A basic interface for interacting with vga graphics mode 320x200x256.
|
/// A basic interface for interacting with vga graphics mode 320x200x256.
|
||||||
|
///
|
||||||
|
/// # Examples
|
||||||
|
///
|
||||||
|
/// Basic usage:
|
||||||
|
///
|
||||||
|
/// ```no_run
|
||||||
|
/// use vga::colors::Color16;
|
||||||
|
/// use vga::writers::{Graphics320x200x256, GraphicsWriter};
|
||||||
|
|
||||||
|
/// let mode = Graphics320x200x256::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);
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Graphics320x200x256 {}
|
pub struct Graphics320x200x256 {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue