Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19953
Modified Files: Tag: devel_0_39 desire.tk Log Message: .
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.484 retrieving revision 1.1.2.485 diff -C2 -d -r1.1.2.484 -r1.1.2.485 *** desire.tk 26 Sep 2006 16:27:25 -0000 1.1.2.484 --- desire.tk 27 Sep 2006 11:43:43 -0000 1.1.2.485 *************** *** 1641,1646 ****
def Canvas draw {} { ! if {$@subpatch && $@canvas != ""} {super} ;# is for the [pd] box if applicable ! if {[info exists @gop]} {if {$@gop} {super}} if {!$@mapped} {return} if {$@editmode} {set bg [$self look bgedit]} else {set bg [$self look bgrun]} --- 1641,1646 ----
def Canvas draw {} { ! if {$@subpatch && $@canvas != "" && !$@gop} {super} ;# is for the [pd] box if applicable ! if {[info exists @gop]} {if {$@gop} {super; $self draw_gop}} if {!$@mapped} {return} if {$@editmode} {set bg [$self look bgedit]} else {set bg [$self look bgrun]} *************** *** 1649,1652 **** --- 1649,1658 ---- }
+ def Canvas draw_gop {} { + if {[llength $@children] == 1 && \ + [[lindex $@children 0] class] == "Array"} {[lindex $@children 0] draw} + + } + def Canvas popup_properties {} {CanvasPropertiesDialog new $self}
*************** *** 4526,4535 **** global font mset {x_off y_off} [$@canvas xy] ! set mess [$@canvas get_mess] ! set xfrom [lindex $mess 0] ! set yfrom [lindex $mess 3] ! set xto [lindex $mess 2] ! set yto [lindex $mess 1] ! if {[$@canvas mapped]} { mset {c_width c_height} [$@canvas get_dimen] --- 4532,4536 ---- global font mset {x_off y_off} [$@canvas xy] ! mset {xfrom yto xto yfrom pixwidth pixheight} [$@canvas get_mess] if {[$@canvas mapped]} { mset {c_width c_height} [$@canvas get_dimen] *************** *** 4537,4542 **** set i 0 #cheats ! if {[$@canvas editmode]} {set bg [$@canvas look bgedit]} else {set bg [$@canvas look bgrun]} ! $self item RECT polygon [list 0 0 $c_width 0 $c_width $c_height 0 $c_height] -outline red -fill $bg foreach val $@data { if {!$val} {set val 0.0} --- 4538,4548 ---- set i 0 #cheats ! if {[$@canvas editmode]} { ! set bg [$@canvas look bgedit] ! } else { ! set bg [$@canvas look bgrun] ! } ! $self item RECT polygon [list 0 0 $c_width 0 $c_width $c_height 0 $c_height] \ ! -outline red -fill $bg foreach val $@data { if {!$val} {set val 0.0} *************** *** 4545,4555 **** set x2 [expr $x1 + $width] set line [list $x1 $y $x2 $y] ! set tag ${self}${i} ! $self item elem${i} line $line -fill [$@canvas look compfg] -width 2 -tags "$self ${self}elem${i}" incr i } } else { - set pixwidth [lindex $mess 4] - set pixheight [lindex $mess 5] set width [expr $pixwidth / $@length] set canvas [$@canvas canvas] --- 4551,4559 ---- set x2 [expr $x1 + $width] set line [list $x1 $y $x2 $y] ! $self item elem${i} line $line -fill [$@canvas look compfg] -width 2 \ ! -tags "$self ${self}elem${i}" incr i } } else { set width [expr $pixwidth / $@length] set canvas [$@canvas canvas] *************** *** 4561,4566 **** set x2 [expr $x1 + $width] set line [list $x1 $y $x2 $y] ! set tag ${self}${i} ! $@canvas item elem${i} line $line -fill [$@canvas look compfg] -width 2 -tags "$self ${self}elem${i}" incr i } --- 4565,4571 ---- set x2 [expr $x1 + $width] set line [list $x1 $y $x2 $y] ! set c $@canvas ! $@canvas item elem${i} line $line -fill [$@canvas look compfg] -width 2 \ ! -tags "$@canvas ${c}elem${i}" incr i } *************** *** 4573,4582 **** if {!$@draw} return mset {c_width c_height} [$@canvas get_dimen] set width [expr $c_width / $@length] - set mess [$@canvas get_mess] - set xfrom [lindex $mess 0] - set yfrom [lindex $mess 3] - set xto [lindex $mess 2] - set yto [lindex $mess 1] set i [format %d [expr int($x/$width)]] set x1 [expr $width * $i] --- 4578,4583 ---- if {!$@draw} return mset {c_width c_height} [$@canvas get_dimen] + mset {xfrom yto xto yfrom pixwidth pixheight} [$@canvas get_mess] set width [expr $c_width / $@length] set i [format %d [expr int($x/$width)]] set x1 [expr $width * $i] *************** *** 4586,4591 **** pd .$self $i $val #.. ! if {[$@canvas editmode]} {set bg [$@canvas look bgedit]} else {set bg [$@canvas look bgrun]} ! $self item RECT polygon [list 0 0 $c_width 0 $c_width $c_height 0 $c_height] -outline red -fill $bg } def Array length= {val} {set @length $val} --- 4587,4597 ---- pd .$self $i $val #.. ! if {[$@canvas editmode]} { ! set bg [$@canvas look bgedit] ! } else { ! set bg [$@canvas look bgrun] ! } ! $self item RECT polygon [list 0 0 $c_width 0 $c_width $c_height 0 $c_height] \ ! -outline red -fill $bg } def Array length= {val} {set @length $val}