Initializer

init(size:format:)

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

Declaration

Parameters

size

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

format

A UIGraphicsImageRendererFormat object that encapsulates the format used to create the renderer context.

Return Value

An initialized renderer.

Discussion

Use this initializer to create an image renderer when you want to override the default format for the current device. Provide the size of the images you want to create, and an instance of UIGraphicsImageRendererFormat with the required configuration.

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)

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