Contents

draw(_:in:style:)

Draws an image into the context, using the specified rectangle as a layout frame.

Declaration

func draw(_ image: Image, in rect: CGRect, style: FillStyle = FillStyle())

Parameters

  • image:

    The Image to draw. Before drawing, the method converts the image to a Resolvedimage by calling Resolve(_:) 898z6.

  • rect:

    The rectangle in the current user space to draw the image in.

  • style:

    A fill style to use when rasterizing the image.

Discussion

The current context state defines the full drawing operation. For example, the current transformation and clip shapes affect how SwiftUI draws the image.