CALL SLINE
This page was last modified 18:12, 31 May 2021 by Mars2000you.

Contents

Effect

Draws a line between absolute or relative coordinates on a graphic screen supported by Eddy II (2 to 4).

Syntaxes

  • CALL SLINE (STEP(<X1>,<Y1>)-STEP(<X2>,<Y2>),<Color>,<Style>)
  • CALL SLINE (-STEP(<X2>,<Y2>),<Color>,<Style>)

Notes:

  • Parameters can not end with a comma alone.
  • Current cursor coordinates are used as starting coordinates with the second syntax.

Parameters

STEP can be put before coordinates, to specify relative coordinates to the current cursor position. In this case the values can also be negative.

<X1> is coordinate X of the starting point of the line (0-255)

<Y1> is coordinate Y of the starting point of the line (0-191)

When <X1> and <Y1> are omitted, the coordinates of the last drawn point are used as starting point.

<X2> is coordinate X of the end point of the line (0-255)

<Y2> is coordinate Y of the end point of the line (0-191)

<Color> is the color to be used for drawing the line = 0 to 15. If <Color> is not specified the current foreground color is used.

<Style> is the drawing style to be used to draw the line, it is a number between 0 and 7
0 = 1 pixel ('normal' drawing)
1 = 2 pixels in horizontal and vertical directions
2 = 3 pixels in horizontal and vertical directions
3 = 4 pixels in horizontal and vertical directions
4 to 7 = same as 0 to 3, but with an hatched effect

If <Style> is not defined, the current drawing style will be used. Default value is 0.

Example

10 COLOR 15,1,7: SCREEN 2
20 _LSTYLE(7)
30 _SLINE((10,10)-(200,10))
40 FOR I=1 TO 3
50 _SLINE((10,10+20*I)-(200,10+20*I),6+I,I)
60 NEXT I
70 FOR I=4 TO 7
80 _SLINE(STEP(-95,10)-STEP(100,15),6+I,I)
90 NEXT I
100 GOTO 100

Related to

CALL LSTYLE, LINE

Compatibility

EddyII BASIC