pub trait Rotsprite<P>{
// Required method
fn rotsprite(&self, rotation: f64) -> Result<Self, Error>
where Self: Sized;
}Expand description
Expose rotsprite method on some image types.
Required Methods§
Sourcefn rotsprite(&self, rotation: f64) -> Result<Self, Error>where
Self: Sized,
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.