Rotsprite

Trait Rotsprite 

Source
pub trait Rotsprite<P>
where P: Clone + Eq,
{ // Required method fn rotsprite(&self, rotation: f64) -> Result<Self, Error> where Self: Sized; }
Expand description

Expose rotsprite method on some image types.

Required Methods§

Source

fn rotsprite(&self, rotation: f64) -> Result<Self, Error>
where Self: Sized,

Clone and rotate a sprite.

Rotation is in degrees (0-360). The size of the resulting vector will be bigger if the rotation isn’t exactly 0.0, 90.0, 180.0 or 270.0 degrees. The width and the height will be swapped at angles of 90.0 and 270.0.

Implementations on Foreign Types§

Source§

impl Rotsprite<u32> for BlitBuffer

Source§

fn rotsprite(&self, rotation: f64) -> Result<Self, Error>

Implementors§