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

Retrieves the width & height of the canvas

Sets the pixel at the given coordinate to the given color.

Clears the canvas.

Fills the canvas with 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.

Renders text using the C++ library.

Trait Implementations

Error type to return when a drawing operation fails. Read more

Draws a pixel on the display.

Returns the dimensions of the DrawTarget in pixels.

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

Draws a styled triangle primitive. Read more

Draws a styled rectangle primitive. Read more

Draws a styled circle primitive. Read more

Draws an image with known size Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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.