Artifact
f030676288dbb3330b47d66d60080f2a04d643b8:
Attachment "arcs.tcl" to
ticket [1187074f]
added by
jenglish
2005-04-21 09:32:44.
pack [canvas .c -width 50 -height 50 -background #FFFFFF]
set colors [list green red blue]
set x0 [set y0 15]
set x1 [set y1 15]
for {set i 0} {$i < 10} {incr i} {
set color [lindex $colors [expr {$i % [llength $colors]}]]
.c create oval $x0 $y0 $x1 $y1 -outline $color -width 1
incr x0 -1; incr y0 -1
incr x1 1; incr y1 1
}
set x0 [set y0 15]
set x1 [set y1 16]
incr x0 20 ; incr x1 20;
for {set i 0} {$i < 10} {incr i} {
set color [lindex $colors [expr {$i % [llength $colors]}]]
.c create oval $x0 $y0 $x1 $y1 -outline $color
incr x0 -1; incr y0 -1
incr x1 1; incr y1 1
}