Struct rpi_led_matrix::LedCanvas [−][src]
pub struct LedCanvas { /* fields omitted */ }
Expand description
The Rust handle for the matrix canvas to draw on.
use rpi_led_matrix::{LedMatrix, LedColor};
let matrix = LedMatrix::new(None, None).unwrap();
let canvas = matrix.canvas();
canvas.fill(&LedColor { red: 128, green: 128, blue: 128 });
Implementations
Sets the pixel at the given coordinate to the given color.
Draws a straight, one pixel wide line using the C++ library.
Consider using embedded-graphics for more drawing features.
Draws a one pixel wide circle using the C++ library.
Consider using embedded-graphics for more drawing features.
Trait Implementations
type Error = Infallible
type Error = Infallible
Error type to return when a drawing operation fails. Read more
Draws a pixel on the display.
Clears the display with the supplied color. Read more
Draws an object from an iterator over its pixels.
Draws a styled line primitive. Read more
fn draw_triangle(
&mut self,
item: &Styled<Triangle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
fn draw_triangle(
&mut self,
item: &Styled<Triangle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
Draws a styled triangle primitive. Read more
fn draw_rectangle(
&mut self,
item: &Styled<Rectangle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
fn draw_rectangle(
&mut self,
item: &Styled<Rectangle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
Draws a styled rectangle primitive. Read more
fn draw_circle(
&mut self,
item: &Styled<Circle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
fn draw_circle(
&mut self,
item: &Styled<Circle, PrimitiveStyle<C>>
) -> Result<(), Self::Error>
Draws a styled circle primitive. Read more
fn draw_image<'b, I>(
&mut self,
item: &'a Image<'b, I, C>
) -> Result<(), Self::Error> where
I: ImageDimensions,
C: PixelColor + From<<C as PixelColor>::Raw>,
&'b I: IntoPixelIter<C>,
fn draw_image<'b, I>(
&mut self,
item: &'a Image<'b, I, C>
) -> Result<(), Self::Error> where
I: ImageDimensions,
C: PixelColor + From<<C as PixelColor>::Raw>,
&'b I: IntoPixelIter<C>,
Draws an image with known size Read more