Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
MoveToRel.cs
1using System.Threading.Tasks;
2using SkiaSharp;
3
5{
9 public class MoveToRel : MoveTo
10 {
16 public MoveToRel(Layout2DDocument Document, ILayoutElement Parent)
17 : base(Document, Parent)
18 {
19 }
20
24 public override string LocalName => "MoveToRel";
25
32 public override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
33 {
34 return new MoveToRel(Document, Parent);
35 }
36
42 public override Task Measure(DrawingState State, PathState PathState)
43 {
44 if (this.defined)
46
47 return Task.CompletedTask;
48 }
49
56 public override Task Draw(DrawingState State, PathState PathState, SKPath Path)
57 {
58 if (this.defined)
59 Path.MoveTo(PathState.Add0(this.xCoordinate, this.yCoordinate));
60
61 return Task.CompletedTask;
62 }
63 }
64}
Contains a 2D layout document.
Moves to a point, relative to the origio of the current container
Definition: MoveTo.cs:10
Moves to a point, relative to the end of the last segment
Definition: MoveToRel.cs:10
override Task Measure(DrawingState State, PathState PathState)
Measures layout entities and defines unassigned properties.
Definition: MoveToRel.cs:42
override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
Creates a new instance of the layout element.
Definition: MoveToRel.cs:32
override string LocalName
Local name of type of element.
Definition: MoveToRel.cs:24
MoveToRel(Layout2DDocument Document, ILayoutElement Parent)
Moves to a point, relative to the end of the last segment
Definition: MoveToRel.cs:16
override Task Draw(DrawingState State, PathState PathState, SKPath Path)
Draws layout entities.
Definition: MoveToRel.cs:56
SKPoint Add0(float DeltaX, float DeltaY)
Sets the start coordinate of a new contour, relative to the last point.
Definition: PathState.cs:109
bool defined
If element is well-defined.
float yCoordinate
Measured Y-coordinate
Definition: Point.cs:122
float xCoordinate
Measured X-coordinate
Definition: Point.cs:117
Base interface for all layout elements.