One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

GraphicsContext.ResolvedImage

struct · iOS 15.0+ · SDK 27.1

struct ResolvedImage

An image resolved to a particular environment. You resolve an ``Image`` in preparation for drawing it into a context, either manually by calling ``resolve(_:)-898z6``, or automatically when calling ``draw(_:in:style:)-blhz`` or ``draw(_:at:anchor:)-1z5wt``. The resolved image takes into account environment values like the display resolution and current color scheme.

Members (4)

get · iOS 15.0+

size

TypeScript
get size(): { width: number; height: number }
Swift declaration
var size: CGSize { get }

The size of the image.

get · iOS 15.0+

shading

TypeScript
get shading(): (GraphicsContext_Shading) | null
Swift declaration
var shading: GraphicsContext.Shading?

An optional shading to fill the image with. The value of this property defaults to ``GraphicsContext/Shading/foreground`` for template images, and to `nil` otherwise.

set · iOS 15.0+

shading

TypeScript
set shading(value: (GraphicsContext_Shading) | null)
Swift declaration
var shading: GraphicsContext.Shading?

An optional shading to fill the image with. The value of this property defaults to ``GraphicsContext/Shading/foreground`` for template images, and to `nil` otherwise.

get · iOS 15.0+

baseline

TypeScript
get baseline(): number
Swift declaration
let baseline: CGFloat

The distance from the top of the image to its baseline. If the image has no baseline, this value is equivalent to the image's height.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUICore types →