---
title: "TextInclusionStrategy"
description: "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."
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>



```kotlin
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

```kotlin
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. |




