Skip to content

Instantly share code, notes, and snippets.

@nedzadarek
Created August 2, 2018 11:39
Show Gist options
  • Save nedzadarek/e746b7fd59828fa6fb9ae9ad749656be to your computer and use it in GitHub Desktop.
Save nedzadarek/e746b7fd59828fa6fb9ae9ad749656be to your computer and use it in GitHub Desktop.
Draws rectangles on the red canvas & update the area text with the `draw` code. Updates the red canvas when you write something in the area.
view [
do [start: end: 0x0 ]
b: base red 100x100 draw [] on-down [
start: event/offset
] on-up [
end: event/offset
append b/draw c: reduce ['box start end]
append a/text form c
append a/text newline
]
a: area "" [b/draw: load probe a/text]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment