<<

Contents

Search

>>

 

DRAWLINE

 

 

Function

 

 

Syntax:

DRAWLINE(<From Y-position>, <From X-position>, <To Y-position>, <To X-position>, <Width>, <Red>, <Green>, <Blue> [,<Handle>])

 

<From Y-position>

= <NUM-EXPRESSION>

<From X-position>

= <NUM-EXPRESSION>

<To Y-position>

= <NUM-EXPRESSION>

<To X-position>

= <NUM-EXPRESSION>

<Width>

= <NUM-EXPRESSION>

<Red>

= <NUM-EXPRESSION>

<Green>

= <NUM-EXPRESSION>

<Blue>

= <NUM-EXPRESSION>

<Handle>

= <NUM-EXPRESSION>

 

 

Meaning:

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

 

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

 

<Handle> specifies the window in which the line 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 line is drawn on the current mask.

 

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

 

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

 

Parameter:

From Y-position

Starting point Y-coordinate

From X-position

Starting point X-coordinate

To Y-position

Endpoint Y-coordinate

To X-position

Endpoint X-coordinate

Width

Width of line 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

 

Sample:

/* Draw red line from (5.5 , 10.25) to (10.5 , 20.1) with width = 3 pixel

H% = DRAWLINE(5.5,10.25,10.5,20.1,3,255,0,0)

…

/* Delete the line

H% = DRAWLINE(5.5,10.25,10.5,20.1,3,-1,-1,-1)

 

See also:

DRAWRECT

LPDRAWLINE

CIRCLE

POLYGON

FILLRECT