Instance Method インスタンスメソッド

draw(_:in:style:)

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

Declaration 宣言

func draw(_ image: GraphicsContext.ResolvedImage, in rect: CGRect, style: FillStyle = FillStyle())

Parameters パラメータ

image

The GraphicsContext.ResolvedImage to draw. Get a resolved image from an Image by calling resolve(_:). Alternatively, you can call draw(_:in:style:) with an Image, and that method performs the resolution automatically.

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.

See Also 参照

Drawing an Image