Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ITextLayout2

interface ITextLayout2
Extends ITextLayout This interface extends ITextLayout with additional functionalities to retrieve data such as line metrics, text lines and rects for a particular range.

Methods

getLineMetrics()

ILineMetric*[] getLineMetrics()
Returns the line metrics for a single line of text within a paragraph.

Returns

ILineMetric*[] A list of ILineMetric struct containing the metrics for the line of text.

getTextLines()

ITextLine*[] getTextLines()
Returns a list of ITextLine objects which includes the range of characters from the source text that it contains.

Returns

ITextLine*[] A list of ITextLine objects containing the range for each of the lines.

getRectsForRange()

Rect[] getRectsForRange(u32 start, u32 end)
Returns a list of bounding boxes that enclose all text between start and end of glyph indexes, including start and excluding end. If start >= end, the resultant array will be empty (size 0).

Parameters

start
u32 — Required index.
end
u32 — Required index.

Returns

Rect[] A list of Rect objects representing the bounding boxes for the specified range of glyphs.
Last modified on October 29, 2026