class TextLayout
source · line 29public class TextLayout internal constructor(
internal val resource: TextResource,
public val content: StyledText
) : Closeable
- Supertype
Closeable - Inherited
fun dispose(): Unit· Closeable
One immutable layout snapshot; all geometry is local logical coordinates.
Extensions
public fun TextLayout.logicalLineRange(position: TextPosition): TextRange?· scoop:scoop.graphics.text:0.1.0public fun TextLayout.moveGrapheme(byteOffset: Long, forward: Boolean): Long· scoop:scoop.graphics.text:0.1.0public fun TextLayout.wordRange(position: TextPosition): TextRange· scoop:scoop.graphics.text:0.1.0public fun TextLayout.moveWord(byteOffset: Long, forward: Boolean): Long· scoop:scoop.graphics.text:0.1.0@Unsafe public fun <T> TextLayout.withNativeLayout(block: (NativeTextLayout) -> T): T· scoop:scoop.graphics.text:0.1.0public fun TextLayout.moveCaret(position: TextPosition, movement: CaretMovement, preferredX: Double? = None): CaretMove?· scoop:scoop.graphics.text:0.1.0
function selection
source · line 98public fun selection(range: TextRange): Array<TextBox>
A logical selection can have several visual rectangles in bidirectional text.
parameter range
source · line 98range: TextRange
property content
source · line 31public val content: StyledText
get: public read-only
property size
source · line 35public val size: Size
get: public read-only
function close
source · line 112public override fun close(): Unit
- Overrides
close
property graphemeBoundaries
source · line 43public val graphemeBoundaries: Array<Long>
get: public read-only
property paintBounds
source · line 47public val paintBounds: Rect
get: public read-only
Conservative bounds of the actual text ink, excluding externally drawn inline objects.
getter get
source · line 47get(): Rect
property ideographicBaseline
source · line 39public val ideographicBaseline: Double
get: public read-only
property inlineObjects
source · line 44public val inlineObjects: Array<InlinePlacement>
get: public read-only
property minIntrinsicWidth
source · line 36public val minIntrinsicWidth: Double
get: public read-only
function caret
source · line 72public fun caret(position: TextPosition, thickness: Double = 1.0): Rect?
Requires a grapheme boundary; elided text has no caret geometry.
parameter position
source · line 72position: TextPosition
parameter thickness
source · line 72thickness: Double = 1.0
property didExceedMaxLines
source · line 40public val didExceedMaxLines: Boolean
get: public read-only
property isClosed
source · line 45public val isClosed: Boolean
get: public read-only
getter get
source · line 45get(): Boolean
property alphabeticBaseline
source · line 38public val alphabeticBaseline: Double
get: public read-only
property text
source · line 33public val text: String
get: public read-only
getter get
source · line 33get(): String
property unresolvedGlyphCount
source · line 41public val unresolvedGlyphCount: Int
get: public read-only
property lines
source · line 42public val lines: Array<TextLine>
get: public read-only
function hitTest
source · line 56public fun hitTest(point: Point): TextPosition
parameter point
source · line 56point: Point
property maxIntrinsicWidth
source · line 37public val maxIntrinsicWidth: Double
get: public read-only