Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ConicToRel.cs
1using System.Threading.Tasks;
2using SkiaSharp;
3
5{
9 public class ConicToRel : ConicTo
10 {
17 : base(Document, Parent)
18 {
19 }
20
24 public override string LocalName => "ConicToRel";
25
32 public override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
33 {
34 return new ConicToRel(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.ConicTo(this.P1, this.P2, this.weight);
67 }
68
69 return Task.CompletedTask;
70 }
71 }
72}
Contains a 2D layout document.
Draws a conic curve to a point, relative to the origio of the current container
Definition: ConicTo.cs:10
Draws a conic curve to a point, relative to the end of the last segment
Definition: ConicToRel.cs:10
override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
Creates a new instance of the layout element.
Definition: ConicToRel.cs:32
override Task Draw(DrawingState State, PathState PathState, SKPath Path)
Draws layout entities.
Definition: ConicToRel.cs:59
override string LocalName
Local name of type of element.
Definition: ConicToRel.cs:24
override Task Measure(DrawingState State, PathState PathState)
Measures layout entities and defines unassigned properties.
Definition: ConicToRel.cs:42
ConicToRel(Layout2DDocument Document, ILayoutElement Parent)
Draws a conic curve to a point, relative to the end of the last segment
Definition: ConicToRel.cs:16
SKPoint Add(float DeltaX, float DeltaY)
Sets a new coordinate
Definition: PathState.cs:185
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.