# GrapeCity.Documents.Text.TextRect.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Text_TextRect__ctor_" data-uid="GrapeCity.Documents.Text.TextRect.#ctor*">TextRect Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Text_TextRect__ctor_" data-uid="GrapeCity.Documents.Text.TextRect.#ctor*"></a>
<h4 id="GrapeCity_Documents_Text_TextRect__ctor_System_Int32_System_Int32_System_Single_System_Single_System_Single_System_Single_System_Boolean_System_Boolean_System_Boolean_System_Boolean_" data-uid="GrapeCity.Documents.Text.TextRect.#ctor(System.Int32,System.Int32,System.Single,System.Single,System.Single,System.Single,System.Boolean,System.Boolean,System.Boolean,System.Boolean)">TextRect(int, int, float, float, float, float, bool, bool, bool, bool)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Documents.Text.TextRect.html">TextRect</a> class with the specified coordinates, size, and flags.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextRect(int codePointIndex, int codePointCount, float x, float y, float width, float height, bool rightToLeft, bool vertical, bool sideways, bool rotateSidewaysCounterclockwise)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(codePointIndex As Integer, codePointCount As Integer, x As Single, y As Single, width As Single, height As Single, rightToLeft As Boolean, vertical As Boolean, sideways As Boolean, rotateSidewaysCounterclockwise As Boolean)</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>Index of the first code point in the text fragment.</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 text fragment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>The X coordinate of the rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>The Y coordinate of the rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The width of the rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The height of the rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">rightToLeft</span></td>
      <td><p>Indicates if the text fragment should appear from right to left.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">vertical</span></td>
      <td><p>Indicates if the text fragment should appear upright with vertical reading direction.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">sideways</span></td>
      <td><p>Indicates if the text fragment should appear rotated 90 or -90 degrees.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">rotateSidewaysCounterclockwise</span></td>
      <td><p>Indicates if sideways should be rotated counterclockwise.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
