Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Scatter2DPainter.cs
1using System;
2using SkiaSharp;
3
5{
10 {
20 public void DrawGraph(SKCanvas Canvas, SKPoint[] Points, object[] Parameters, SKPoint[] PrevPoints, object[] PrevParameters,
22 {
23 SKColor Color = Graph.ToColor(Parameters[0]);
24 float Size = (float)Expression.ToDouble(Parameters[1]);
25 SKPaint Brush = new SKPaint
26 {
27 IsAntialias = true,
28 Style = SKPaintStyle.Fill,
29 Color = Color
30 };
31
32 foreach (SKPoint P in Points)
33 Canvas.DrawCircle(P.X, P.Y, Size, Brush);
34
35 Brush.Dispose();
36 }
37 }
38}
Class managing a script expression.
Definition: Expression.cs:41
static double ToDouble(object Object)
Converts an object to a double value.
Definition: Expression.cs:5110
Contains information about the current drawing area.
Definition: DrawingArea.cs:12
Plots a two-dimensional scatter graph.
void DrawGraph(SKCanvas Canvas, SKPoint[] Points, object[] Parameters, SKPoint[] PrevPoints, object[] PrevParameters, DrawingArea DrawingArea)
Draws the graph on a canvas.
Base class for graphs.
Definition: Graph.cs:88
static SKColor ToColor(object Object)
Converts an object to a color.
Definition: Graph.cs:844
Interface for 2D graph drawing functions.
Definition: IPainter2D.cs:10