<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ImagePaint",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10ImagePaintV"
  },
  "title" : "ImagePaint"
}
-->

# ImagePaint

A shape style that fills a shape by repeating a region of an image.

```
@frozen struct ImagePaint
```

## Overview

You can also use [`image(_:sourceRect:scale:)`](/documentation/SwiftUI/ShapeStyle/image(_:sourceRect:scale:)) to construct this
style.

## Topics

### Creating an image paint style

[`init(image:sourceRect:scale:)`](/documentation/SwiftUI/ImagePaint/init(image:sourceRect:scale:))

Creates a shape-filling shape style.

### Configuring the image paint style

[`image`](/documentation/SwiftUI/ImagePaint/image)

The image to be drawn.

[`scale`](/documentation/SwiftUI/ImagePaint/scale)

A scale factor applied to the image while being drawn.

[`sourceRect`](/documentation/SwiftUI/ImagePaint/sourceRect)

A unit-space rectangle defining how much of the source image to draw.



---

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)