# C1.Util.DX.Direct2D.RenderTarget.DrawTextLayout

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct2D_RenderTarget_DrawTextLayout_" data-uid="C1.Util.DX.Direct2D.RenderTarget.DrawTextLayout*">DrawTextLayout Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct2D_RenderTarget_DrawTextLayout_" data-uid="C1.Util.DX.Direct2D.RenderTarget.DrawTextLayout*"></a>
<h4 id="C1_Util_DX_Direct2D_RenderTarget_DrawTextLayout_C1_Util_DX_Point2F_C1_Util_DX_DirectWrite_TextLayout_C1_Util_DX_Direct2D_Brush_" data-uid="C1.Util.DX.Direct2D.RenderTarget.DrawTextLayout(C1.Util.DX.Point2F,C1.Util.DX.DirectWrite.TextLayout,C1.Util.DX.Direct2D.Brush)">DrawTextLayout(Point2F, TextLayout, Brush)</h4>
<div class="markdown level1 summary"><p>Draws the formatted text described by the specified <span class="xref">C1.Win.DX.DirectWrite.TextLayout</span> object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawTextLayout(Point2F origin, TextLayout textLayout, Brush defaultForegroundBrush)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawTextLayout(origin As Point2F, textLayout As TextLayout, defaultForegroundBrush As Brush)</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="C1.Util.DX.Point2F.html">Point2F</a></td>
      <td><span class="parametername">origin</span></td>
      <td><p>The point, described in device-independent pixels, at which the upper-left corner of the text described by textLayout is drawn.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.TextLayout.html">TextLayout</a></td>
      <td><span class="parametername">textLayout</span></td>
      <td><p>The formatted text to draw. Any drawing effects that do not inherit from <span class="xref">C1.Win.DX.Direct2D.Resource</span> are ignored. If there are drawing effects that inherit from ID2D1Resource that are not brushes, this method fails and the render target is put in an error state.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.Brush.html">Brush</a></td>
      <td><span class="parametername">defaultForegroundBrush</span></td>
      <td><p>The brush used to paint any text in textLayout that does not already have a brush associated with it as a drawing effect (specified by the <span class="xref">C1.Win.DX.DirectWrite.TextLayout.SetDrawingEffect(C1.Win.DX.ComObject,C1.Win.DX.DirectWrite.TextRange)</span> method).</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct2D_RenderTarget_DrawTextLayout_" data-uid="C1.Util.DX.Direct2D.RenderTarget.DrawTextLayout*"></a>
<h4 id="C1_Util_DX_Direct2D_RenderTarget_DrawTextLayout_C1_Util_DX_Point2F_C1_Util_DX_DirectWrite_TextLayout_C1_Util_DX_Direct2D_Brush_C1_Util_DX_Direct2D_DrawTextOptions_" data-uid="C1.Util.DX.Direct2D.RenderTarget.DrawTextLayout(C1.Util.DX.Point2F,C1.Util.DX.DirectWrite.TextLayout,C1.Util.DX.Direct2D.Brush,C1.Util.DX.Direct2D.DrawTextOptions)">DrawTextLayout(Point2F, TextLayout, Brush, DrawTextOptions)</h4>
<div class="markdown level1 summary"><p>void ID2D1RenderTarget::DrawTextLayout([In] D2D_POINT_2F origin,[In] IDWriteTextLayout* textLayout,[In] ID2D1Brush* defaultForegroundBrush,[In] D2D1_DRAW_TEXT_OPTIONS options)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawTextLayout(Point2F origin, TextLayout textLayout, Brush defaultForegroundBrush, DrawTextOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawTextLayout(origin As Point2F, textLayout As TextLayout, defaultForegroundBrush As Brush, options As DrawTextOptions)</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="C1.Util.DX.Point2F.html">Point2F</a></td>
      <td><span class="parametername">origin</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.TextLayout.html">TextLayout</a></td>
      <td><span class="parametername">textLayout</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.Brush.html">Brush</a></td>
      <td><span class="parametername">defaultForegroundBrush</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.DrawTextOptions.html">DrawTextOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
