Skip to main content
API Reference SwiftyNsdk ImageMath

affineCrop

Returns an affine transformation that crops the source size to match the aspect ratio of the target size....

Declaration

static func affineCrop(source: CGSize, target: CGSize) -> CGAffineTransform

Summary

Returns an affine transformation that crops the source size to match the aspect ratio of the target size.
- Parameters:
- source: The size of the source container.
- target: The size of the target container.
- Returns: An affine transformation matrix that crops the source to fit the target aspect ratio.


ON THIS PAGE