pub trait SpriteTrait: SmartDrawingTrait {
    fn draw_sprite<P: Into<Vi2d>>(
        &mut self,
        pos: P,
        scale: u32,
        sprite: &Sprite,
        flip: (bool, bool)
    ) { ... } fn draw_partial_sprite<P: Into<Vi2d>>(
        &mut self,
        coords: P,
        sprite: &Sprite,
        o: P,
        size: P,
        scale: u32,
        flip: (bool, bool)
    ) { ... } }
Expand description

A trait that will handle the drawing of Sprite onto the Target

Provided Methods

Draw a Sprite with the top left corner at (x, y) the flip arguement will allow fliping of the axis flip: (horizontal, vertical) scale is the scale of the result (must be >= 1)

Draw a chunk of the given Sprite onto the Target coords is the top left corner of the Target o is the Top left corner of the Sprite Chunk and size is the (width, height) of the chunk flip and scale is the same as SpriteTrait::draw_sprite()

Implementors