Control Reference > VSDraw Control > VSDraw Methods > DrawRectangle Method (VSDraw) |
Draws a rectangle.
[form!]VSDraw.DrawRectangle X1 As Double, Y1 As Double, X2 As Double, Y2 As Double, [ Radius1 As Variant ], [ Radius2 As Variant ]
The parameters for the DrawRectangle method are described below:
Parameter |
Description |
X1, Y1 |
First corner of the rectangle. |
X2, Y2 |
Second corner of the rectangle. |
Radius1 |
Optional parameter that specifies the radius of a rounded rectangle's corner, in the horizontal direction. |
Radius2 |
Optional parameter that specifies the radius of a rounded rectangle's corner, in the vertical direction. |
All graphical objects are drawn with the current pen and filled with the current brush. Pen and brush attributes are defined with the PenColor, PenStyle, PenWidth, BrushColor, and BrushStyle properties.
If the Radius1 and Radius2 parameters are omitted, a rectangle is drawn.
All measurements are specified in scale units, defined by the ScaleWidth, ScaleHeight, ScaleLeft, and ScaleHeight properties.