Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19007
Modified Files: Tag: devel_0_39 desire.tk Log Message: object width try again
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.399 retrieving revision 1.1.2.400 diff -C2 -d -r1.1.2.399 -r1.1.2.400 *** desire.tk 23 Aug 2006 16:30:40 -0000 1.1.2.399 --- desire.tk 23 Aug 2006 22:23:57 -0000 1.1.2.400 *************** *** 1858,1872 **** set n [string length $@text] set textwidth [expr $font(padx)+$font(width)*($n+$@edit)] ! if {[llength [.$@canvas.c gettags ${self}TEXT]]} { ! mset {x1 y1 x2 y2} [.$@canvas.c bbox ${self}TEXT] ! set textwidth [expr (($x2 - $x1)/[$@canvas scale])+$font(padx)] ! } ! if {[llength [.$@canvas.c gettags ${self}text]]} { ! #catch { set n [expr [string length [.$@canvas.c.${self}text get 1.0 1.end]] -1] mset {x1 y1 w h} [.$@canvas.c.${self}text bbox 1.$n] set textwidth [expr ($font(padx) + $x1 + ($w * 2)) / [$@canvas scale]] - #} } #set textwidth [expr $font(padx)+$font(width)*($n+$@edit)] set topwidth [expr (2* $@ninlets-1) * [$self look iowidth]] --- 1858,1872 ---- set n [string length $@text] set textwidth [expr $font(padx)+$font(width)*($n+$@edit)] ! #if {[llength [.$@canvas.c gettags ${self}TEXT]]} { ! # mset {x1 y1 x2 y2} [.$@canvas.c bbox ${self}TEXT] ! # set textwidth [expr (($x2 - $x1)/[$@canvas scale])+$font(padx)] ! #} ! #if {[llength [.$@canvas.c gettags ${self}text]]} { ! catch { set n [expr [string length [.$@canvas.c.${self}text get 1.0 1.end]] -1] mset {x1 y1 w h} [.$@canvas.c.${self}text bbox 1.$n] set textwidth [expr ($font(padx) + $x1 + ($w * 2)) / [$@canvas scale]] } + #} #set textwidth [expr $font(padx)+$font(width)*($n+$@edit)] set topwidth [expr (2* $@ninlets-1) * [$self look iowidth]]