Overview of SkiaSharp Transforms
mainSkiaSharp implements graphics transforms as methods of the SKCanvas object. These transforms alter the coordinates and sizes specified in SKCanvas drawing functions during rendering. They are useful for drawing repetitive graphics or creating animations.
Affine Transforms
Affine transforms preserve parallel lines and ensure coordinates/sizes do not become infinite. Supported operations include:
- Translate: Shifts coordinates from one location to another.
- Scale: Increases or decreases coordinates and sizes.
- Rotate: Rotates coordinates around a specific point.
- Skew: Shifts coordinates horizontally or vertically (e.g., turning a rectangle into a parallelogram).
Non-Affine (Projective/Perspective) Transforms
Based on a standard 3-by-3 transform matrix, non-affine transforms allow for more complex effects, such as transforming a square into a convex quadrilateral. These are essential for 3D effects but can cause coordinates or sizes to become infinite.