[−][src]Struct sensehat_screen::frame::PixelFrame
A frame of pixels. This is the basic representation for the LED Matrix display.
Methods
impl PixelFrame[src]
Methods enabled by the clip feature.
pub fn clip(&self, other: &PixelFrame, clip_at: Offset) -> Self[src]
Shortcut to get a PixelFrame from a temporary Clip, at a given Offset.
For memory reallocation, such as when rendering a clip at multiple offsets,
it is better to use PixelFrame::build_clip.
pub fn build_clip(&self, other: &PixelFrame) -> Clip[src]
Create a Clip with this and another PixelFrame.
impl PixelFrame[src]
Methods enabled by the offset feature.
impl PixelFrame[src]
Methods enabled by the rotate feature.
pub fn rotate(&self, rotate: Rotate) -> Self[src]
Create a new PixelFrame that is rotated by a multiple of 90°, counter-clockwise.
impl PixelFrame[src]
pub const BLACK: PixelFrame[src]
pub const RED: PixelFrame[src]
pub const BLUE: PixelFrame[src]
pub const GREEN: PixelFrame[src]
pub const WHITE: PixelFrame[src]
pub const YELLOW: PixelFrame[src]
pub const CYAN: PixelFrame[src]
pub const MAGENTA: PixelFrame[src]
impl PixelFrame[src]
pub fn new(pixels: &[PixelColor; 64]) -> Self[src]
Create a FrameLine representing the current PixelFrame.
pub fn frame_line(&self) -> FrameLine[src]
Create a FrameLine representing the current PixelFrame.
pub fn transpose(&mut self)[src]
Transpose the LED Matrix. Rows become columns.
pub fn flip_h(&mut self)[src]
Flip the LED Matrix horizontally.
pub fn flip_v(&mut self)[src]
Flip the LED Matrix vertically.
pub fn reverse(&mut self)[src]
Reverse the LED Matrix.
pub fn as_rows(&self) -> [[PixelColor; 8]; 8][src]
Returns a [[PixelColor; 8]; 8], organized by rows, from top to bottom.
pub fn as_columns(&self) -> [[PixelColor; 8]; 8][src]
Returns a [[PixelColor; 8]; 8], organized by columns, from left to right.
pub fn from_rows(rows: &[[PixelColor; 8]; 8]) -> Self[src]
Create a new PixelFrame from a [[PixelColor; 8]; 8], of 8 rows with 8 PixelColors.
pub fn from_columns(columns: &[[PixelColor; 8]; 8]) -> Self[src]
Create a new PixelFrame from a [[PixelColor; 8]; 8], of 8 columns with 8 PixelColors.
Trait Implementations
impl Into<[PixelColor; 64]> for PixelFrame[src]
fn into(self) -> [PixelColor; 64][src]
impl PartialEq<PixelFrame> for PixelFrame[src]
fn eq(&self, other: &PixelFrame) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl Copy for PixelFrame[src]
impl Clone for PixelFrame[src]
fn clone(&self) -> PixelFrame[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<'a> From<&'a [PixelColor; 64]> for PixelFrame[src]
fn from(array: &'a [PixelColor; 64]) -> Self[src]
impl From<[PixelColor; 64]> for PixelFrame[src]
fn from(array: [PixelColor; 64]) -> Self[src]
impl From<FontFrame> for PixelFrame[src]
impl Default for PixelFrame[src]
impl Debug for PixelFrame[src]
impl Index<usize> for PixelFrame[src]
type Output = PixelColor
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output[src]
impl IndexMut<usize> for PixelFrame[src]
Auto Trait Implementations
impl Send for PixelFrame
impl Sync for PixelFrame
Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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> 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> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,