Initializer

init(bounds:format:)

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

Declaration

init(bounds: CGRect, format: UIGraphicsImageRendererFormat)

Parameters

bounds

The bounds of the image context the image renderer creates and subsequently draws upon. Specify values in points in the Core Graphics coordinate space.

format

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

Return Value

An initialized image renderer.

Discussion

Use this initializer to create an image renderer when you want to override the default format for the current device.

See Also

Initializing an Image Renderer

init(size: CGSize)

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

init(size: CGSize, format: UIGraphicsImageRendererFormat)

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