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]

Methods enabled by the clip feature.

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.

Create a Clip with this and another PixelFrame.

impl PixelFrame
[src]

Methods enabled by the offset feature.

Offset the PixelFrame by a number of pixels in any of the possible directions:

Example

    let frame: PixelFrame = Default::default();
    let moved_1px_to_the_left = frame.offset(Offset::left(1));

Panics

If offset is out of bounds (> 8).

impl PixelFrame
[src]

Methods enabled by the rotate feature.

Create a new PixelFrame that is rotated by a multiple of 90°, counter-clockwise.

impl PixelFrame
[src]

BLACK: PixelFrame = PixelFrame([<PixelColor>::BLACK; 64])

RED: PixelFrame = PixelFrame([<PixelColor>::RED; 64])

BLUE: PixelFrame = PixelFrame([<PixelColor>::BLUE; 64])

GREEN: PixelFrame = PixelFrame([<PixelColor>::GREEN; 64])

WHITE: PixelFrame = PixelFrame([<PixelColor>::WHITE; 64])

YELLOW: PixelFrame = PixelFrame([<PixelColor>::YELLOW; 64])

CYAN: PixelFrame = PixelFrame([<PixelColor>::CYAN; 64])

MAGENTA: PixelFrame = PixelFrame([<PixelColor>::MAGENTA; 64])

impl PixelFrame
[src]

Create a FrameLine representing the current PixelFrame.

Create a FrameLine representing the current PixelFrame.

Transpose the LED Matrix. Rows become columns.

Flip the LED Matrix horizontally.

Flip the LED Matrix vertically.

Reverse the LED Matrix.

Returns a [[PixelColor; 8]; 8], organized by rows, from top to bottom.

Returns a [[PixelColor; 8]; 8], organized by columns, from left to right.

Create a new PixelFrame from a [[PixelColor; 8]; 8], of 8 rows with 8 PixelColors.

Create a new PixelFrame from a [[PixelColor; 8]; 8], of 8 columns with 8 PixelColors.

Trait Implementations

impl Copy for PixelFrame
[src]

impl Clone for PixelFrame
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for PixelFrame
[src]

Formats the value using the given formatter. Read more

impl Default for PixelFrame
[src]

Returns the "default value" for a type. Read more

impl PartialEq for PixelFrame
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> From<&'a [PixelColor; 64]> for PixelFrame
[src]

Performs the conversion.

impl From<[PixelColor; 64]> for PixelFrame
[src]

Performs the conversion.

impl Into<[PixelColor; 64]> for PixelFrame
[src]

Performs the conversion.

impl Index<usize> for PixelFrame
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl IndexMut<usize> for PixelFrame
[src]

Performs the mutable indexing (container[index]) operation.

impl From<FontFrame> for PixelFrame
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for PixelFrame

impl Sync for PixelFrame