# GrapeCity.Documents.Drawing.GcGraphics.PushClip

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Drawing_GcGraphics_PushClip_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.PushClip*">PushClip Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Drawing_GcGraphics_PushClip_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.PushClip*"></a>
<h4 id="GrapeCity_Documents_Drawing_GcGraphics_PushClip_System_Drawing_RectangleF_System_Drawing_RectangleF_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.PushClip(System.Drawing.RectangleF,System.Drawing.RectangleF)">PushClip(RectangleF, RectangleF)</h4>
<div class="markdown level1 summary"><p>Specifies a rectangle to which all subsequent drawing operations are clipped.
Clipping is applied only if <code class="paramref">containerRect</code> does not contain <code class="paramref">clipRect</code>.</p>
<p>
The <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">GcGraphics.Clip</a> object returned by this method implements IDisposable,
so this method can be used with the 'using' pattern:
</p>
<pre><code class="lang-csharp">using (g.PushClip(...)) ...</code></pre>
<p>in which case the clipping region will be removed when the returned object is disposed.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public GcGraphics.Clip PushClip(RectangleF clipRect, RectangleF containerRect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function PushClip(clipRect As RectangleF, containerRect As RectangleF) As GcGraphics.Clip</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.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">clipRect</span></td>
      <td><p>The clipping rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">containerRect</span></td>
      <td><p>The container rectangle.</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="GrapeCity.Documents.Drawing.GcGraphics.html">GcGraphics</a>.<a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">Clip</a></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">GcGraphics.Clip</a> object that removes the clipping when disposed.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_GcGraphics_PushClip_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.PushClip*"></a>
<h4 id="GrapeCity_Documents_Drawing_GcGraphics_PushClip_System_Nullable_System_Drawing_RectangleF__" data-uid="GrapeCity.Documents.Drawing.GcGraphics.PushClip(System.Nullable{System.Drawing.RectangleF})">PushClip(RectangleF?)</h4>
<div class="markdown level1 summary"><p>Specifies a rectangle to which all subsequent drawing operations are clipped.</p>
<p>
The <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">GcGraphics.Clip</a> object returned by this method implements IDisposable,
so this method can be used with the 'using' pattern:
</p>
<pre><code class="lang-csharp">using (g.PushClip(...)) ...</code></pre>
<p>in which case the clipping region will be removed when the returned object is disposed.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public GcGraphics.Clip PushClip(RectangleF? clipRect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function PushClip(clipRect As RectangleF?) As GcGraphics.Clip</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.drawing.rectanglef">RectangleF</a>?</td>
      <td><span class="parametername">clipRect</span></td>
      <td><p>The clipping rectangle. If this parameter is null, this method does nothing and returns null.</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="GrapeCity.Documents.Drawing.GcGraphics.html">GcGraphics</a>.<a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">Clip</a></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">GcGraphics.Clip</a> object that removes the clipping when disposed, or null.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_GcGraphics_PushClip_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.PushClip*"></a>
<h4 id="GrapeCity_Documents_Drawing_GcGraphics_PushClip_System_Drawing_RectangleF_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.PushClip(System.Drawing.RectangleF)">PushClip(RectangleF)</h4>
<div class="markdown level1 summary"><p>Specifies a rectangle to which all subsequent drawing operations are clipped.</p>
<p>
The <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">GcGraphics.Clip</a> object returned by this method implements IDisposable,
so this method can be used with the 'using' pattern:
</p>
<pre><code class="lang-csharp">using (g.PushClip(...)) ...</code></pre>
<p>in which case the clipping region will be removed when the returned object is disposed.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public GcGraphics.Clip PushClip(RectangleF clipRect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function PushClip(clipRect As RectangleF) As GcGraphics.Clip</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.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">clipRect</span></td>
      <td><p>The clipping rectangle.</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="GrapeCity.Documents.Drawing.GcGraphics.html">GcGraphics</a>.<a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">Clip</a></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">GcGraphics.Clip</a> object that removes the clipping when disposed.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_GcGraphics_PushClip_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.PushClip*"></a>
<h4 id="GrapeCity_Documents_Drawing_GcGraphics_PushClip_GrapeCity_Documents_Drawing_IPath_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.PushClip(GrapeCity.Documents.Drawing.IPath)">PushClip(IPath)</h4>
<div class="markdown level1 summary"><p>Specifies a path to which all subsequent drawing operations are clipped.</p>
<p>
The <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">GcGraphics.Clip</a> object returned by this method implements IDisposable,
so this method can be used with the 'using' pattern:
</p>
<pre><code class="lang-csharp">using (g.PushClip(...)) ...</code></pre>
<p>in which case the clipping region will be removed when the returned object is disposed.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public GcGraphics.Clip PushClip(IPath clipPath)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function PushClip(clipPath As IPath) As GcGraphics.Clip</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="GrapeCity.Documents.Drawing.IPath.html">IPath</a></td>
      <td><span class="parametername">clipPath</span></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Drawing.IPath.html">IPath</a> object defining clipping area.</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="GrapeCity.Documents.Drawing.GcGraphics.html">GcGraphics</a>.<a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">Clip</a></td>
      <td><p>The <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.Clip.html">GcGraphics.Clip</a> object that removes the clipping when disposed.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_GcGraphics_PushClip_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.PushClip*"></a>
<h4 id="GrapeCity_Documents_Drawing_GcGraphics_PushClip_GrapeCity_Documents_Drawing_IClipRegion_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.PushClip(GrapeCity.Documents.Drawing.IClipRegion)">PushClip(IClipRegion)</h4>
<div class="markdown level1 summary"><p>Specifies a clipping region to which all subsequent drawing operations are clipped.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void PushClip(IClipRegion clipRegion)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub PushClip(clipRegion As IClipRegion)</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="GrapeCity.Documents.Drawing.IClipRegion.html">IClipRegion</a></td>
      <td><span class="parametername">clipRegion</span></td>
      <td><p>The clipping region.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
