Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
EllipseArcToRel.cs
1using System.Threading.Tasks;
2using SkiaSharp;
3
5{
10 {
17 : base(Document, Parent)
18 {
19 }
20
24 public override string LocalName => "EllipseArcToRel";
25
32 public override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
33 {
34 return new EllipseArcToRel(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 {
60 SKPoint P = PathState.Add(this.xCoordinate, this.yCoordinate);
61 Path.ArcTo(this.rX, this.rY, 0, SKPathArcSize.Small,
62 this.clockDir ? SKPathDirection.Clockwise : SKPathDirection.CounterClockwise,
63 P.X, P.Y);
64 }
65
66 return Task.CompletedTask;
67 }
68
69 // TODO: IDirectedElement
70 }
71}
Contains a 2D layout document.
Draws a ellipse arc to a point, relative to the origio of the current container
Definition: EllipseArcTo.cs:12
Draws a ellipse arc to a point, relative to the end of the last segment
EllipseArcToRel(Layout2DDocument Document, ILayoutElement Parent)
Draws a ellipse arc to a point, relative to the end of the last segment
override Task Draw(DrawingState State, PathState PathState, SKPath Path)
Draws layout entities.
override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
Creates a new instance of the layout element.
override Task Measure(DrawingState State, PathState PathState)
Measures layout entities and defines unassigned properties.
override string LocalName
Local name of type of element.
SKPoint Add(float DeltaX, float DeltaY)
Sets a new coordinate
Definition: PathState.cs:185
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.