Changed the line syntax to (line x1 y1 x2 y2)

This commit is contained in:
Devine Lu Linvega
2019-07-24 20:29:03 +09:00
parent 33574979cd
commit 1c7b74d582
13 changed files with 71 additions and 140 deletions

View File

@@ -33,15 +33,13 @@
(def y
(elevation i))
(stroke
(line
(pos x
(elevation
(sub i 1)))
(pos
(add x seg-width)
(elevation i))) 4
(line x
(elevation
(sub i 1))
(add x seg-width)
(elevation i)) 4
(gradient
(50 0
(line 50 0
(of
(frame) :w) 0)
("#ffb545" "#72dec2")))))

View File

@@ -1,19 +1,13 @@
; this demo shows how to use the mouse events.
;
(defn redraw
(e)
(
(clear)
; vertical line
(stroke
(line
(pos
(of e :x) 0) e) 2 "#ff0000")
(stroke (line (of e :x) 0 (of e :x) (of e :y)) 2 "#ff0000")
; horizontal line
(stroke
(line
(pos 0
(of e :y)) e) 2 "#72dec2")
(line 0 (of e :y) (of e :x) (of e :y)) 2 "#72dec2")
; circle
(stroke
(circle