# GrapeCity.Documents.Text.TextLayout.GetTextRects

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Text_TextLayout_GetTextRects_" data-uid="GrapeCity.Documents.Text.TextLayout.GetTextRects*">GetTextRects Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Text_TextLayout_GetTextRects_" data-uid="GrapeCity.Documents.Text.TextLayout.GetTextRects*"></a>
<h4 id="GrapeCity_Documents_Text_TextLayout_GetTextRects_System_Int32_System_Int32_System_Boolean_System_Boolean_" data-uid="GrapeCity.Documents.Text.TextLayout.GetTextRects(System.Int32,System.Int32,System.Boolean,System.Boolean)">GetTextRects(int, int, bool, bool)</h4>
<div class="markdown level1 summary"><p>Returns the list of <a class="xref" href="GrapeCity.Documents.Text.TextRect.html">TextRect</a> objects for the specified range of code points.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public IReadOnlyList&lt;TextRect&gt; GetTextRects(int codePointIndex, int codePointCount, bool withLineGap = false, bool withLineSpacing = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetTextRects(codePointIndex As Integer, codePointCount As Integer, Optional withLineGap As Boolean = False, Optional withLineSpacing As Boolean = False) As IReadOnlyList(Of TextRect)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">codePointIndex</span></td>
      <td><p>The code point index of the range start.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">codePointCount</span></td>
      <td><p>The number of code points in the range.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">withLineGap</span></td>
      <td><p>Indicates if the additional spacing before text lines should be included.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">withLineSpacing</span></td>
      <td><p>Indicates if the additional spacing after text lines should be included.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a>&lt;<a class="xref" href="GrapeCity.Documents.Text.TextRect.html">TextRect</a>&gt;</td>
      <td><p>A read-only list of text rectangles.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
