Crop quadrilateral image from image to swiftUI

Viewed 16

I am trying to crop a quadrilateral path from an image, I am using swiftUI. I have access to the coordinates of the four points that define the quadrilateral. I see that you can crop using CGRect however that does not work for me since it only works for rectangles and I need quadrilaterals. I have looked around and it seems people have done it by using UIImageView Like here but I am not sure where I can get a UIImageView and reconcile it with swiftUI to display it.

0 Answers
Related