<<

Contents

Search

>>

 

DRAWRECT

 

 

Function

 

 

Syntax:

DRAWRECT(<Row>, <Column>, <Height in Rows>, <Width in Columns>, <Width>, <Red>, <Green>, <Blue> [,<Handle> [,<Fillcolor Red>, <Fillcolor Green>, <Fillcolor Blue>]])

 

<Row>

= <NUM-EXPRESSION>

<Column>

= <NUM-EXPRESSION>

<Height in Rows>

= <NUM-EXPRESSION>

<Width in Columns>

= <NUM-EXPRESSION>

<Width>

= <NUM-EXPRESSION>

<Red>

= <NUM-EXPRESSION>

<Green>

= <NUM-EXPRESSION>

<Blue>

= <NUM-EXPRESSION>

<Handle>

= <NUM-EXPRESSION>

<Fillcolor Red>

= <NUM-EXPRESSION>

<Fillcolor Green>

= <NUM-EXPRESSION>

<Fillcolor Blue>

= <NUM-EXPRESSION>

 

 

Meaning:

Draws a rectangle on screen in the color <Red>,<Green>,<Blue>.

 

If <Fillcolor Red> >= 0 and <Fillcolor Green> >= 0 and <Fillcolor Blue> >= 0, the background of the rectangle is filled with that color.

 

If <Red> < 0 or <Green> < 0 or <Blue> < 0, a rectangle previously drawn at the same position and of the same length and width is deleted again.

 

<Handle> specifies the window in which the rectangle is to be drawn. <Handle> can contain the window depth or the handle of a split window or a WINDOWCALL window. If the parameter <Handle> is missing, the rectangle is drawn on the current mask.

 

DRAWRECT returns the value –1, if a non-existent rectangle is to be deleted, otherwise it always returns 1.

 

Attention: In Html programs 1 is returned when NOREPAINT is active.

 

Parameter:

Row

Row of upper left corner of the rectangle

Column

Column of upper left corner of the rectangle

Height in Rows

Height of rectangle in rows

Width in Columns

Width of rectangle in columns

Width

Width of the border in pixel

Red

Red value

Green

Green value

Blue

Blue value

Handle

Window depth or handle of a split window or handle of a WINDOWCALL Window

Fillcolor Red

Fillcolor Red value

Fillcolor Green

Fillcolor Green value

Fillcolor Blue

Fillcolor Blue value

 

Sample:

/* Draw a red rectangle on position (5.5,10.25) with size (10,20) and

/* width = 3 pixel

H% = DRAWRECT(5.5,10.25,10,20,3,255,0,0)

...

/* Delete the rectangle

H% = DRAWRECT (5.5,10.25,10,20,3,-1,-1,-1)

 

See also:

MOVERECT

LPDRAWRECT

DRAWLINE

CIRCLE

POLYGON

FILLRECT