# C1.Util.DX.DirectWrite.Factory.CreateGdiCompatibleTextLayout1

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DirectWrite_Factory_CreateGdiCompatibleTextLayout1_" data-uid="C1.Util.DX.DirectWrite.Factory.CreateGdiCompatibleTextLayout1*">CreateGdiCompatibleTextLayout1 Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DirectWrite_Factory_CreateGdiCompatibleTextLayout1_" data-uid="C1.Util.DX.DirectWrite.Factory.CreateGdiCompatibleTextLayout1*"></a>
<h4 id="C1_Util_DX_DirectWrite_Factory_CreateGdiCompatibleTextLayout1_System_String_System_Int32_C1_Util_DX_DirectWrite_TextFormat_System_Single_System_Single_System_Single_System_Nullable_C1_Util_DX_Matrix3x2__C1_Util_DX_Bool_" data-uid="C1.Util.DX.DirectWrite.Factory.CreateGdiCompatibleTextLayout1(System.String,System.Int32,C1.Util.DX.DirectWrite.TextFormat,System.Single,System.Single,System.Single,System.Nullable{C1.Util.DX.Matrix3x2},C1.Util.DX.Bool)">CreateGdiCompatibleTextLayout1(string, int, TextFormat, float, float, float, Matrix3x2?, Bool)</h4>
<div class="markdown level1 summary"><p>HRESULT IDWriteFactory::CreateGdiCompatibleTextLayout([In, Buffer] const wchar_t* string,[In] unsigned int stringLength,[In] IDWriteTextFormat* textFormat,[In] float layoutWidth,[In] float layoutHeight,[In] float pixelsPerDip,[In, Optional] const DWRITE_MATRIX* transform,[In] BOOL useGdiNatural,[Out, Fast] IDWriteTextLayout** textLayout)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextLayout1 CreateGdiCompatibleTextLayout1(string text, int stringLength, TextFormat textFormat, float layoutWidth, float layoutHeight, float pixelsPerDip, Matrix3x2? transform, Bool useGdiNatural)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateGdiCompatibleTextLayout1(text As String, stringLength As Integer, textFormat As TextFormat, layoutWidth As Single, layoutHeight As Single, pixelsPerDip As Single, transform As Matrix3x2?, useGdiNatural As Bool) As TextLayout1</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.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">stringLength</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.TextFormat.html">TextFormat</a></td>
      <td><span class="parametername">textFormat</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">layoutWidth</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">layoutHeight</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">pixelsPerDip</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Matrix3x2.html">Matrix3x2</a>?</td>
      <td><span class="parametername">transform</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Bool.html">Bool</a></td>
      <td><span class="parametername">useGdiNatural</span></td>
      <td></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="C1.Util.DX.DirectWrite.TextLayout1.html">TextLayout1</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
