# OfficePathCommand

Dependency-free path command used by shared drawing descriptors. Coordinates are expressed in the path's local top-left coordinate space.

Struct 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficePathCommand.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L28)

**Base**

`ValueType`

**Implements**

`IEquatable<OfficePathCommand>`

**Modifiers**

sealed

Dependency-free path command used by shared drawing descriptors. Coordinates are expressed in the path's local top-left coordinate space.

## Inheritance

- ValueType
- OfficePathCommand

## Usage

Explore 17 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 7

- Property [OfficeClipPath.Commands](/api/core/officeimo-drawing-officeclippath/#property-commands)
- Method [OfficePathCommand.Close](/api/core/officeimo-drawing-officepathcommand/#method-close)
- Method [OfficePathCommand.CubicBezierTo](/api/core/officeimo-drawing-officepathcommand/#method-cubicbezierto-double-double-double-double-double-double)
- Method [OfficePathCommand.LineTo](/api/core/officeimo-drawing-officepathcommand/#method-lineto-double-double)
- Method [OfficePathCommand.MoveTo](/api/core/officeimo-drawing-officepathcommand/#method-moveto-double-double)
- Method [OfficePathCommand.QuadraticBezierTo](/api/core/officeimo-drawing-officepathcommand/#method-quadraticbezierto-double-double-double-double)
- Property [OfficeShape.PathCommands](/api/core/officeimo-drawing-officeshape/#property-pathcommands)

### Accepted by parameters 10

- Method [OfficeClipPath.Path](/api/core/officeimo-drawing-officeclippath/#method-path-officeimo-drawing-officepathcommand) parameter `commands`
- Method [OfficePathCommand.Equals](/api/core/officeimo-drawing-officepathcommand/#method-equals-officeimo-drawing-officepathcommand) parameter `other`
- Method [OfficePathCommand.op_Equality](/api/core/officeimo-drawing-officepathcommand/#method-op-equality-officeimo-drawing-officepathcommand-officeimo-drawing-officepathcommand) parameter `left`
- Method [OfficePathCommand.op_Equality](/api/core/officeimo-drawing-officepathcommand/#method-op-equality-officeimo-drawing-officepathcommand-officeimo-drawing-officepathcommand) parameter `right`
- Method [OfficePathCommand.op_Inequality](/api/core/officeimo-drawing-officepathcommand/#method-op-inequality-officeimo-drawing-officepathcommand-officeimo-drawing-officepathcommand) parameter `left`
- Method [OfficePathCommand.op_Inequality](/api/core/officeimo-drawing-officepathcommand/#method-op-inequality-officeimo-drawing-officepathcommand-officeimo-drawing-officepathcommand) parameter `right`
- Method [OfficeShape.Path](/api/core/officeimo-drawing-officeshape/#method-path-officeimo-drawing-officepathcommand) parameter `commands`
- Method [OfficeSvgFormatting.AppendPathData](/api/core/officeimo-drawing-officesvgformatting/#method-appendpathdata-text-stringbuilder-collections-generic-ireadonlylist-officeimo-drawing-officepathcommand-double-double) parameter `commands`
- Method [OfficeSvgFormatting.AppendPathElement](/api/core/officeimo-drawing-officesvgformatting/#method-appendpathelement-text-stringbuilder-collections-generic-ireadonlylist-officeimo-drawing-officepathcommand-double-double-string) parameter `commands`
- Method [OfficeSvgFormatting.FormatPathData](/api/core/officeimo-drawing-officesvgformatting/#method-formatpathdata-collections-generic-ireadonlylist-officeimo-drawing-officepathcommand-double-double) parameter `commands`

Filter members 

Show inherited

## Methods

`public static OfficePathCommand Close()` [#](#method-close)

[OfficePathCommand.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L56)

Creates a close command.

Returns

`OfficePathCommand`

CubicBezierTo 2 overloads

`public static OfficePathCommand CubicBezierTo(double control1X, double control1Y, double control2X, double control2Y, double endX, double endY)` [#](#method-cubicbezierto-double-double-double-double-double-double)

[OfficePathCommand.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L49)

Creates a cubic Bezier curve command.

Parameters

**control1X double required**

**control1Y double required**

**control2X double required**

**control2Y double required**

**endX double required**

**endY double required**

Returns

`OfficePathCommand`

`public static OfficePathCommand CubicBezierTo(OfficePoint controlPoint1, OfficePoint controlPoint2, OfficePoint endPoint)` [#](#method-cubicbezierto-officeimo-drawing-officepoint-officeimo-drawing-officepoint-officeimo-drawing-officepoint)

[OfficePathCommand.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L53)

Creates a cubic Bezier curve command.

Parameters

**controlPoint1 OfficeIMO.Drawing.OfficePoint required**

**controlPoint2 OfficeIMO.Drawing.OfficePoint required**

**endPoint OfficeIMO.Drawing.OfficePoint required**

Returns

`OfficePathCommand`

Equals 2 overloads

`public bool Equals(OfficePathCommand other)` [#](#method-equals-officeimo-drawing-officepathcommand)

[OfficePathCommand.cs:104](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L104)

Indicates whether the current object is equal to another object of the same type.

Parameters

**other OfficeIMO.Drawing.OfficePathCommand required**

An object to compare with this object.

Returns

`bool` true if the current object is equal to the other parameter; otherwise, false.

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

[OfficePathCommand.cs:110](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L110)

Indicates whether this instance and a specified object are equal.

Parameters

**obj object? required**

The object to compare with the current instance.

Returns

`bool` true if obj and this instance are the same type and represent the same value; otherwise, false.

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

[OfficePathCommand.cs:115](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L115)

Returns the hash code for this instance.

Returns

`int` A 32-bit signed integer that is the hash code for this instance.

LineTo 2 overloads

`public static OfficePathCommand LineTo(double x, double y)` [#](#method-lineto-double-double)

[OfficePathCommand.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L34)

Creates a line command.

Parameters

**x double required**

**y double required**

Returns

`OfficePathCommand`

`public static OfficePathCommand LineTo(OfficePoint point)` [#](#method-lineto-officeimo-drawing-officepoint)

[OfficePathCommand.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L37)

Creates a line command.

Parameters

**point OfficeIMO.Drawing.OfficePoint required**

Returns

`OfficePathCommand`

MoveTo 2 overloads

`public static OfficePathCommand MoveTo(double x, double y)` [#](#method-moveto-double-double)

[OfficePathCommand.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L28)

Creates a move command.

Parameters

**x double required**

**y double required**

Returns

`OfficePathCommand`

`public static OfficePathCommand MoveTo(OfficePoint point)` [#](#method-moveto-officeimo-drawing-officepoint)

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

Creates a move command.

Parameters

**point OfficeIMO.Drawing.OfficePoint required**

Returns

`OfficePathCommand`

`public static bool op_Equality(OfficePathCommand left, OfficePathCommand right)` [#](#method-op-equality-officeimo-drawing-officepathcommand-officeimo-drawing-officepathcommand)

[OfficePathCommand.cs:124](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L124)

Compares two path commands for equality.

Parameters

**left OfficeIMO.Drawing.OfficePathCommand required**

**right OfficeIMO.Drawing.OfficePathCommand required**

Returns

`bool`

`public static bool op_Inequality(OfficePathCommand left, OfficePathCommand right)` [#](#method-op-inequality-officeimo-drawing-officepathcommand-officeimo-drawing-officepathcommand)

[OfficePathCommand.cs:127](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L127)

Compares two path commands for inequality.

Parameters

**left OfficeIMO.Drawing.OfficePathCommand required**

**right OfficeIMO.Drawing.OfficePathCommand required**

Returns

`bool`

QuadraticBezierTo 2 overloads

`public static OfficePathCommand QuadraticBezierTo(double controlX, double controlY, double endX, double endY)` [#](#method-quadraticbezierto-double-double-double-double)

[OfficePathCommand.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L41)

Creates a quadratic Bezier curve command.

Parameters

**controlX double required**

**controlY double required**

**endX double required**

**endY double required**

Returns

`OfficePathCommand`

`public static OfficePathCommand QuadraticBezierTo(OfficePoint controlPoint, OfficePoint endPoint)` [#](#method-quadraticbezierto-officeimo-drawing-officepoint-officeimo-drawing-officepoint)

[OfficePathCommand.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L45)

Creates a quadratic Bezier curve command.

Parameters

**controlPoint OfficeIMO.Drawing.OfficePoint required**

**endPoint OfficeIMO.Drawing.OfficePoint required**

Returns

`OfficePathCommand`

## Inherited Methods

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

Inherited from object

Returns

`Type`

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

Inherited from ValueType

Returns

`string?`

## Properties

`public OfficePathCommandKind Kind { get; }` [#](#property-kind)

[OfficePathCommand.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L9)

Command type.

`public OfficePoint Point { get; }` [#](#property-point)

[OfficePathCommand.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L12)

Primary point. For Bezier commands this is the end point.

`public OfficePoint ControlPoint1 { get; }` [#](#property-controlpoint1)

[OfficePathCommand.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L15)

First Bezier control point.

`public OfficePoint ControlPoint2 { get; }` [#](#property-controlpoint2)

[OfficePathCommand.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficePathCommand.cs#L18)

Second cubic Bezier control point.

<!-- PowerForge markdown artifact sha256:5D418EB289C7C260BB3A3C1EB40A99CCEB076AF70C1D09FE3B892FF690EFE5F0 -->
