init(cgContext:options:)
Creates a Core Image context from a Quartz context, using the specified options.
Declaration
init(cgContext cgctx: CGContext, options: [CIContextOption : Any]? = nil)Parameters
- cgctx:
A Quartz graphics context.
- options:
A dictionary that contains color space information. You can pass any of the keys defined in Cicontextoption along with the appropriate value.
Discussion
After calling this method, Core Image draws content to the specified Quartz graphics context.
When you create a CIContext object using a Quartz graphics context, any transformations that are already set on the Quartz graphics context affect drawing to that context.