TextInclusionStrategy
-
Cmn
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.
| See also | |
|---|---|
getRangeForRect |
Summary
Public companion properties |
||
|---|---|---|
TextInclusionStrategy |
The |
Cmn
|
TextInclusionStrategy |
The |
Cmn
|
TextInclusionStrategy |
The |
Cmn
|
Public functions |
||
|---|---|---|
Boolean |
isIncluded(textBounds: Rect, rect: Rect)Returns true if this |
Cmn
|
Public companion properties
AnyOverlap
val AnyOverlap: TextInclusionStrategy
The TextInclusionStrategy that includes the text range whose bounds has any overlap with the given rect.
ContainsAll
val ContainsAll: TextInclusionStrategy
The TextInclusionStrategy that includes the text range whose bounds is completely contained by the given rect.
ContainsCenter
val ContainsCenter: TextInclusionStrategy
The TextInclusionStrategy that includes the text range whose bounds' center is contained by the given rect.
Public functions
isIncluded
fun isIncluded(textBounds: Rect, rect: Rect): Boolean
Returns true if this TextInclusionStrategy considers the text range's textBounds to be inside the given rect.