# C1.Util.DX.DirectWrite.TextRenderer.DrawStrikethrough

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DirectWrite_TextRenderer_DrawStrikethrough_" data-uid="C1.Util.DX.DirectWrite.TextRenderer.DrawStrikethrough*">DrawStrikethrough Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DirectWrite_TextRenderer_DrawStrikethrough_" data-uid="C1.Util.DX.DirectWrite.TextRenderer.DrawStrikethrough*"></a>
<h4 id="C1_Util_DX_DirectWrite_TextRenderer_DrawStrikethrough_System_Object_System_Single_System_Single_C1_Util_DX_DirectWrite_Strikethrough__System_IntPtr_" data-uid="C1.Util.DX.DirectWrite.TextRenderer.DrawStrikethrough(System.Object,System.Single,System.Single,C1.Util.DX.DirectWrite.Strikethrough@,System.IntPtr)">DrawStrikethrough(object, float, float, ref Strikethrough, IntPtr)</h4>
<div class="markdown level1 summary"><p>IDWriteTextLayout::Draw calls this function to instruct the client to draw a strikethrough.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">HResult DrawStrikethrough(object clientDrawingContext, float baselineOriginX, float baselineOriginY, ref Strikethrough strikethrough, IntPtr clientDrawingEffectPtr)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function DrawStrikethrough(clientDrawingContext As Object, baselineOriginX As Single, baselineOriginY As Single, ByRef strikethrough As Strikethrough, clientDrawingEffectPtr As IntPtr) As HResult</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 application-defined drawing context passed to IDWriteTextLayout::Draw.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">baselineOriginX</span></td>
      <td><p>The pixel location (X-coordinate) at the baseline origin of the run where strikethrough applies.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">baselineOriginY</span></td>
      <td><p>The pixel location (Y-coordinate) at the baseline origin of the run where strikethrough applies.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DirectWrite.Strikethrough.html">Strikethrough</a></td>
      <td><span class="parametername">strikethrough</span></td>
      <td><p>Pointer to  a structure containing strikethrough logical information.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">clientDrawingEffectPtr</span></td>
      <td><p>Application-defined effect to apply to the strikethrough.  Usually this argument represents effects such as the foreground brush filling the interior of a line.</p>
</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.HResult.html">HResult</a></td>
      <td><p>If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_DirectWrite_TextRenderer_DrawStrikethrough_System_Object_System_Single_System_Single_C1_Util_DX_DirectWrite_Strikethrough__System_IntPtr__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>A single strikethrough can be broken into multiple calls, depending on how the formatting changes attributes. Strikethrough is not averaged across font sizes/styles changes. To get an appropriate starting pixel position, add strikethrough::offset to the baseline. Like underlines, the x coordinate will always be passed as the left side, regardless of text directionality.</p>
</div>
</div>
