[−][src]Struct rmicrobit::graphics::image::GreyscaleImage
A 5×5 image supporting the full range of brightnesses for each LED.
Uses 25 bytes of storage.
Methods
impl GreyscaleImage
[src]
pub const fn new(data: &[[u8; 5]; 5]) -> GreyscaleImage
[src]
Constructs a GreyscaleImage from an array of brightnesses.
The data should be an array of 5 rows (top first), each of which is an array of 5 brightness values (left first).
Example
const GREY_HEART: GreyscaleImage = GreyscaleImage::new(&[ [0, 9, 0, 9, 0], [9, 5, 9, 5, 9], [9, 5, 5, 5, 9], [0, 9, 5, 9, 0], [0, 0, 9, 0, 0], ]);
pub const fn blank() -> GreyscaleImage
[src]
Trait Implementations
impl Debug for GreyscaleImage
[src]
impl Copy for GreyscaleImage
[src]
impl Clone for GreyscaleImage
[src]
fn clone(&self) -> GreyscaleImage
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Render for GreyscaleImage
[src]
fn brightness_at(&self, x: usize, y: usize) -> u8
[src]
impl<'_> Render for &'_ GreyscaleImage
[src]
fn brightness_at(&self, x: usize, y: usize) -> u8
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self