Document Solutions for PDF
GrapeCity.Documents.Imaging Assembly / GrapeCity.Documents.Drawing Namespace / GcGraphics Class / DrawLine Method / DrawLine(Single,Single,Single,Single,Color,Single,DashStyle) Method
The X coordinate of the first point.
The Y coordinate of the first point.
The X coordinate of the second point.
The Y coordinate of the second point.
The line color.
The line width.
The line style (solid by default).

In This Topic
    DrawLine(Single,Single,Single,Single,Color,Single,DashStyle) Method
    In This Topic
    Draws a line between two points, using a specified line color, width and style.

    If the value of lineStyle parameter is not DashStyle.Solid, the line is drawn with a Pen having Pen.LineCap set to PenLineCap.Square instead of PenLineCap.Flat.

    Syntax
    'Declaration
     
    Public Overloads Sub DrawLine( _
       ByVal x1 As System.Single, _
       ByVal y1 As System.Single, _
       ByVal x2 As System.Single, _
       ByVal y2 As System.Single, _
       ByVal lineColor As System.Drawing.Color, _
       ByVal lineWidth As System.Single, _
       Optional ByVal lineStyle As DashStyle _
    ) 
    public void DrawLine( 
       System.float x1,
       System.float y1,
       System.float x2,
       System.float y2,
       System.Drawing.Color lineColor,
       System.float lineWidth,
       DashStyle lineStyle
    )

    Parameters

    x1
    The X coordinate of the first point.
    y1
    The Y coordinate of the first point.
    x2
    The X coordinate of the second point.
    y2
    The Y coordinate of the second point.
    lineColor
    The line color.
    lineWidth
    The line width.
    lineStyle
    The line style (solid by default).
    See Also