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 PixelFrame
Methods 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) -> Self
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]
pub fn build_clip(&self, other: &PixelFrame) -> Clip
Create a Clip
with this and another PixelFrame
.
impl PixelFrame
[src]
impl PixelFrame
Methods enabled by the offset
feature.
impl PixelFrame
[src]
impl PixelFrame
Methods enabled by the rotate
feature.
pub fn rotate(&self, rotate: Rotate) -> Self
[src]
pub fn rotate(&self, rotate: Rotate) -> Self
Create a new PixelFrame
that is rotated by a multiple of 90°
, counter-clockwise.
impl PixelFrame
[src]
impl PixelFrame
pub 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 PixelFrame
pub fn new(pixels: &[PixelColor; 64]) -> Self
[src]
pub fn new(pixels: &[PixelColor; 64]) -> Self
Create a FrameLine
representing the current PixelFrame
.
pub fn frame_line(&self) -> FrameLine
[src]
pub fn frame_line(&self) -> FrameLine
Create 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]) -> Self
Create a new PixelFrame
from a [[PixelColor; 8]; 8]
, of 8 rows with 8 PixelColor
s.
pub fn from_columns(columns: &[[PixelColor; 8]; 8]) -> Self
[src]
pub fn from_columns(columns: &[[PixelColor; 8]; 8]) -> Self
Create a new PixelFrame
from a [[PixelColor; 8]; 8]
, of 8 columns with 8 PixelColor
s.
Trait Implementations
impl Copy for PixelFrame
[src]
impl Copy for PixelFrame
impl Clone for PixelFrame
[src]
impl Clone for PixelFrame
fn clone(&self) -> PixelFrame
[src]
fn clone(&self) -> PixelFrame
Returns 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 PixelFrame
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for PixelFrame
[src]
impl Default for PixelFrame
impl PartialEq for PixelFrame
[src]
impl PartialEq for PixelFrame
fn eq(&self, other: &PixelFrame) -> bool
[src]
fn eq(&self, other: &PixelFrame) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'a> From<&'a [PixelColor; 64]> for PixelFrame
[src]
impl<'a> From<&'a [PixelColor; 64]> for PixelFrame
fn from(array: &'a [PixelColor; 64]) -> Self
[src]
fn from(array: &'a [PixelColor; 64]) -> Self
Performs the conversion.
impl From<[PixelColor; 64]> for PixelFrame
[src]
impl From<[PixelColor; 64]> for PixelFrame
fn from(array: [PixelColor; 64]) -> Self
[src]
fn from(array: [PixelColor; 64]) -> Self
Performs the conversion.
impl Into<[PixelColor; 64]> for PixelFrame
[src]
impl Into<[PixelColor; 64]> for PixelFrame
fn into(self) -> [PixelColor; 64]
[src]
fn into(self) -> [PixelColor; 64]
Performs the conversion.
impl Index<usize> for PixelFrame
[src]
impl Index<usize> for PixelFrame
type Output = PixelColor
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
fn index(&self, index: usize) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for PixelFrame
[src]
impl IndexMut<usize> for PixelFrame
fn index_mut(&mut self, index: usize) -> &mut Self::Output
[src]
fn index_mut(&mut self, index: usize) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl From<FontFrame> for PixelFrame
[src]
impl From<FontFrame> for PixelFrame
Auto Trait Implementations
impl Send for PixelFrame
impl Send for PixelFrame
impl Sync for PixelFrame
impl Sync for PixelFrame