コード例 #1
0
 /// <summary>
 /// Draws an anti-aliased line, using an optimized version of Gupta-Sproull algorithm
 /// From http://nokola.com/blog/post/2010/10/14/Anti-aliased-Lines-And-Optimizing-Code-for-Windows-Phone-7e28093First-Look.aspx
 /// <param name="bmp">The WriteableBitmap.</param>
 /// <param name="x1">The x-coordinate of the start point.</param>
 /// <param name="y1">The y-coordinate of the start point.</param>
 /// <param name="x2">The x-coordinate of the end point.</param>
 /// <param name="y2">The y-coordinate of the end point.</param>
 /// <param name="color">The color for the line.</param>
 /// </summary>
 public static void DrawLineAa(this BitmapBuffer bmp, int x1, int y1, int x2, int y2, ColorInt color, RectD?clipRect = null)
 {
     bmp.DrawLineAa(x1, y1, x2, y2, color.ToPreMultAlphaColor(), clipRect);
 }