Exemple #1
0
 /// <summary>
 /// Draws a Cardinal spline (cubic) defined by a point collection.
 /// The cardinal spline passes through each point in the collection.
 /// </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, x2, y2, x3, y3, x4, y4, x1, x2 ..., xn, yn).</param>
 /// <param name="tension">The tension of the curve defines the shape. Usually between 0 and 1. 0 would be a straight line.</param>
 /// <param name="color">The color for the spline.</param>
 public static void DrawCurve(this BitmapBuffer bmp, int[] points, float tension, ColorInt color)
 {
     bmp.DrawCurve(points, tension, color.ToPreMultAlphaColor());
 }