pub struct LedPixelDrawTarget<CDraw, CDev, S>where
    CDraw: RgbColor,
    CDev: LedPixelColor + From<CDraw>,
    S: LedPixelShape,
{ /* private fields */ }
Available on crate features embedded-graphics-core and unstable only.
Expand description

Target for embedded-graphics drawing operations of the LED pixels.

  • CDraw - color type for embedded-graphics drawing operations
  • CDev - the LED pixel color type (device dependant). It shall be convertible from CDraw.
  • S - the LED pixel shape

flush() operation shall be required to write changes from a framebuffer to the display.

Implementations§

Create a new draw target.

channel_num shall be different between different gpio_num.

Set maximum brightness. Each channel values of the returned shall be scaled down to (brightness + 1) / 256.

Returns maximum brightness.

Clear with black. Same operation as clear(black_color).

Write changes from a framebuffer to the LED pixels

Trait Implementations§

The pixel color type the targetted display supports.
Error type to return when a drawing operation fails. Read more
Draw individual pixels to the display without a defined order. Read more
Fill the entire display with a solid color. Read more
Fill a given area with an iterator providing a contiguous stream of pixel colors. Read more
Fill a given area with a solid color. Read more
Returns the size of the bounding box.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Casts the value.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Casts the value.
Returns the bounding box.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Casts the value.
Casts the value.
Casts the value.
Casts the value.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Casts the value.
Casts the value.
Casts the value.
Casts the value.