---
title: "GdiGraphics..::.SetClip Method (Region, CombineMode)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_SetClip_2_dbbe237b.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# GdiGraphics.SetClip Method (Region, CombineMode)
 
Replaces current clipping region for this [GdiGraphics](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_GdiGraphics.htm.md) object with given [Region](http://msdn2.microsoft.com/en-us/3x5499zt) using specified set-theoretic operation.
 
**Namespace:** [Aurigma.GraphicsMill.Drawing](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Drawing.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Sub SetClip ( _clipRegion As Region, _combineMode As CombineMode _
)
```
 
```csharp
public void SetClip(Region clipRegion,CombineMode combineMode
)
```
 
### Parameters
 
 - clipRegion
     - Type: [System.Drawing.Region](http://msdn2.microsoft.com/en-us/3x5499zt)
 [Region](http://msdn2.microsoft.com/en-us/3x5499zt) structure specifying new clipping region.

 - combineMode
     - Type: [System.Drawing.Drawing2D.CombineMode](http://msdn2.microsoft.com/en-us/f8y80b4d)
 [CombineMode](http://msdn2.microsoft.com/en-us/f8y80b4d) value defining set-theoretic operation used to combine given rectangle with current clipping region.
 
## Remarks
  
You can also modify the clipping region later through [ExcludeClip(Region)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_ExcludeClip_1_c96bfa22.htm.md), [IntersectClip(Region)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_IntersectClip_1_c96bfa22.htm.md) and [TranslateClip(Int32, Int32)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_TranslateClip_2_22dcb54d.htm.md) methods. It also can be discarded with [ResetClip()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_Drawing_GdiGraphics_ResetClip.htm.md) property.
 
Unlike most other methods of the [GdiGraphics](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_GdiGraphics.htm.md) class, coordinates of the region are measured in pixels.
   
## See Also

### Reference

- [GdiGraphics Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Drawing_GdiGraphics.htm.md)
- [SetClip Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Drawing_GdiGraphics_SetClip.htm.md)
- [Aurigma.GraphicsMill.Drawing Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Drawing.htm.md)
