From 5689251b4df7456f43a0d3b357672bbd9fc3a40c Mon Sep 17 00:00:00 2001 From: carmen rocco Date: Tue, 19 Sep 2006 23:21:31 +0000 Subject: *** empty log message *** svn path=/trunk/; revision=5973 --- extensions/gui/ix/toxy/sp.wid | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 extensions/gui/ix/toxy/sp.wid (limited to 'extensions/gui/ix/toxy/sp.wid') diff --git a/extensions/gui/ix/toxy/sp.wid b/extensions/gui/ix/toxy/sp.wid new file mode 100755 index 00000000..2b41902f --- /dev/null +++ b/extensions/gui/ix/toxy/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