From 5c492bdec6cd9302f0d92868ccfea8eadbd25896 Mon Sep 17 00:00:00 2001 From: carmen rocco Date: Tue, 5 Apr 2005 13:32:38 +0000 Subject: ix::gui 2005:04 svn path=/trunk/; revision=2680 --- extensions/gui/ix/sp.wid | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 extensions/gui/ix/sp.wid (limited to 'extensions/gui/ix/sp.wid') diff --git a/extensions/gui/ix/sp.wid b/extensions/gui/ix/sp.wid new file mode 100755 index 00000000..2b41902f --- /dev/null +++ b/extensions/gui/ix/sp.wid @@ -0,0 +1,36 @@ +#console show +namespace eval ::ix { + variable _ + proc sp {p t} { + variable _ + image create photo $t + $p configure -image $t + set _($t:loc) 0 + } + proc spl {t args} { + variable _ + incr _($t:loc) + if {$_($t:loc) > 511} {set _($t:loc) 0} + set draw {} + foreach pixel $args { + set pixel [expr int($pixel)] + lappend draw [format #%02x%02x%02x $pixel $pixel $pixel] + } + $t put $draw -to $_($t:loc) 0 + } + proc spd {t args} { + variable _ + incr _($t:loc) + if {$_($t:loc) > 511} {set _($t:loc) 0} + $t put $args -to $_($t:loc) 0 + } +} +#> sp label +#. @list ::ix::spl .| .#args +#. @draw ::ix::spd .| .#args +#. @clear .- delete 0 end +#. @img eval ".| .#args" +#. @cmd eval ".- .#args" +bind .- {.| put #eeeeee -to %x %y} +::ix::sp .- .| +puts "setup" \ No newline at end of file -- cgit v1.2.1