# OfficeClipPath

Dependency-free clipping path descriptor in local top-left coordinates.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeClipPath.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L31)

**Modifiers**

sealed

Dependency-free clipping path descriptor in local top-left coordinates.

## Inheritance

- object
- OfficeClipPath

## Usage

Explore 14 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 8

- Method [OfficeClipPath.Clone](/api/core/officeimo-drawing-officeclippath/#method-clone)
- Method [OfficeClipPath.Empty](/api/core/officeimo-drawing-officeclippath/#method-empty)
- Method [OfficeClipPath.Path](/api/core/officeimo-drawing-officeclippath/#method-path-officeimo-drawing-officepathcommand)
- Method [OfficeClipPath.Rectangle](/api/core/officeimo-drawing-officeclippath/#method-rectangle-double-double)
- Method [OfficeClipPath.RoundedRectangle](/api/core/officeimo-drawing-officeclippath/#method-roundedrectangle-double-double-double)
- Method [OfficeClipPath.Scale](/api/core/officeimo-drawing-officeclippath/#method-scale-double-double)
- Property [OfficeDrawingGroup.ClipPath](/api/core/officeimo-drawing-officedrawinggroup/#property-clippath)
- Property [OfficeShape.ClipPath](/api/core/officeimo-drawing-officeshape/#property-clippath)

### Accepted by parameters 6

- Method [OfficeDrawing.AddClippedDrawing](/api/core/officeimo-drawing-officedrawing/#method-addclippeddrawing-officeimo-drawing-officedrawing-double-double-officeimo-drawing-officeclippath) parameter `clipPath`
- Method [OfficeDrawing.AddClippedImage](/api/core/officeimo-drawing-officedrawing/#method-addclippedimage-byte-string-officeimo-drawing-officeimageprojection-double-double-officeimo-drawing-officeclippath-string-double) parameter `clipPath`
- Method [OfficeDrawing.AddClippedImageWithInterpolation](/api/core/officeimo-drawing-officedrawing/#method-addclippedimagewithinterpolation-byte-string-officeimo-drawing-officeimageprojection-boolean-double-double-officeimo-drawing-officeclippath-string-double) parameter `clipPath`
- Method [OfficeDrawing.AddClippedPositionedText](/api/core/officeimo-drawing-officedrawing/#method-addclippedpositionedtext-string-double-double-double-double-double-double-officeimo-drawing-officeclippath-nullable-officeimo-drawing-officefontinfo-nullable-officeimo-officecolor-officeimo-drawing-officetextalignment-nullable-system-double-nullable-system-double) parameter `clipPath`
- Method [OfficeDrawing.AddClippedText](/api/core/officeimo-drawing-officedrawing/#method-addclippedtext-string-double-double-double-double-double-double-officeimo-drawing-officeclippath-nullable-officeimo-drawing-officefontinfo-nullable-officeimo-officecolor-officeimo-drawing-officetextalignment-nullable-system-double-officeimo-drawing-officetextverticalalignment-double-nullable-system-double-nullable-system-double-boolean-boolean-boolean-boolean-boolean-nullable-officeimo-drawing-officetextpadding-nullable-officeimo-drawing-officetextparagraphindent) parameter `clipPath`
- Constructor [OfficeDrawingGroup.OfficeDrawingGroup](/api/core/officeimo-drawing-officedrawinggroup/#constructor-ctor-officeimo-drawing-officedrawing-double-double-officeimo-drawing-officeclippath) parameter `clipPath`

Filter members 

Show inherited

## Methods

`public OfficeClipPath Clone()` [#](#method-clone)

[OfficeClipPath.cs:158](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L158)

Creates a detached copy of this clipping path.

Returns

`OfficeClipPath`

`public static OfficeClipPath Empty()` [#](#method-empty)

[OfficeClipPath.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L31)

Creates an empty clipping region.

Returns

`OfficeClipPath`

Path 4 overloads

`public static OfficeClipPath Path(params OfficePathCommand[] commands)` [#](#method-path-officeimo-drawing-officepathcommand)

[OfficeClipPath.cs:69](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L69)

Creates a freeform clipping path from commands in local top-left coordinates.

Parameters

**commands OfficeIMO.Drawing.OfficePathCommand[] required**

Returns

`OfficeClipPath`

`public static OfficeClipPath Path(IEnumerable<OfficePathCommand> commands)` [#](#method-path-collections-generic-ienumerable-officeimo-drawing-officepathcommand)

[OfficeClipPath.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L72)

Creates a freeform clipping path from commands in local top-left coordinates.

Parameters

**commands System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePathCommand> required**

Returns

`OfficeClipPath`

`public static OfficeClipPath Path(IEnumerable<OfficePathCommand> commands, OfficeFillRule fillRule)` [#](#method-path-collections-generic-ienumerable-officeimo-drawing-officepathcommand-officeimo-drawing-officefillrule)

[OfficeClipPath.cs:76](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L76)

Creates a freeform clipping path from commands in local top-left coordinates.

Parameters

**commands System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePathCommand> required**

**fillRule OfficeIMO.Drawing.OfficeFillRule required**

Returns

`OfficeClipPath`

`public static OfficeClipPath Path(double width, double height, IEnumerable<OfficePathCommand> commands, OfficeFillRule fillRule = EvenOdd)` [#](#method-path-double-double-collections-generic-ienumerable-officeimo-drawing-officepathcommand-officeimo-drawing-officefillrule)

[OfficeClipPath.cs:82](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L82)

Creates a clipping path while retaining its coordinates within a declared local canvas.

Parameters

**width double required**

**height double required**

**commands System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePathCommand> required**

**fillRule OfficeIMO.Drawing.OfficeFillRule = EvenOdd optional**

Returns

`OfficeClipPath`

`public static OfficeClipPath Rectangle(double width, double height)` [#](#method-rectangle-double-double)

[OfficeClipPath.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L39)

Creates a rectangular clipping path from the shape's local top-left corner.

Parameters

**width double required**

**height double required**

Returns

`OfficeClipPath`

`public static OfficeClipPath RoundedRectangle(double width, double height, double cornerRadius)` [#](#method-roundedrectangle-double-double-double)

[OfficeClipPath.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L51)

Creates a rounded rectangular clipping path from the shape's local top-left corner.

Parameters

**width double required**

**height double required**

**cornerRadius double required**

Returns

`OfficeClipPath`

`public OfficeClipPath Scale(double scaleX, double scaleY)` [#](#method-scale-double-double)

[OfficeClipPath.cs:174](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L174)

Creates a scaled detached copy of this clipping path.

Parameters

**scaleX double required**

Horizontal scale factor.

**scaleY double required**

Vertical scale factor.

Returns

`OfficeClipPath` A new clipping path scaled in local coordinates.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public OfficeClipPathKind Kind { get; private set; }` [#](#property-kind)

[OfficeClipPath.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L10)

Clip path type.

`public double Width { get; private set; }` [#](#property-width)

[OfficeClipPath.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L13)

Clip path width in the caller's layout unit.

`public double Height { get; private set; }` [#](#property-height)

[OfficeClipPath.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L16)

Clip path height in the caller's layout unit.

`public double CornerRadius { get; private set; }` [#](#property-cornerradius)

[OfficeClipPath.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L19)

Corner radius for rounded rectangle clipping paths.

`public IReadOnlyList<OfficePathCommand> Commands { get; private set; }` [#](#property-commands)

[OfficeClipPath.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L22)

Local commands for freeform clipping paths.

`public OfficeFillRule FillRule { get; private set; }` [#](#property-fillrule)

[OfficeClipPath.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeClipPath.cs#L25)

Fill rule used when the clipping path contains multiple contours.

<!-- PowerForge markdown artifact sha256:9AA7CB2089D802490351DF0191D529F7FC7C6957B8AED457B548D3C3CFFEC469 -->
