A shape style that fills a shape by repeating a region of an image.
You can also use ``ShapeStyle/image(_:sourceRect:scale:)`` to construct this
style.
Members (7)
get · iOS 13.0+
sourceRect
TypeScript
get sourceRect(): { x: number; y: number; width: number; height: number }
Swift declaration
var sourceRect: CGRect
A unit-space rectangle defining how much of the source image to draw.
The results are undefined if this rectangle selects areas outside the
`[0, 1]` range in either axis.
set · iOS 13.0+
sourceRect
TypeScript
set sourceRect(value: { x: number; y: number; width: number; height: number })
Swift declaration
var sourceRect: CGRect
A unit-space rectangle defining how much of the source image to draw.
The results are undefined if this rectangle selects areas outside the
`[0, 1]` range in either axis.
Creates a shape-filling shape style.
- Parameters:
- image: The image to be drawn.
- sourceRect: A unit-space rectangle defining how much of the source
image to draw. The results are undefined if `sourceRect` selects
areas outside the `[0, 1]` range in either axis.
- scale: A scale factor applied to the image during rendering.
get · iOS 13.0+
image
TypeScript
get image(): Image
Swift declaration
var image: Image
The image to be drawn.
set · iOS 13.0+
image
TypeScript
set image(value: Image)
Swift declaration
var image: Image
The image to be drawn.
get · iOS 13.0+
scale
TypeScript
get scale(): number
Swift declaration
var scale: CGFloat
A scale factor applied to the image while being drawn.
set · iOS 13.0+
scale
TypeScript
set scale(value: number)
Swift declaration
var scale: CGFloat
A scale factor applied to the image while being drawn.