Пример #1
0
 /// <summary>
 /// Draws a series of cubic Beziér splines each defined by start, end and two control points.
 /// The ending point of the previous curve is used as starting point for the next.
 /// Therefore the initial curve needs four points and the subsequent 3 (2 control and 1 end point).
 /// </summary>
 /// <param name="bmp">The WriteableBitmap.</param>
 /// <param name="points">The points for the curve in x and y pairs, therefore the array is interpreted as (x1, y1, cx1, cy1, cx2, cy2, x2, y2, cx3, cx4 ..., xn, yn).</param>
 /// <param name="color">The color for the spline.</param>
 public static void DrawBeziers(this BitmapBuffer bmp, int[] points, ColorInt color)
 {
     bmp.DrawBeziers(points, color.ToPreMultAlphaColor());
 }