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

Object Safety§

This trait is not object safe.

Implementors§