[−][src]Function rotsprite::rotsprite
pub fn rotsprite<P>(
buf: &[P],
empty_color: &P,
width: usize,
rotation: f64
) -> Result<(usize, usize, Vec<P>), Error> where
P: Eq + Clone,
Rotate a sprite based on any pixel format implementing the Eq
and Clone
traits.
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.