rect
TypeScriptget rect(): { x: number; y: number; width: number; height: number }Swift declarationvar rect: CGRect { get }Returns a rectangle encapsulating the bounds.
struct · iOS 17.0+ · SDK 27.1
@frozen struct TypographicBoundsThe typographic bounds of an element in a text layout.
get rect(): { x: number; y: number; width: number; height: number }Swift declarationvar rect: CGRect { get }Returns a rectangle encapsulating the bounds.
get width(): numberSwift declarationvar width: CGFloatThe width of the element.
set width(value: number)Swift declarationvar width: CGFloatThe width of the element.
get ascent(): numberSwift declarationvar ascent: CGFloatThe ascent of the element.
set ascent(value: number)Swift declarationvar ascent: CGFloatThe ascent of the element.
get origin(): { x: number; y: number }Swift declarationvar origin: CGPointThe position of the left edge of the element's baseline, relative to the text view.
set origin(value: { x: number; y: number })Swift declarationvar origin: CGPointThe position of the left edge of the element's baseline, relative to the text view.
get descent(): numberSwift declarationvar descent: CGFloatThe descent of the element.
set descent(value: number)Swift declarationvar descent: CGFloatThe descent of the element.
get leading(): numberSwift declarationvar leading: CGFloatThe leading of the element.
set leading(value: number)Swift declarationvar leading: CGFloatThe leading of the element.
static init(): Text_Layout_TypographicBoundsSwift declaration@export(implementation) init()Initializes to an empty bounds with zero origin.
No declarations were skipped in this snapshot.