VegaRise.NET
HomeAPI Reference
Back to DOM

PathCommandsClass

Definition

Namespace
DOM.Elements.Graphics
Assembly
DOM.dll

Represents a single drawing command inside a vector . Path

Remarks

mirrors the SVG path command vocabulary: MoveTo, LineTo, curves, arcs, and ClosePath. The command type is stored in and the geometric point (or control point) in . PathCommands commandsType Offset A complete path is a sequence of these commands evaluated in order to produce the final geometry.

Examples

csharp
1// 1. MoveTo command
2var move = new PathCommands
3{
4 commandsType = PathCommandsType.MoveTo,
5 Offset = new BasePosition { X = 0, Y = 0 }
6};
7
csharp
1// 2. LineTo command
2var line = new PathCommands
3{
4 commandsType = PathCommandsType.LineTo,
5 Offset = new BasePosition { X = 100, Y = 0 }
6};
7
csharp
1// 3. Curveto command
2var curve = new PathCommands
3{
4 commandsType = PathCommandsType.CurveTo,
5 Offset = new BasePosition { X = 100, Y = 50 }
6};
7
csharp
1// 4. ClosePath has no Offset
2var close = new PathCommands { commandsType = PathCommandsType.ClosePath };
3

Properties

commandsTypePathCommandsType

Gets or sets the type of drawing command.

Gets or sets the target or control point for the command.