public void Translate(float offsetX, float offsetY, MatrixOrderX order) { if (order == MatrixOrderX.Prepend) { MatrixFP m = MatrixFP.Identity(); m.Translate(SingleFP.FromFloat(offsetX), SingleFP.FromFloat(offsetY)); m.Multiply(matrix); matrix = m; } else { matrix.Translate(SingleFP.FromFloat(offsetX), SingleFP.FromFloat(offsetY)); } }
public void Shear(float shearX, float shearY, MatrixOrderX order) { if (order == MatrixOrderX.Prepend) { MatrixFP m = MatrixFP.Identity(); m.RotateSkew(SingleFP.FromFloat(shearX), SingleFP.FromFloat(shearY)); m.Multiply(matrix); matrix = m; } else { matrix.RotateSkew(SingleFP.FromFloat(shearX), SingleFP.FromFloat(shearY)); } }
public void Scale(float scaleX, float scaleY, MatrixOrderX order) { if (order == MatrixOrderX.Prepend) { MatrixFP m = MatrixFP.Identity(); m.Scale(SingleFP.FromFloat(scaleX), SingleFP.FromFloat(scaleY)); m.Multiply(matrix); matrix = m; } else { matrix.Scale(SingleFP.FromFloat(scaleX), SingleFP.FromFloat(scaleY)); } }
public void Rotate(float angle, MatrixOrderX order) { if (order == MatrixOrderX.Prepend) { MatrixFP m = MatrixFP.Identity(); m.Rotate(MathFP.ToRadians(SingleFP.FromFloat(angle))); m.Multiply(matrix); matrix = m; } else { matrix.Rotate(MathFP.ToRadians(SingleFP.FromFloat(angle))); } }
public void RotateAt(float angle, PointF point, MatrixOrderX order) { if (order == MatrixOrderX.Prepend) { MatrixFP m = MatrixFP.Identity(); m.Translate(SingleFP.FromFloat(-point.X), SingleFP.FromFloat(-point.Y)); m.Rotate(MathFP.ToRadians(SingleFP.FromFloat(angle))); m.Multiply(matrix); m.Translate(SingleFP.FromFloat(point.X), SingleFP.FromFloat(point.Y)); matrix = m; } else { matrix.Translate(SingleFP.FromFloat(-point.X), SingleFP.FromFloat(-point.Y)); matrix.Rotate(MathFP.ToRadians(SingleFP.FromFloat(angle))); matrix.Translate(SingleFP.FromFloat(point.X), SingleFP.FromFloat(point.Y)); } }
internal MatrixX(MatrixFP m) { matrix = m == null?MatrixFP.Identity() : new MatrixFP(m); }
public MatrixX() { matrix = MatrixFP.Identity(); }
public void Reset() { matrix = MatrixFP.Identity(); }