Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SplineToRel.cs
1using System.Threading.Tasks;
2using SkiaSharp;
3
5{
9 public class SplineToRel : SplineTo
10 {
17 : base(Document, Parent)
18 {
19 }
20
24 public override string LocalName => "SplineToRel";
25
32 public override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
33 {
34 return new SplineToRel(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 this.splineCurve = PathState.AddSplineVertex(this.xCoordinate, this.yCoordinate);
60
61 return Task.CompletedTask;
62 }
63 }
64}
Contains a 2D layout document.
PathSpline AddSplineVertex(float DeltaX, float DeltaY)
Sets a new spline vertex, relative to the last coordinate
Definition: PathState.cs:344
Draws a spline to a point, relative to the origio of the current container
Definition: SplineTo.cs:10
Draws a spline to a point, relative to the end of the last segment
Definition: SplineToRel.cs:10
override string LocalName
Local name of type of element.
Definition: SplineToRel.cs:24
override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
Creates a new instance of the layout element.
Definition: SplineToRel.cs:32
override Task Measure(DrawingState State, PathState PathState)
Measures layout entities and defines unassigned properties.
Definition: SplineToRel.cs:42
SplineToRel(Layout2DDocument Document, ILayoutElement Parent)
Draws a spline to a point, relative to the end of the last segment
Definition: SplineToRel.cs:16
override Task Draw(DrawingState State, PathState PathState, SKPath Path)
Draws layout entities.
Definition: SplineToRel.cs:56
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.