# GrapeCity.Documents.Text.TextLayout.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Text_TextLayout__ctor_" data-uid="GrapeCity.Documents.Text.TextLayout.#ctor*">TextLayout Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Text_TextLayout__ctor_" data-uid="GrapeCity.Documents.Text.TextLayout.#ctor*"></a>
<h4 id="GrapeCity_Documents_Text_TextLayout__ctor" data-uid="GrapeCity.Documents.Text.TextLayout.#ctor">TextLayout()</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Documents.Text.TextLayout.html">TextLayout</a> class with <a class="xref" href="GrapeCity.Documents.Text.TextLayout.Resolution.html#GrapeCity_Documents_Text_TextLayout_Resolution">Resolution</a> set to 72 graphic units per inch.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[Obsolete(&quot;Instead, use the constructor with explicit &#39;resolution&#39; parameter, or the GcGraphics.CreateTextLayout() method.&quot;, false)]
public TextLayout()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;Obsolete(&quot;Instead, use the constructor with explicit &#39;resolution&#39; parameter, or the GcGraphics.CreateTextLayout() method.&quot;, False)&gt;
Public Sub New()</code></pre>
</div>


<a id="GrapeCity_Documents_Text_TextLayout__ctor_" data-uid="GrapeCity.Documents.Text.TextLayout.#ctor*"></a>
<h4 id="GrapeCity_Documents_Text_TextLayout__ctor_System_Single_" data-uid="GrapeCity.Documents.Text.TextLayout.#ctor(System.Single)">TextLayout(float)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Documents.Text.TextLayout.html">TextLayout</a> class.</p>
<p>
If a TextLayout is created to be used with a GrapeCity.Documents.Drawing.GcGraphics,
it is recommended to use the GrapeCity.Documents.Drawing.GcGraphics.CreateTextLayout
method instead, as it ensures that properties such as <a class="xref" href="GrapeCity.Documents.Text.TextLayout.Resolution.html#GrapeCity_Documents_Text_TextLayout_Resolution">Resolution</a> and
<a class="xref" href="GrapeCity.Documents.Text.TextLayout.FontCollection.html#GrapeCity_Documents_Text_TextLayout_FontCollection">FontCollection</a> are set up properly to be used with the graphics.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextLayout(float resolution)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(resolution As Single)</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.single">float</a></td>
      <td><span class="parametername">resolution</span></td>
      <td><p>Specifies the resolution (graphic units per inch).</p>
</td>
    </tr>
  </tbody>
</table>
</div>
