---
title: "tiledImage(_:origin:sourceRect:scale:)"
framework: swiftui
role: symbol
role_heading: Type Method
path: "swiftui/graphicscontext/shading/tiledimage(_:origin:sourcerect:scale:)"
---

# tiledImage(_:origin:sourceRect:scale:)

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

## Declaration

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

## Parameters

- `image`: An doc://com.apple.SwiftUI/documentation/SwiftUI/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.

## Return Value

Return Value A shading instance filled with a tiled image.
