Draws a line connecting the two points specified by the coordinate pairs.
Namespace:
Aurigma.GraphicsMill.AdvancedDrawing
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
public void DrawLine( Pen pen, float x1, float y1, float x2, float y2 )
Type: Aurigma.GraphicsMill.AdvancedDrawing.Pen
A Pen that determines the color, width, and style of the line.Type: System.Single
The x-coordinate of the first point.Type: System.Single
The y-coordinate of the first point.Type: System.Single
The x-coordinate of the second point.Type: System.Single
The y-coordinate of the second point.In this method line is defined with two points which should be connected with this line.
using (var bitmap = new Bitmap(160, 120, PixelFormat.Format24bppRgb, RgbColor.White)) using (var graphics = bitmap.GetAdvancedGraphics()) { graphics.DrawLine(new Pen(RgbColor.Red), 10, 10, 150, 110); bitmap.Save(@"Images\Output\out.png"); }