GraBox |
· GraBox( [<aLeftBottom>], <aRightTop>, [<nFill>], [<nHRadius>], [<nVRadius>] ) => Draws a rectangle.Rectangles are drawn with the function GraBox(). By default, output is an outline, with the color and line width set by the function GraSetAttrLine(). For a filled rectangle, the fill pattern and the fill color are determined by GraSetAttrArea(). The default pattern corresponds to the #define constant GRA_SYM_SOLID.
Parameters are :
<aLeftBottom> := { <nX1>, <nY1> }
<aLeftBottom> is an array of two elements which determines the coordinates for the lower left corner of the rectangle. The first element <nX1> designates the x coordinate and the second element <nY1> the y coordinate. The unit for the coordinates depends on the coordinate system defined for the presentation space. If no presentation space is specified, the values for the coordinates are given in pixels, which is the unit for a window. The origin for the coordinates (point {0,0}) is at the lower left. If <aLeftBottom> is not specified, the lower left corner of the rectangle is the current pen position.
<aRightTop> := { <nX2>, <nY2> }
<aRightTop> is an array of two elements which contains the coordinates for the upper right corner of the rectangle.
<nFill>
The optional argument <nFill> specifies whether the rectangle is drawn as an outline or is filled. The following table shows the #define constants from the GRA.CH file to use for <nFill> :
Fill attributes for GraBox()
Constant Description
GRA_FILL Fills rectangle
GRA_OUTLINE *) Only draws rectangle border
GRA_OUTLINEFILL Draws rectangle border and fills
*) Default value
<nHRadius>
The parameters <nHRadius> and <nVRadius> determine how much to round the corners of the rectangle. Both are positive integers which, taken together, determine the distance (radius of curvature) from a corner to the middle of the rectangle. This distance provides the measure from which the corners are rounded. <nHRadius> indicates the horizontal distance. When <nHRadius> is equal to <nVRadius> , the corners are rounded by a 90ø arc.
<nVRadius>
<nVRadius> determines the vertical curvature radius for rounding the corners. For rounded corners, both parameters <nHRadius> and <nVRadius> must be greater than 0.