20 public void DrawGraph(SKCanvas Canvas, SKPoint[] Points,
object[] Parameters, SKPoint[] PrevPoints,
object[] PrevParameters,
28 Pen =
Graph.
ToPen(Parameters[0], Parameters[1]);
31 Canvas.DrawPath(Path, Pen);
56 public static SKPath
CreateSpline(SKPath AppendTo, params SKPoint[] Points)
58 int i, c = Points.Length;
60 throw new ArgumentException(
"No points provided.", nameof(Points));
64 AppendTo =
new SKPath();
65 AppendTo.MoveTo(Points[0]);
68 AppendTo.LineTo(Points[0]);
75 AppendTo.LineTo(Points[1]);
79 double[] V =
new double[c];
81 for (i = 0; i < c; i++)
86 for (i = 0; i < c; i++)
91 for (i = 0; i < c - 1; i++)
93 AppendTo.CubicTo((
float)Ax[i], (
float)Ay[i], (
float)Bx[i], (
float)By[i],
94 Points[i + 1].X, Points[i + 1].Y);
133 int N = V.Length - 1;
137 double r11, r12, r15;
138 double r22, r23, r25;
139 double r32, r33, r34, r35;
140 double[,] Rows =
new double[N2, 3];
259 Rows[i, 2] -= a * Rows[i + 1, 2];
270 Rows[i, 2] -= a * Rows[i + 1, 2];
Contains information about the current drawing area.
Plots a two-dimensional curve.
static SKPath CreateSpline(params SKPoint[] Points)
Creates a Spline path through a given set of points.
static SKPath CreateSpline(SKPath AppendTo, params SKPoint[] Points)
Creates a Spline path through a given set of points.
static void GetCubicBezierCoefficients(double[] V, out double[] A, out double[] B)
Gets a set of coefficients for cubic Bezier curves, forming a spline, one coordinate at a time.
void DrawGraph(SKCanvas Canvas, SKPoint[] Points, object[] Parameters, SKPoint[] PrevPoints, object[] PrevParameters, DrawingArea DrawingArea)
Draws the graph on a canvas.
Painters for single-color graphs
static SKPaint ToPen(object Object, object Size)
Converts an object to a pen value.
Interface for 2D graph drawing functions.