[][src]Struct rubidium::Mode3

pub struct 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]

impl Copy for Mode3[src]

impl Debug for Mode3[src]

Auto Trait Implementations

impl Send for Mode3

impl Sync for Mode3

impl Unpin for Mode3

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.