Lines can be drawn in screen coordinates, where 0,0 is the top left corner and 1,1 is bottom right, scaled coordinates, which are similar, but scaled to keep 0,0--1,1 rectangular, or Fractal coordinates, to draw a line at an exact position on the screen.
The color of the line should be specified by the color
command. You might draw an arbitrary number of lines and, later,
morph them. Each line is identified by a unique numeric key; the
current key can be set using linekey
. Commands for
changing lines operate on the line with the current key. (Lines
drawn in sequence have consecutive numbers.)
For example:
(color 'red)
(line 'scaled 0.3 0.5 0.7 0.5)
(line 'scaled 0.3 0.5 0.7 0.5)
(line 'scaled 0.3 0.5 0.3 0.5)
(line 'scaled 0.7 0.5 0.7 0.5)
(linekey 0)
(morphline 'scaled 0.3 0.3 0.7 0.3)
(morphline 'scaled 0.3 0.7 0.7 0.7)
(morphline 'scaled 0.3 0.3 0.3 0.7)
(morphline 'scaled 0.7 0.3 0.7 0.7)
(usleep 1000000)
Creates line morphing to rectangle.