[−][src]Struct sensehat_screen::frame::PixelFrame
A frame of pixels. This is the basic representation for the LED Matrix display.
Implementations
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 PixelColor
s.
pub fn from_columns(columns: &[[PixelColor; 8]; 8]) -> Self
[src]
Create a new PixelFrame
from a [[PixelColor; 8]; 8]
, of 8 columns with 8 PixelColor
s.
Trait Implementations
impl Clone for PixelFrame
[src]
fn clone(&self) -> PixelFrame
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PixelFrame
[src]
impl Debug for PixelFrame
[src]
impl Default for PixelFrame
[src]
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 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]
impl Into<[PixelColor; 64]> for PixelFrame
[src]
fn into(self) -> [PixelColor; 64]
[src]
impl PartialEq<PixelFrame> for PixelFrame
[src]
Auto Trait Implementations
impl RefUnwindSafe for PixelFrame
[src]
impl Send for PixelFrame
[src]
impl Sync for PixelFrame
[src]
impl Unpin for PixelFrame
[src]
impl UnwindSafe for PixelFrame
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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>,