Skip to main content

Graphics

Struct Graphics 

Source
pub struct Graphics<'a, SPI, DC, RST = NoPin>
where SPI: SpiDevice, DC: OutputPin, RST: OutputPin,
{ pub display: &'a mut St7789v<SPI, DC, RST>, }

Fields§

§display: &'a mut St7789v<SPI, DC, RST>

Référence vers l’affichage ST7789V

Implementations§

Source§

impl<'a, SPI, DC> Graphics<'a, SPI, DC, NoPin>
where SPI: SpiDevice, DC: OutputPin,

Source

pub fn new_no_rst(display: &'a mut St7789v<SPI, DC, NoPin>) -> Self

Crée un nouveau contexte graphique sans broche RST.

§Arguments
  • display - Référence mutable vers l’affichage ST7789V
Source§

impl<'a, SPI, DC, RST> Graphics<'a, SPI, DC, RST>
where SPI: SpiDevice, DC: OutputPin, RST: OutputPin,

Source

pub fn new(display: &'a mut St7789v<SPI, DC, RST>) -> Self

Crée un nouveau contexte graphique avec broche RST.

§Arguments
  • display - Référence mutable vers l’affichage ST7789V
Source

pub async fn pixel(&mut self, x: i32, y: i32, color: Color)

Trace un pixel à la position (x, y) avec la couleur donnée.

Les coordonnées négatives ou en dehors de l’écran sont ignorées silencieusement.

§Arguments
  • x - Coordonnée X (peut être négative ou hors écran)
  • y - Coordonnée Y (peut être négative ou hors écran)
  • color - Couleur du pixel

Auto Trait Implementations§

§

impl<'a, SPI, DC, RST> Freeze for Graphics<'a, SPI, DC, RST>

§

impl<'a, SPI, DC, RST> RefUnwindSafe for Graphics<'a, SPI, DC, RST>

§

impl<'a, SPI, DC, RST> Send for Graphics<'a, SPI, DC, RST>
where SPI: Send, DC: Send, RST: Send,

§

impl<'a, SPI, DC, RST> Sync for Graphics<'a, SPI, DC, RST>
where SPI: Sync, DC: Sync, RST: Sync,

§

impl<'a, SPI, DC, RST> Unpin for Graphics<'a, SPI, DC, RST>

§

impl<'a, SPI, DC, RST> UnsafeUnpin for Graphics<'a, SPI, DC, RST>

§

impl<'a, SPI, DC, RST = NoPin> !UnwindSafe for Graphics<'a, SPI, DC, RST>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.