draw(_:at:from:)
Renders a region of an image to a point in the context destination.
Declaration
func draw(_ image: CIImage, at atPoint: CGPoint, from fromRect: CGRect)Parameters
- image:
A Core Image image object.
- atPoint:
The point in the context destination to draw to.
- fromRect:
The region of the image to draw.
Discussion
This method because it is ambiguous as to the units of the dimensions and won’t work as expected in a high-resolution environment which is why you should use drawImage:inRect:fromRect: instead.
On iOS platforms, this method draws the image onto a render buffer for the OpenGL ES context. Use this method only if the CIContext object is created with contextWithEAGLContext:, and hence, you are rendering to a CAEAGLLayer.