GraphicsContextResolvedText

A text view resolved to a particular environment.

StructureiOS 15.0+macOS 12.0+tvOS 15.0+watchOS 8.0+GraphicsContext.ResolvedText in SwiftUI

Declaration

React
type GraphicsContextResolvedText = { firstBaseline(options: { in: Symbolic<CGSize>; }): Scalar; lastBaseline(options: { in: Symbolic<CGSize>; }): Scalar; measure(options: { in: Symbolic<CGSize>; }): SymbolicSize; shading: GraphicsContextShading | GraphicsContextShading; copy(): GraphicsContextResolvedText; };
Swift
struct ResolvedText

Properties

Overview

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.

From Apple’s SwiftUI documentation. Code samples there are Swift.

See also

More in Drawing and shapes.