pub fn shearx(photon_img: &PhotonImage, shear: f32) -> PhotonImage
Expand description
Shear the image along the X axis. A sheared PhotonImage is returned.
§Arguments
img
- A PhotonImage. See the PhotonImage struct for details.shear
- Amount to shear.
§Example
// For example, to shear an image by 0.5:
use photon_rs::native::open_image;
use photon_rs::transform::shearx;
let img = open_image("img.jpg").expect("File should open");
let sheared_img = shearx(&img, 0.5);