Struct sensehat_screen::frame::PixelFrame [−][src]
pub struct PixelFrame(_);
A frame of pixels. This is the basic representation for the LED Matrix display.
Methods
impl PixelFrame[src]
impl PixelFrameMethods enabled by the clip feature.
pub fn clip(&self, other: &PixelFrame, clip_at: Offset) -> Self[src]
pub fn clip(&self, other: &PixelFrame, clip_at: Offset) -> SelfShortcut 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]
pub fn build_clip(&self, other: &PixelFrame) -> ClipCreate a Clip with this and another PixelFrame.
impl PixelFrame[src]
impl PixelFrameMethods enabled by the offset feature.
impl PixelFrame[src]
impl PixelFrameMethods enabled by the rotate feature.
pub fn rotate(&self, rotate: Rotate) -> Self[src]
pub fn rotate(&self, rotate: Rotate) -> SelfCreate a new PixelFrame that is rotated by a multiple of 90°, counter-clockwise.
impl PixelFrame[src]
impl PixelFramepub const BLACK: PixelFrame
BLACK: PixelFrame = PixelFrame([<PixelColor>::BLACK; 64])
pub const RED: PixelFrame
RED: PixelFrame = PixelFrame([<PixelColor>::RED; 64])
pub const BLUE: PixelFrame
BLUE: PixelFrame = PixelFrame([<PixelColor>::BLUE; 64])
pub const GREEN: PixelFrame
GREEN: PixelFrame = PixelFrame([<PixelColor>::GREEN; 64])
pub const WHITE: PixelFrame
WHITE: PixelFrame = PixelFrame([<PixelColor>::WHITE; 64])
pub const YELLOW: PixelFrame
YELLOW: PixelFrame = PixelFrame([<PixelColor>::YELLOW; 64])
pub const CYAN: PixelFrame
CYAN: PixelFrame = PixelFrame([<PixelColor>::CYAN; 64])
pub const MAGENTA: PixelFrame
MAGENTA: PixelFrame = PixelFrame([<PixelColor>::MAGENTA; 64])
impl PixelFrame[src]
impl PixelFramepub fn new(pixels: &[PixelColor; 64]) -> Self[src]
pub fn new(pixels: &[PixelColor; 64]) -> SelfCreate a FrameLine representing the current PixelFrame.
pub fn frame_line(&self) -> FrameLine[src]
pub fn frame_line(&self) -> FrameLineCreate a FrameLine representing the current PixelFrame.
pub fn transpose(&mut self)[src]
pub fn transpose(&mut self)Transpose the LED Matrix. Rows become columns.
pub fn flip_h(&mut self)[src]
pub fn flip_h(&mut self)Flip the LED Matrix horizontally.
pub fn flip_v(&mut self)[src]
pub fn flip_v(&mut self)Flip the LED Matrix vertically.
pub fn reverse(&mut self)[src]
pub fn reverse(&mut self)Reverse the LED Matrix.
pub fn as_rows(&self) -> [[PixelColor; 8]; 8][src]
pub fn as_rows(&self) -> [[PixelColor; 8]; 8]Returns a [[PixelColor; 8]; 8], organized by rows, from top to bottom.
pub fn as_columns(&self) -> [[PixelColor; 8]; 8][src]
pub fn as_columns(&self) -> [[PixelColor; 8]; 8]Returns a [[PixelColor; 8]; 8], organized by columns, from left to right.
pub fn from_rows(rows: &[[PixelColor; 8]; 8]) -> Self[src]
pub fn from_rows(rows: &[[PixelColor; 8]; 8]) -> SelfCreate a new PixelFrame from a [[PixelColor; 8]; 8], of 8 rows with 8 PixelColors.
pub fn from_columns(columns: &[[PixelColor; 8]; 8]) -> Self[src]
pub fn from_columns(columns: &[[PixelColor; 8]; 8]) -> SelfCreate a new PixelFrame from a [[PixelColor; 8]; 8], of 8 columns with 8 PixelColors.
Trait Implementations
impl Copy for PixelFrame[src]
impl Copy for PixelFrameimpl Clone for PixelFrame[src]
impl Clone for PixelFramefn clone(&self) -> PixelFrame[src]
fn clone(&self) -> PixelFrameReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for PixelFrame[src]
impl Debug for PixelFramefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for PixelFrame[src]
impl Default for PixelFrameimpl PartialEq for PixelFrame[src]
impl PartialEq for PixelFramefn eq(&self, other: &PixelFrame) -> bool[src]
fn eq(&self, other: &PixelFrame) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl<'a> From<&'a [PixelColor; 64]> for PixelFrame[src]
impl<'a> From<&'a [PixelColor; 64]> for PixelFramefn from(array: &'a [PixelColor; 64]) -> Self[src]
fn from(array: &'a [PixelColor; 64]) -> SelfPerforms the conversion.
impl From<[PixelColor; 64]> for PixelFrame[src]
impl From<[PixelColor; 64]> for PixelFramefn from(array: [PixelColor; 64]) -> Self[src]
fn from(array: [PixelColor; 64]) -> SelfPerforms the conversion.
impl Into<[PixelColor; 64]> for PixelFrame[src]
impl Into<[PixelColor; 64]> for PixelFramefn into(self) -> [PixelColor; 64][src]
fn into(self) -> [PixelColor; 64]Performs the conversion.
impl Index<usize> for PixelFrame[src]
impl Index<usize> for PixelFrametype Output = PixelColor
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output[src]
fn index(&self, index: usize) -> &Self::OutputPerforms the indexing (container[index]) operation.
impl IndexMut<usize> for PixelFrame[src]
impl IndexMut<usize> for PixelFramefn index_mut(&mut self, index: usize) -> &mut Self::Output[src]
fn index_mut(&mut self, index: usize) -> &mut Self::OutputPerforms the mutable indexing (container[index]) operation.
impl From<FontFrame> for PixelFrame[src]
impl From<FontFrame> for PixelFrameAuto Trait Implementations
impl Send for PixelFrame
impl Send for PixelFrameimpl Sync for PixelFrame
impl Sync for PixelFrame