Document Solutions for Imaging
GrapeCity.Documents.Imaging Assembly / GrapeCity.Documents.Drawing Namespace / GcGraphics Class / DrawRectangle Method / DrawRectangle(RectangleF,Color,Single,DashStyle) Method
A System.Drawing.RectangleF structure that represents the rectangle to draw.
The color of lines used to draw the rectangle.
The width of lines used to draw the rectangle.
The style of lines used to draw the rectangle (solid by default).

In This Topic
    DrawRectangle(RectangleF,Color,Single,DashStyle) Method
    In This Topic
    Draws a rectangle using a specified line color, width and style.

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

    Syntax
    'Declaration
     
    Public Overloads Sub DrawRectangle( _
       ByVal bounds As System.Drawing.RectangleF, _
       ByVal lineColor As System.Drawing.Color, _
       ByVal lineWidth As System.Single, _
       Optional ByVal lineStyle As DashStyle _
    ) 
    public void DrawRectangle( 
       System.Drawing.RectangleF bounds,
       System.Drawing.Color lineColor,
       System.float lineWidth,
       DashStyle lineStyle
    )

    Parameters

    bounds
    A System.Drawing.RectangleF structure that represents the rectangle to draw.
    lineColor
    The color of lines used to draw the rectangle.
    lineWidth
    The width of lines used to draw the rectangle.
    lineStyle
    The style of lines used to draw the rectangle (solid by default).
    See Also