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 FilterQuality = SKFilterQuality.High,
28 IsAntialias = true,
29 Style = SKPaintStyle.Fill,
30 Color = Color
31 };
32
33 foreach (SKPoint P in Points)
34 Canvas.DrawCircle(P.X, P.Y, Size, Brush);
35
36 Brush.Dispose();
37 }
38 }
39}
Class managing a script expression.
Definition: Expression.cs:39
static double ToDouble(object Object)
Converts an object to a double value.
Definition: Expression.cs:4824
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:79
static SKColor ToColor(object Object)
Converts an object to a color.
Definition: Graph.cs:828
Interface for 2D graph drawing functions.
Definition: IPainter2D.cs:10