Initializer

init(size:)

Creates an image renderer for drawing images of a given size.

Declaration

convenience init(size: CGSize)

Parameters

size

The size of images output from the renderer, specified in points.

Return Value

An initialized image renderer.

Discussion

Use this initializer to create an image renderer that will draw images of a given size. This renderer uses the default() static method on UIGraphicsImageRendererContext to create its context, thereby selecting parameters that are the most appropriate for the current device.

See Also

Initializing an Image Renderer

init(bounds: CGRect, format: UIGraphicsImageRendererFormat)

Creates a new image renderer with a given bounds and format.

init(size: CGSize, format: UIGraphicsImageRendererFormat)

Creates a new image renderer with a given size and format.