A set of drawing attributes that represent the configuration of an image renderer context.


class UIGraphicsImageRendererFormat : UIGraphicsRendererFormat


Use an instance of UIGraphicsImageRendererFormat to initialize a UIGraphicsImageRenderer object with nondefault attributes.

The image renderer format object contains properties that determine the attributes of the underlying Core Graphics contexts that the image renderer creates. Use the default() class method to create an image renderer format instance optimized for the current device.


Creating the Renderer

init(for: UITraitCollection)

Creates a format best suited for rendering on a device with the specified traits.

Configuring the Renderer Attributes

var opaque: Bool

A Boolean value indicating whether the underlying Core Graphics context has an alpha channel.

var prefersExtendedRange: Bool

A Boolean value specifying whether the bitmap context should use extended color.

var scale: CGFloat

The display scale of the image renderer context.


Conforms To

See Also

Drawing Contexts

class UIGraphicsRenderer

An abstract base class for creating graphics renderers.

class UIGraphicsRendererContext

The base class for the drawing environments associated with graphics renderers.

class UIGraphicsRendererFormat

A set of drawing attributes that represent the configuration of a graphics renderer context.

class UIGraphicsImageRenderer

A graphics renderer for creating Core Graphics-backed images.

class UIGraphicsImageRendererContext

The drawing environment associated with an image renderer.

class UIGraphicsPDFRenderer

A graphics renderer for creating PDFs.

typealias UIGraphicsPDFRenderer.DrawingActions

A handler block that you use to draw PDF content.

class UIGraphicsPDFRendererContext

A drawing environment associated with a PDF renderer.

class UIGraphicsPDFRendererFormat

A set of drawing attributes that represents the configuration of a PDF renderer context.