-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
164 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,28 @@ | ||
; gradients | ||
|
||
(def frame | ||
(get-frame)) | ||
|
||
(clear) | ||
(def gl | ||
(line 0 0 frame:h frame:h)) | ||
(def cl1 | ||
(gradient gl | ||
(theme:b_med theme:b_high))) | ||
(def cl2 | ||
(gradient gl | ||
(theme:b_high theme:b_med))) | ||
(guide gl) | ||
|
||
(def colors | ||
("#72dec2" "#ffffff")) | ||
|
||
(def gradient1 | ||
(gradient | ||
(line 0 0 frame:h frame:h) colors)) | ||
|
||
(def gradient2 | ||
(gradient | ||
(line frame:h frame:h 0 0) colors)) | ||
|
||
(fill | ||
(circle frame:m frame:m frame:m) cl1) | ||
(circle frame:m frame:m frame:m) gradient1) | ||
|
||
(fill | ||
(circle frame:m frame:m | ||
(mul frame:m 0.75)) cl2) | ||
(mul frame:m 0.75)) gradient2) | ||
|
||
(fill | ||
(circle frame:m frame:m | ||
(mul frame:m 0.5)) cl1) | ||
(mul frame:m 0.5)) gradient1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,63 @@ | ||
; display a collection of all shapes. | ||
|
||
(def colors | ||
("#000000" "#72dec2")) | ||
|
||
; | ||
(clear) | ||
|
||
(stroke | ||
(rect 0 0 300 300) theme:b_high) | ||
(rect 0 0 300 300) colors:0) | ||
|
||
(stroke | ||
(circle 150 150 150) theme:b_med) | ||
(circle 150 150 150) colors:1) | ||
|
||
(stroke | ||
(ellipse 150 150 75 150) theme:b_high) | ||
(ellipse 150 150 75 150) colors:0) | ||
|
||
(stroke | ||
(line 0 150 300 150) theme:b_high) | ||
(line 0 150 300 150) colors:0) | ||
|
||
(stroke | ||
(text 600 300 60 "hell") theme:b_med) | ||
(text 600 300 60 "hell") colors:1) | ||
|
||
(stroke | ||
(arc 600 298 296 | ||
(rad 180) | ||
(rad -90)) theme:b_med) | ||
(rad -90)) colors:1) | ||
|
||
(stroke | ||
(poly | ||
(pos 300 300) | ||
(pos 600 0) | ||
(pos 600 300)) theme:b_high) | ||
(pos 600 300)) colors:0) | ||
|
||
(transform:move 0 300) | ||
|
||
(fill | ||
(rect 0 0 300 300) theme:b_high) | ||
(rect 0 0 300 300) colors:0) | ||
|
||
(fill | ||
(circle 150 150 150) theme:b_med) | ||
(circle 150 150 150) colors:1) | ||
|
||
(fill | ||
(ellipse 150 150 75 150) theme:b_high) | ||
(ellipse 150 150 75 150) colors:0) | ||
|
||
(fill | ||
(line 0 150 300 150) theme:b_high) | ||
(line 0 150 300 150) colors:0) | ||
|
||
(fill | ||
(text 600 300 60 "hell") theme:b_med) | ||
(text 600 300 60 "hell") colors:1) | ||
|
||
(fill | ||
(arc 600 298 296 | ||
(rad 180) | ||
(rad -90)) theme:b_med) | ||
(rad -90)) colors:1) | ||
|
||
(fill | ||
(poly | ||
(pos 300 300) | ||
(pos 600 0) | ||
(pos 600 300)) theme:b_high) | ||
(pos 600 300)) colors:0) | ||
|
||
(transform:reset) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
; this demo shows how to use the mouse events to draw make a simple drawing tool. | ||
|
||
; | ||
(clear) | ||
|
||
; | ||
(def gradient-line | ||
(line frame:c 0 frame:c frame:h)) | ||
|
||
; | ||
(defn draw-circle | ||
(e) | ||
( | ||
(stroke | ||
(circle e:x e:y e:d) | ||
(gradient gradient-line | ||
("black" "#ffb545"))))) | ||
("black" "#72dec2"))))) | ||
|
||
; | ||
(on "mouse-move" draw-circle) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,31 @@ | ||
; transforms | ||
|
||
(clear) | ||
|
||
(transform:move 150 150) | ||
|
||
(fill | ||
(circle 0 0 150) theme:b_inv) | ||
|
||
(transform:move 300 0) | ||
|
||
(transform:rotate | ||
(rad 90)) | ||
|
||
(fill | ||
(circle 0 0 150) theme:b_high) | ||
|
||
(transform:move 300 0) | ||
|
||
(transform:rotate | ||
(rad 90)) | ||
|
||
(fill | ||
(circle 0 0 150) theme:b_med) | ||
|
||
(transform:move 300 0) | ||
|
||
(fill | ||
(circle 0 0 150) theme:b_low) | ||
|
||
(transform:reset) |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.