<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/GraphicsContext/Shading/tiledImage(_:origin:sourceRect:scale:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI15GraphicsContextV7ShadingV10tiledImage_6origin10sourceRect5scaleAeA0G0V_So7CGPointVSo6CGRectV14CoreFoundation7CGFloatVtFZ"
  },
  "title" : "tiledImage(_:origin:sourceRect:scale:)"
}
-->

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

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

```
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 [`Image`](/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

A shading instance filled with a tiled image.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)