Trait DrawImage

Source
pub trait DrawImage<I> {
    // Required method
    fn draw_with_flip(
        &self,
        image: &I,
        top_left: impl Into<[i32; 2]>,
        flip: impl Into<[bool; 2]>,
    );

    // Provided method
    fn draw(&self, image: &I, top_left: impl Into<[i32; 2]>) { ... }
}
Expand description

Ability to draw an image on screen

Required Methods§

Source

fn draw_with_flip( &self, image: &I, top_left: impl Into<[i32; 2]>, flip: impl Into<[bool; 2]>, )

Draw the image on screen with the top-left corner at the given screen coordinates

Provided Methods§

Source

fn draw(&self, image: &I, top_left: impl Into<[i32; 2]>)

Draw the image on screen with the top-left corner at the given screen coordinates

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§