Last active
July 31, 2017 20:45
-
-
Save honix/912b126e981108b347e7c6ed67e9894a to your computer and use it in GitHub Desktop.
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
Drawing app | |
Work in progress! | |
Red [ | |
Needs: 'View | |
] | |
pen-buffer-settings: [500x500 0.0.0.254] | |
buffer: make image! [500x500 100.100.100] | |
pen-buffer: make image! pen-buffer-settings | |
line-array: [] | |
color: 50.0.50.100 | |
canvas: layout [ | |
at 10x10 image buffer | |
at 10x10 image pen-buffer | |
on-down [append line-array event/offset] | |
on-up [ | |
line-array: copy [] | |
draw buffer [image pen-buffer] | |
pen-buffer: make image! pen-buffer-settings | |
face/image: pen-buffer | |
] | |
all-over | |
on-over [if find event/flags 'down [ | |
append line-array event/offset | |
draw pen-buffer: make image! pen-buffer-settings | |
append copy [ | |
pen color | |
line-join round | |
fill-pen color | |
line-width 25 | |
line | |
] line-array | |
face/image: pen-buffer | |
] | |
] | |
] | |
view canvas |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment