# C1.Util.DX.DirectWrite.InlineObject.Draw

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DirectWrite_InlineObject_Draw_" data-uid="C1.Util.DX.DirectWrite.InlineObject.Draw*">Draw Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DirectWrite_InlineObject_Draw_" data-uid="C1.Util.DX.DirectWrite.InlineObject.Draw*"></a>
<h4 id="C1_Util_DX_DirectWrite_InlineObject_Draw_System_Object_C1_Util_DX_DirectWrite_TextRenderer_System_Single_System_Single_System_Boolean_System_Boolean_System_IntPtr_" data-uid="C1.Util.DX.DirectWrite.InlineObject.Draw(System.Object,C1.Util.DX.DirectWrite.TextRenderer,System.Single,System.Single,System.Boolean,System.Boolean,System.IntPtr)">Draw(object, TextRenderer, float, float, bool, bool, nint)</h4>
<div class="markdown level1 summary"><p>The application implemented rendering callback (<a class="xref" href="C1.Util.DX.DirectWrite.TextRenderer.DrawInlineObject.html#C1_Util_DX_DirectWrite_TextRenderer_DrawInlineObject_System_Object_System_Single_System_Single_C1_Util_DX_DirectWrite_InlineObject_System_Boolean_System_Boolean_System_IntPtr_">DrawInlineObject(object, float, float, InlineObject, bool, bool, nint)</a>) can use this to draw the inline object without needing to cast or query the object type. The text layout does not call this method directly.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">void Draw(object clientDrawingContext, TextRenderer renderer, float originX, float originY, bool isSideways, bool isRightToLeft, nint clientDrawingEffectPtr)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Sub Draw(clientDrawingContext As Object, renderer As TextRenderer, originX As Single, originY As Single, isSideways As Boolean, isRightToLeft As Boolean, clientDrawingEffectPtr As IntPtr)</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.object">object</a></td>
      <td><span class="parametername">clientDrawingContext</span></td>
      <td><p>The drawing context passed to <span class="xref">C1.Util.DX.DirectWrite.TextLayout.Draw_(System.IntPtr,System.IntPtr,System.Single,System.Single)</span>.  This parameter may be NULL.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.TextRenderer.html">TextRenderer</a></td>
      <td><span class="parametername">renderer</span></td>
      <td><p>The same renderer passed to <span class="xref">C1.Util.DX.DirectWrite.TextLayout.Draw_(System.IntPtr,System.IntPtr,System.Single,System.Single)</span> as the object's containing parent.  This is useful if the inline object is recursive such as a nested layout.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">originX</span></td>
      <td><p>The x-coordinate at the upper-left corner of the inline object.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">originY</span></td>
      <td><p>The y-coordinate at the upper-left corner of the inline object.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">isSideways</span></td>
      <td><p>A Boolean flag that indicates whether the object's baseline runs alongside the baseline axis of the line.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">isRightToLeft</span></td>
      <td><p>A Boolean flag that indicates whether the object is in a right-to-left context and should be drawn flipped.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">nint</a></td>
      <td><span class="parametername">clientDrawingEffectPtr</span></td>
      <td><p>The drawing effect set in TextLayout.SetDrawingEffect. Usually this effect is a foreground brush that  is used in glyph drawing.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
