[−][src]Struct rubidium::Mode3
A ZST for namespacing VideoMode3 stuff into one place.
In Mode 3 the majority of VRAM is occupied with a single bitmap as large as
the GBA's physical display. Each color contains a Color
to display at
that location in the bitmap.
You can access the address of a location by row
and then col
or by x
and then y
. It will give equivalent results.
let p = Mode3.row(8).col(5); let q = Mode3.x(5).y(8); assert_eq!(p, q);
See Also: VideoMode
Methods
impl Mode3
[src]
pub const WIDTH: usize
[src]
In Mode3 the screen is 240 wide.
pub const HEIGHT: usize
[src]
In Mode3 the screen is 160 tall.
#[must_use]pub fn row(self, row: usize) -> Mode3Row
[src]
Index by row
to get a particular row within the Mode 3 bitmap.
Panics
If the index is out of bounds.
#[must_use]pub fn x(self, x: usize) -> Mode3Col
[src]
Index by x
to get a particular column within the Mode 3 bitmap.
Panics
If the index is out of bounds.
Trait Implementations
impl Clone for Mode3
[src]
fn clone(&self) -> Mode3
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Mode3
[src]
impl Debug for Mode3
[src]
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>,