# C1.Framework.Drawing.Gdi.DeviceContexts.DeviceContext.SetClippingRegion

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Framework_Drawing_Gdi_DeviceContexts_DeviceContext_SetClippingRegion_" data-uid="C1.Framework.Drawing.Gdi.DeviceContexts.DeviceContext.SetClippingRegion*">SetClippingRegion Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Framework_Drawing_Gdi_DeviceContexts_DeviceContext_SetClippingRegion_" data-uid="C1.Framework.Drawing.Gdi.DeviceContexts.DeviceContext.SetClippingRegion*"></a>
<h4 id="C1_Framework_Drawing_Gdi_DeviceContexts_DeviceContext_SetClippingRegion_System_IntPtr_System_Drawing_Drawing2D_CombineMode_" data-uid="C1.Framework.Drawing.Gdi.DeviceContexts.DeviceContext.SetClippingRegion(System.IntPtr,System.Drawing.Drawing2D.CombineMode)">SetClippingRegion(IntPtr, CombineMode)</h4>
<div class="markdown level1 summary"><p>Combines the specified region with the current clipping region using the specified mode.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetClippingRegion(IntPtr regionHandle, CombineMode combineMode)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetClippingRegion(regionHandle As IntPtr, combineMode As CombineMode)</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.intptr">IntPtr</a></td>
      <td><span class="parametername">regionHandle</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a> that indicates handle to the region to be selected.
This handle can only be IntPtr.Zero when the CombineMode.Replace mode is specified</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.combinemode">CombineMode</a></td>
      <td><span class="parametername">combineMode</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.combinemode">CombineMode</a> that indicates the combine mode.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Framework_Drawing_Gdi_DeviceContexts_DeviceContext_SetClippingRegion_System_IntPtr_System_Drawing_Drawing2D_CombineMode__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The coordinate of region will not be effected by current origin of page space.</p>
</div>
</div>
