Interface

TextInclusionStrategy

The text inclusion strategy used by Paragraph.getRangeForRect, it specifies when a range of text is inside the given rect based on the geometric relation between the text range's bounding box and the given rect.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Source set: Common

Added in 1.11.0-rc01

fun interface TextInclusionStrategy

The text inclusion strategy used by Paragraph.getRangeForRect, it specifies when a range of text is inside the given rect based on the geometric relation between the text range's bounding box and the given rect.

Functions

isIncluded

Added in 1.11.0-rc01

fun isIncluded(textBounds: Rect, rect: Rect): Boolean

Returns true if this TextInclusionStrategy considers the text range's textBounds to be inside the given rect.

Parameters

textBounds the bounding box of a range of the text.
rect a rectangle area.