One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

GraphicsContext.ResolvedText

struct · iOS 15.0+ · SDK 27.1

struct ResolvedText

A text view resolved to a particular environment. You resolve a ``Text`` view in preparation for drawing it into a context, either manually by calling ``resolve(_:)-4dx65`` or automatically when calling ``draw(_:in:)-5opqf`` or ``draw(_:at:anchor:)-5dgmd``. The resolved text view takes into account environment values like the display resolution and current color scheme.

Members (5)

method · iOS 15.0+

lastBaseline

TypeScript
lastBaseline(size: { width: number; height: number }): number
Swift declaration
func lastBaseline(in size: CGSize) -> CGFloat

Gets the distance from the first line's ascender to the last line's baseline.

method · iOS 15.0+

firstBaseline

TypeScript
firstBaseline(size: { width: number; height: number }): number
Swift declaration
func firstBaseline(in size: CGSize) -> CGFloat

Gets the distance from the first line's ascender to its baseline.

method · iOS 15.0+

measure

TypeScript
measure(size: { width: number; height: number }): { width: number; height: number }
Swift declaration
func measure(in size: CGSize) -> CGSize

Measures the size of the resolved text for a given area into which the text should be placed. - Parameter size: The area to place the ``Text`` view in.

get · iOS 15.0+

shading

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

The shading to fill uncolored text regions with. This value defaults to the ``GraphicsContext/Shading/foreground`` shading.

set · iOS 15.0+

shading

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

The shading to fill uncolored text regions with. This value defaults to the ``GraphicsContext/Shading/foreground`` shading.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUICore types →