procedure MatrixSkew(var matrix: TMatrixD; angleX, angleY: double);
Adds an affine skew to the supplied matrix.
dx is the horizontal skew angle (in radians).
And likewise, dy is the vertical skew angle.
For example, if dx = 0.3927 (~22.5 degrees), dy = 0 and the matrix is applied to the coordinate [20,10], then the transformed coordinate will become roughly [20 + 5, 10] or [25, 10].
uses Img32, Img32.Fmt.PNG, Img32.Vector, Img32.Transform; ... var img: TImage32; m: TMatrixD; begin img := TImage32.Create; img.LoadFromFile('beetle.png'); m := IdentityMatrix; //vertical skew MatrixSkew(m, 0,-0.5); //and rotate about the image center MatrixRotate(m, PointD(128,128), angle45); //apply the matrix to the image AffineTransformImage(img, m); img.SaveToFile('beetle_affine.png'); img.Free; end;
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 17 Jan 2025