diff options
| author | Andrés Cuervo <andrescuervor@gmail.com> | 2023-06-20 17:58:37 +0000 |
|---|---|---|
| committer | Andrés Cuervo <andrescuervor@gmail.com> | 2023-06-20 17:58:37 +0000 |
| commit | 5b30da668442d49f61556f00aeb3d3cd584fab1b (patch) | |
| tree | faf5d8c5c58af71b2f1cbd9fb2f1dc958af7b2a4 /virtual-programs | |
| parent | Merge pull request #41 from FolkComputer/nm/regions (diff) | |
| download | folk-5b30da668442d49f61556f00aeb3d3cd584fab1b.tar.gz folk-5b30da668442d49f61556f00aeb3d3cd584fab1b.zip | |
Stop image-slice on laptop, give different whiskers different colors
Diffstat (limited to 'virtual-programs')
| -rw-r--r-- | virtual-programs/images.folk | 1 | ||||
| -rw-r--r-- | virtual-programs/points-at.folk | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/virtual-programs/images.folk b/virtual-programs/images.folk index bf25e308..ae40769a 100644 --- a/virtual-programs/images.folk +++ b/virtual-programs/images.folk @@ -5,6 +5,7 @@ # Wish $this displays camera slice $slice # } +if {$::isLaptop} { return } # Generic image class for sub-image manipulations namespace eval ::image { diff --git a/virtual-programs/points-at.folk b/virtual-programs/points-at.folk index eb5d942b..5c79cf1e 100644 --- a/virtual-programs/points-at.folk +++ b/virtual-programs/points-at.folk @@ -20,23 +20,27 @@ When /someone/ wishes /rect/ points /direction/ & /rect/ has region /region/ { set whisker_radians $radians set fac -1.0 set whisker_size [expr {$width * $fac}] + set color green if {$direction eq "up"} { set whisker_radians [expr {$radians + $pi / 2}] set whisker_size [expr {$height * $fac}] + set color blue } if {$direction eq "left"} { set whisker_radians [expr {$radians + $pi}] + set color red } if {$direction eq "down"} { set whisker_radians [expr {$radians + $pi * 1.5}] set whisker_size [expr {$height * $fac}] + set color white } set wx [expr {$cx + $whisker_size * [::tcl::mathfunc::cos [expr {-1 * $whisker_radians}]] }] set wy [expr {$cy + $whisker_size * [::tcl::mathfunc::sin [expr {-1 * $whisker_radians}]] }] - Display::stroke [list [list $cx $cy] [list $wx $wy] ] 2 green + Display::stroke [list [list $cx $cy] [list $wx $wy] ] 4 $color When /target/ has region /r2/ { if {$target != $rect && \ |
