VegaRise.NET
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.

VegaRise.NET

Sign In

Welcome back. Please sign in to your account.

Forgot password?
or

Don't have an account? Create an account

By signing in, you agree to our Terms of Service and Privacy Policy.