SciChart.Drawing Assembly > System.Windows.Media.Imaging Namespace > WriteableBitmapExtensions Class > DrawLine Method : DrawLine(BitmapContext,Int32,Int32,Int32,Int32,Int32,Int32,Int32) Method
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.
DrawLine(BitmapContext,Int32,Int32,Int32,Int32,Int32,Int32,Int32) Method
Draws a colored line by connecting two points using an optimized DDA. Uses the pixels array and the width directly for best performance.
Syntax
public static void DrawLine( 
   BitmapContext context,
   int pixelWidth,
   int pixelHeight,
   int x1,
   int y1,
   int x2,
   int y2,
   int color
)

Parameters

context
The context containing the pixels as int RGBA value.
pixelWidth
The width of one scanline in the pixels array.
pixelHeight
The height of the bitmap.
x1
The x-coordinate of the start point.
y1
The y-coordinate of the start point.
x2
The x-coordinate of the end point.
y2
The y-coordinate of the end point.
color
The color for the line.
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