[]
        
(Showing Draft Content)

GrapeCity.Documents.Drawing.GcGraphics.PushClip

PushClip Method

PushClip(RectangleF, RectangleF)

Specifies a rectangle to which all subsequent drawing operations are clipped. Clipping is applied only if containerRect does not contain clipRect.

The GcGraphics.Clip object returned by this method implements IDisposable, so this method can be used with the 'using' pattern:

using (g.PushClip(...)) ...

in which case the clipping region will be removed when the returned object is disposed.

Declaration
public GcGraphics.Clip PushClip(RectangleF clipRect, RectangleF containerRect)
Parameters
Type Name Description
RectangleF clipRect

The clipping rectangle.

RectangleF containerRect

The container rectangle.

Returns
Type Description
GcGraphics.Clip

The GcGraphics.Clip object that removes the clipping when disposed.

PushClip(RectangleF?)

Specifies a rectangle to which all subsequent drawing operations are clipped.

The GcGraphics.Clip object returned by this method implements IDisposable, so this method can be used with the 'using' pattern:

using (g.PushClip(...)) ...

in which case the clipping region will be removed when the returned object is disposed.

Declaration
public GcGraphics.Clip PushClip(RectangleF? clipRect)
Parameters
Type Name Description
RectangleF? clipRect

The clipping rectangle. If this parameter is null, this method does nothing and returns null.

Returns
Type Description
GcGraphics.Clip

The GcGraphics.Clip object that removes the clipping when disposed, or null.

PushClip(RectangleF)

Specifies a rectangle to which all subsequent drawing operations are clipped.

The GcGraphics.Clip object returned by this method implements IDisposable, so this method can be used with the 'using' pattern:

using (g.PushClip(...)) ...

in which case the clipping region will be removed when the returned object is disposed.

Declaration
public GcGraphics.Clip PushClip(RectangleF clipRect)
Parameters
Type Name Description
RectangleF clipRect

The clipping rectangle.

Returns
Type Description
GcGraphics.Clip

The GcGraphics.Clip object that removes the clipping when disposed.

PushClip(IPath)

Specifies a path to which all subsequent drawing operations are clipped.

The GcGraphics.Clip object returned by this method implements IDisposable, so this method can be used with the 'using' pattern:

using (g.PushClip(...)) ...

in which case the clipping region will be removed when the returned object is disposed.

Declaration
public GcGraphics.Clip PushClip(IPath clipPath)
Parameters
Type Name Description
IPath clipPath

The IPath object defining clipping area.

Returns
Type Description
GcGraphics.Clip

The GcGraphics.Clip object that removes the clipping when disposed.

PushClip(IClipRegion)

Specifies a clipping region to which all subsequent drawing operations are clipped.

Declaration
public void PushClip(IClipRegion clipRegion)
Parameters
Type Name Description
IClipRegion clipRegion

The clipping region.