Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
QuadraticToRel.cs
1using System.Threading.Tasks;
2using SkiaSharp;
3
5{
10 {
17 : base(Document, Parent)
18 {
19 }
20
24 public override string LocalName => "QuadraticToRel";
25
32 public override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
33 {
34 return new QuadraticToRel(Document, Parent);
35 }
36
42 public override Task Measure(DrawingState State, PathState PathState)
43 {
44 if (this.defined)
45 {
48 }
49
50 return Task.CompletedTask;
51 }
52
59 public override Task Draw(DrawingState State, PathState PathState, SKPath Path)
60 {
61 if (this.defined)
62 {
63 this.P0 = Path.LastPoint;
64 this.P1 = PathState.Add(this.xCoordinate, this.yCoordinate);
65 this.P2 = PathState.Add(this.xCoordinate2, this.yCoordinate2);
66 Path.QuadTo(P1, P2);
67 }
68
69 return Task.CompletedTask;
70 }
71 }
72}
Contains a 2D layout document.
SKPoint Add(float DeltaX, float DeltaY)
Sets a new coordinate
Definition: PathState.cs:185
Draws a quadratic curve to a point, relative to the origio of the current container
Definition: QuadraticTo.cs:10
Draws a quadratic curve to a point, relative to the end of the last segment
QuadraticToRel(Layout2DDocument Document, ILayoutElement Parent)
Draws a quadratic curve to a point, relative to the end of the last segment
override string LocalName
Local name of type of element.
override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
Creates a new instance of the layout element.
override Task Draw(DrawingState State, PathState PathState, SKPath Path)
Draws layout entities.
override Task Measure(DrawingState State, PathState PathState)
Measures layout entities and defines unassigned properties.
bool defined
If element is well-defined.
float yCoordinate2
Measured Y-coordinate
Definition: Point2.cs:122
float xCoordinate2
Measured X-coordinate
Definition: Point2.cs:117
float yCoordinate
Measured Y-coordinate
Definition: Point.cs:122
float xCoordinate
Measured X-coordinate
Definition: Point.cs:117
Base interface for all layout elements.