# C1.Util.DX.Direct2D.D2D1.ComputeFlatteningTolerance

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct2D_D2D1_ComputeFlatteningTolerance_" data-uid="C1.Util.DX.Direct2D.D2D1.ComputeFlatteningTolerance*">ComputeFlatteningTolerance Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct2D_D2D1_ComputeFlatteningTolerance_" data-uid="C1.Util.DX.Direct2D.D2D1.ComputeFlatteningTolerance*"></a>
<h4 id="C1_Util_DX_Direct2D_D2D1_ComputeFlatteningTolerance_C1_Util_DX_Matrix3x2__System_Single_System_Single_System_Single_" data-uid="C1.Util.DX.Direct2D.D2D1.ComputeFlatteningTolerance(C1.Util.DX.Matrix3x2@,System.Single,System.Single,System.Single)">ComputeFlatteningTolerance(ref Matrix3x2, float, float, float)</h4>
<div class="markdown level1 summary"><p>Computes the appropriate flattening tolerance to pass to APIs that take a flattening tolerance (for instance, DeviceContext.CreateFilledGeometryRealization).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static float ComputeFlatteningTolerance(ref Matrix3x2 matrix, float dpiX = 96, float dpiY = 96, float maxZoomFactor = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function ComputeFlatteningTolerance(ByRef matrix As Matrix3x2, Optional dpiX As Single = 96, Optional dpiY As Single = 96, Optional maxZoomFactor As Single = 1) 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="C1.Util.DX.Matrix3x2.html">Matrix3x2</a></td>
      <td><span class="parametername">matrix</span></td>
      <td><p>The matrix that will be applied subsequently to the geometry being flattened.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">dpiX</span></td>
      <td><p>The horizontal DPI of the render target that the geometry will be rendered onto (a choice of 96 implies no DPI correction).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">dpiY</span></td>
      <td><p>The vertical DPI of the render target that the geometry will be rendered onto (a choice of 96 implies no DPI correction).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">maxZoomFactor</span></td>
      <td><p>The maximum amount of additional scaling (on top of any scaling implied by the matrix or the DPI) that will be applied to the geometry.</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="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><p>The flattening tolerance.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
