Type Method 型メソッド

tiledImage(_:origin:sourceRect:scale:)

Returns a shading instance that tiles an image across the infinite plane.

Declaration 宣言

static func tiledImage(_ image: Image, origin: CGPoint = .zero, sourceRect: CGRect = CGRect(x: 0, y: 0, width: 1, height: 1), scale: CGFloat = 1) -> GraphicsContext.Shading

Return Value 戻り値

A shading instance filled with a tiled image.

Parameters パラメータ

image

An Image to use as fill.

origin

The point in the current user space where SwiftUI places the bottom left corner of the part of the image defined by sourceRect. The image repeats as needed.

sourceRect

A unit space subregion of the image. The default is a unit rectangle, which selects the whole image.

scale

A factor that you can use to control the image size.