DrawLineAa(BitmapContext,Int32,Int32,Int32,Int32,Int32,Int32,Int32,Boolean) Method
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 The context containing the pixels as int RGBA value.The width of one scanline in the pixels array.The height of the bitmap.The x-coordinate of the start point.The y-coordinate of the start point.The x-coordinate of the end point.The y-coordinate of the end point.The color for the line.
Syntax
public static void DrawLineAa( BitmapContext context, int pixelWidth, int pixelHeight, int x1, int y1, int x2, int y2, int color, bool skipFirstPixel )
Parameters
- context
- The context containing the pixels as int RGBA value.The context.
- pixelWidth
- The width of one scanline in the pixels array.Width of the pixel.
- pixelHeight
- The height of the bitmap.Height of the pixel.
- x1
- The x-coordinate of the start point.The x1.
- y1
- The y-coordinate of the start point.The y1.
- x2
- The x-coordinate of the end point.The x2.
- y2
- The y-coordinate of the end point.The y2.
- color
- The color for the line.The color.
- skipFirstPixel
- if set to
true
skip first pixel.
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also