Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
CircleArcToRel.cs
1using System.Threading.Tasks;
2using SkiaSharp;
3
5{
10 {
17 : base(Document, Parent)
18 {
19 }
20
24 public override string LocalName => "CircleArcToRel";
25
32 public override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
33 {
34 return new CircleArcToRel(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.r, this.r, 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 circle arc to a point, relative to the origio of the current container
Definition: CircleArcTo.cs:12
Draws a circle arc to a point, relative to the end of the last segment
override string LocalName
Local name of type of element.
CircleArcToRel(Layout2DDocument Document, ILayoutElement Parent)
Draws a circle arc to a point, relative to the end of the last segment
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.
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.