Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28730
Modified Files: Tag: devel_0_39 desire.tk Log Message: cleanup.
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.576 retrieving revision 1.1.2.577 diff -C2 -d -r1.1.2.576 -r1.1.2.577 *** desire.tk 20 Nov 2006 05:17:54 -0000 1.1.2.576 --- desire.tk 20 Nov 2006 06:48:57 -0000 1.1.2.577 *************** *** 3547,3592 **** switch $mode { in { set s [expr 1/$s] }} if {[llength $@selection]} { ! foreach children $@selection { ! mset {x y} [$children xy] ! switch $mode { ! out { ! set x1 [expr $x*$s] ! set y1 [expr $y*$s] ! } ! in { ! set x1 [expr $x*$s] ! set y1 [expr $y*$s] ! } ! } ! $children position= [list $x1 $y1] ! $children changed ! pd .$self object_moveto !$children $x1 $y1 ! } ! ! foreach children $@selection { $self changed_wires} ! } else { ! foreach children $@children { ! mset {x y} [$children xy] ! switch $mode { ! out { ! set x1 [expr $x*$s] ! set y1 [expr $y*$s] ! } ! in { ! set x1 [expr $x*$s] ! set y1 [expr $y*$s] ! } ! } ! $children position= [list $x1 $y1] ! $children changed ! pd .$self object_moveto !$children $x1 $y1 ! } ! foreach children $@children { $self changed_wires} } }
! def Canvas incr_zoom {} {$self zooming "in"} ! def Canvas decr_zoom {} {$self zooming "out"} def Canvas zooming {mode} { global zoom bar --- 3547,3567 ---- switch $mode { in { set s [expr 1/$s] }} if {[llength $@selection]} { ! set children $@selection } else { ! set children $@children ! } ! foreach child $children { ! mset {x y} [$child xy] ! set x1 [expr $x*$s] ! set y1 [expr $y*$s] ! $child position= [list $x1 $y1] ! $child changed ! pd .$self object_moveto !$child $x1 $y1 } + foreach child $children {$child changed_wires} }
! def Canvas incr_zoom {} {$self zooming in} ! def Canvas decr_zoom {} {$self zooming out} def Canvas zooming {mode} { global zoom bar *************** *** 3629,3637 **** set boo2 [wm geometry $topname] global lastcanvasconfigured lastcanvasconfiguration ! if {$topname != $lastcanvasconfigured || \ ! $boo != $lastcanvasconfiguration} { set lastcanvasconfigured $topname set lastcanvasconfiguration $boo - #pd $topname relocate $boo $boo2 ; } } --- 3604,3610 ---- set boo2 [wm geometry $topname] global lastcanvasconfigured lastcanvasconfiguration ! if {$topname != $lastcanvasconfigured || $boo != $lastcanvasconfiguration} { set lastcanvasconfigured $topname set lastcanvasconfiguration $boo } } *************** *** 3701,3708 **** set @keynav_tab_sel "object" } - - #if {[llength [[$self widget] gettags text]]} { - # puts " delete something.........." - #} } F1 { --- 3674,3677 ---- *************** *** 3746,3750 **** foreach side $@sides { mset {ax1 ay1 ax2 ay2} [$current bbox] ! set t [expr atan2($ay2-$ay1, $ax2-$ax1)] set cx1 [expr $ax1 + (($ax2-$ax1)* 0.15)] set cy1 [expr $ay1 + (($ay2-$ay1)* 0.15)] --- 3715,3719 ---- foreach side $@sides { mset {ax1 ay1 ax2 ay2} [$current bbox] ! set t [expr atan2($ay2-$ay1, $ax2-$ax1)] set cx1 [expr $ax1 + (($ax2-$ax1)* 0.15)] set cy1 [expr $ay1 + (($ay2-$ay1)* 0.15)] *************** *** 3755,3759 **** set angle [lindex $@angles [expr $n+$i]] mset {ax1 ay1 ax2 ay2} [$current bbox] ! set t [expr atan2($ay2-$ay1, $ax2-$ax1)] set bx1 [expr $ax1 + (($ax2-$ax1)* 0.15)] set by1 [expr $ay1 + (($ay2-$ay1)* 0.15)] --- 3724,3728 ---- set angle [lindex $@angles [expr $n+$i]] mset {ax1 ay1 ax2 ay2} [$current bbox] ! set t [expr atan2($ay2-$ay1, $ax2-$ax1)] set bx1 [expr $ax1 + (($ax2-$ax1)* 0.15)] set by1 [expr $ay1 + (($ay2-$ay1)* 0.15)] *************** *** 3845,3856 **** set fy [$self look iopos] switch $type { ! o { ! set n $@noutlets ! set y $y2+$fy ! } ! i { ! set n $@ninlets ! set y $y1-$fy-1 ! } } set onset [expr $x1 + ($xs-$iowidth) * $port / $nplus] --- 3814,3819 ---- set fy [$self look iopos] switch $type { ! o {set n $@noutlets; set y $y2+$fy } ! i {set n $@ninlets; set y $y1-$fy-1} } set onset [expr $x1 + ($xs-$iowidth) * $port / $nplus] *************** *** 4052,4064 **** set zoom [$@canvas zoom] set c [$@canvas widget] - #if {[llength $bbox1] < 4} {puts stderr "wire_draw: crap outlet $@obj1 [$@obj1 deconstruct]"; return} - #if {[llength $bbox2] < 4} {puts stderr "wire_draw: crap inlet $@obj2 [$@obj2 deconstruct]"; return} set iowidth [$@obj1 look iowidth] mset {ox1 oy1 ox2 oy2} [$@obj1 io_bbox o $@port1 [$@obj1 noutlets]] mset {ix1 iy1 iy2 iy2} [$@obj2 io_bbox i $@port2 [$@obj2 ninlets]] ! set x1 [expr $ox1 + ($iowidth/2)] ! set y1 $oy2 ! set x2 [expr $ix1 + ($iowidth/2)] ! set y2 $iy1 set xys [xys $x1 $y1 $x2 $y2] set length [expr sqrt(pow($x2-$x1,2)+pow($y2-$y1,2))] --- 4015,4023 ---- set zoom [$@canvas zoom] set c [$@canvas widget] set iowidth [$@obj1 look iowidth] mset {ox1 oy1 ox2 oy2} [$@obj1 io_bbox o $@port1 [$@obj1 noutlets]] mset {ix1 iy1 iy2 iy2} [$@obj2 io_bbox i $@port2 [$@obj2 ninlets]] ! set x1 [expr $ox1 + $iowidth/2]; set y1 $oy2 ! set x2 [expr $ix1 + $iowidth/2]; set y2 $iy1 set xys [xys $x1 $y1 $x2 $y2] set length [expr sqrt(pow($x2-$x1,2)+pow($y2-$y1,2))] *************** *** 4079,4089 **** } } ! if {[$self look wirearrow]} { ! $self item WIRE line $xys -width $wire_width -smooth yes \ ! -arrow $arrow -arrowshape $arrowshape -fill $wire_color ! } else { ! $self item WIRE line $xys -width $wire_width -smooth yes \ ! -arrowshape $arrowshape -fill $wire_color ! } }
--- 4038,4044 ---- } } ! set options {} ! if {[$self look wirearrow]} {lappend options -arrow $arrow -arrowshape $arrowshape} ! eval [concat [list $self item WIRE line $xys -width $wire_width -smooth yes -fill $wire_color] $options] }