2using System.Threading.Tasks;
19 : base(Document, Parent)
36 return new Loop(Document, Parent);
57 int c = Points.Length;
59 SKPoint[] P =
new SKPoint[c];
61 for (i = 0; i < c; i++)
62 P[i] =
new SKPoint(Points[i].XCoordinate, Points[i].YCoordinate);
83 public static SKPath
CreateLoop(SKPath AppendTo, params SKPoint[] Points)
85 int i, c = Points.Length;
87 throw new ArgumentException(
"No points provided.", nameof(Points));
91 AppendTo =
new SKPath();
92 AppendTo.MoveTo(Points[0]);
96 SKPoint P = AppendTo.LastPoint;
98 if (P.X != Points[0].X || P.Y != Points[0].Y)
99 AppendTo.LineTo(Points[0]);
105 float[] V =
new float[c];
107 for (i = 0; i < c; i++)
112 for (i = 0; i < c; i++)
117 for (i = 0; i < c - 1; i++)
118 AppendTo.CubicTo(Ax[i], Ay[i], Bx[i], By[i], Points[i + 1].X, Points[i + 1].Y);
120 AppendTo.CubicTo(Ax[i], Ay[i], Bx[i], By[i], Points[0].X, Points[0].Y);
176 float[] Row1 =
new float[N2 + 1];
177 float[] Row2 =
new float[N2 + 1];
192 for (i = 1, j = 0; i < N; i++)
198 Row1[j + 1] += (b = 2 * a);
207 Row2[j + 1] += (b = 2 * a);
219 Row1[N2] -= a * 2 * V[i];
227 Row2[N2] -= a * 2 * V[i];
236 if (Row1[N2 - 2] == 0)
243 a = 1 / Row1[N2 - 2];
252 Row2[N2 - 1] -= Row1[N2 - 1] * a;
253 Row2[N2] -= Row1[N2] * a;
256 a = 1 / Row2[N2 - 1];
267 Row1[N2] -= Row2[N2] * a;
275 B[j] = 2 * V[i--] - A[j + 1];
276 A[j] = 2 * B[j] - 2 * A[j + 1] + B[j + 1];
294 SKPaint Pen = await this.
TryGetPen(State);
300 await base.Draw(State);
Contains a 2D layout document.
SKCanvas Canvas
Current drawing canvas.
bool defined
If element is well-defined.
Defines a vertex in the graf
Base interface for all layout elements.