Instance Method

createCGLayerWithSize:info:

Creates a CGLayer object from the provided parameters.

Declaration

- (CGLayerRef)createCGLayerWithSize:(CGSize)size info:(CFDictionaryRef)info;

Parameters

size

The size, in default user space units, of the layer relative to the graphics context.

d

A dictionary, which is passed to CGLayerCreateWithContext as the auxiliaryInfo parameter. Pass NULL because this parameter is reserved for future use.

Return Value

A CGLayer object.

Discussion

After calling this method, Core Image draws content into the CGLayer object. Core Image creates a CGLayer object by calling the Quartz 2D function CGLayerCreateWithContext, whose prototype is:

CGLayerRef CGLayerCreateWithContext (
   CGContextRef context,
   CGSize size,
   CFDictionaryRef auxiliaryInfo
);

Core Image passes the CIContext object as the context parameter, the size as the size parameter, and the dictionary as the auxiliaryInfo parameter. For more information on CGLayer objects, see Quartz 2D Programming Guide and CGLayer.

See Also

Rendering Images

- createCGImage:fromRect:

Creates a Quartz 2D image from a region of a Core Image image object.

- createCGImage:fromRect:format:colorSpace:

Creates a Quartz 2D image from a region of a Core Image image object.

- createCGImage:fromRect:format:colorSpace:deferred:

Creates a Quartz 2D image from a region of a Core Image image object with deferred rendering.

- render:toCVPixelBuffer:

Renders an image into a pixel buffer.

- render:toCVPixelBuffer:bounds:colorSpace:

Renders a region of an image into a pixel buffer.

- render:toIOSurface:bounds:colorSpace:

Renders a region of an image into an IOSurface object.

- render:toMTLTexture:commandBuffer:bounds:colorSpace:

Renders a region of an image to a Metal texture.