Function GraBox() Foundation
Draws rectangle.
GraBox( [<oPS>], [<aLeftBottom>], <aRightTop>, ;
[<nFill>], [<nHRadius>], [<nVRadius>] ) --> lSuccess
Constant | Description |
---|---|
GRA_FILL | Fills rectangle |
GRA_OUTLINE *) | Only draws rectangle border |
GRA_OUTLINEFILL | Draws rectangle border and fills |
|
The return value of GraBox() is .T. (true) if the rectangle was drawn, otherwise it is .F. (false). If the return value equals .F., the cause of error can be determined using GraError().
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.
// The example draws three rectangles which
// demonstrate different variations of GraBox().
#include "Gra.ch"
PROCEDURE Main
LOCAL aAttr
SetColor("N/W") // fill window with pale gray
CLS
aAttr := Array( GRA_AA_COUNT ) // determine fill attributes
aAttr [ GRA_AA_SYMBOL ] := GRA_SYM_DIAG2
GraSetAttrArea( NIL, aAttr )
graBox( NIL, { 70,230}, {200,350} ) // outlined rectangle
graBox( NIL, {300,230}, {550,350}, ; // filled rectangle
GRA_FILL )
graBox( NIL, {150, 70}, {460,200}, ; // rectangle outlined,
GRA_OUTLINEFILL, 20, 20 ) // filled and rounded
Inkey(0)
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.