Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Dot.cs
1using System.Threading.Tasks;
2
4{
8 public class Dot : FigurePoint
9 {
15 public Dot(Layout2DDocument Document, ILayoutElement Parent)
16 : base(Document, Parent)
17 {
18 }
19
23 public override string LocalName => "Dot";
24
31 public override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
32 {
33 return new Dot(Document, Parent);
34 }
35
40 public override async Task Draw(DrawingState State)
41 {
42 if (this.defined)
43 State.Canvas.DrawPoint(this.xCoordinate, this.yCoordinate, await this.GetPen(State));
44
45 await base.Draw(State);
46 }
47 }
48}
Contains a 2D layout document.
SKCanvas Canvas
Current drawing canvas.
override ILayoutElement Create(Layout2DDocument Document, ILayoutElement Parent)
Creates a new instance of the layout element.
Definition: Dot.cs:31
Dot(Layout2DDocument Document, ILayoutElement Parent)
A dot
Definition: Dot.cs:15
override string LocalName
Local name of type of element.
Definition: Dot.cs:23
override async Task Draw(DrawingState State)
Draws layout entities.
Definition: Dot.cs:40
async Task< SKPaint > GetPen(DrawingState State)
Gets the pen associated with the element. If not found, the default pen is returned.
Definition: Figure.cs:90
Abstract base class for figures based on a point.
Definition: FigurePoint.cs:11
bool defined
If element is well-defined.
Base interface for all layout elements.