Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22495
Modified Files: Tag: devel_0_39 desire.tk Log Message: fixed show_crosshair for real
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.384 retrieving revision 1.1.2.385 diff -C2 -d -r1.1.2.384 -r1.1.2.385 *** desire.tk 20 Aug 2006 19:55:26 -0000 1.1.2.384 --- desire.tk 20 Aug 2006 21:39:54 -0000 1.1.2.385 *************** *** 776,781 **** }
- proc pdtk_text_set {x y z} {} - proc pdtk_watchdog {} {pd pd ping; after 2000 {pdtk_watchdog}}
--- 776,779 ---- *************** *** 4360,4374 **** global crosshair set c .$self.c ! set width [expr [winfo width $c] / $@scale] ! set height [expr [winfo height $c] / $@scale] ! set region [$c cget -scrollregion] ! # the following line is not right. mset {vx1 vx2} [$c xview] mset {vy1 vy2} [$c yview] ! set width2 [expr $vx2 - $vx1] ! #set xoff [expr $width * $vx1] ! set xoff [expr ([winfo width $c] * $vx1)/$@scale] ! set yoff [expr ([winfo height $c] * $vy1)/$@scale] ! #mset {vx1 vy1 vx2 vy2} [lzip * [list $vx1 $vy1 $vx2 $vx2] $region] mset {type id detail} $target if {$crosshair(hairsnap)} { --- 4358,4370 ---- global crosshair set c .$self.c ! set width [expr [winfo width $c]/$@scale] ! set height [expr [winfo height $c]/$@scale] ! mset {x1 y1 x2 y2} [$c cget -scrollregion] mset {vx1 vx2} [$c xview] mset {vy1 vy2} [$c yview] ! set vx1 [expr ($x1+($x2-$x1)*$vx1)/$@scale] ! set vy1 [expr ($y1+($y2-$y1)*$vy1)/$@scale] ! set vx2 [expr ($x1+($x2-$x1)*$vx2)/$@scale] ! set vy2 [expr ($y1+($y2-$y1)*$vy2)/$@scale] mset {type id detail} $target if {$crosshair(hairsnap)} { *************** *** 4383,4397 **** } } ! #set v1 [list $x $vy1 $x $vy2] ! #set h1 [list $vx1 $y $vx2 $y] ! set v1 [list $x [expr $y - $y + $yoff] $x [expr $y + ($height +$yoff)]] ! set h1 [list [expr $x - $x + $xoff] $y [expr $x + ($width +$xoff)] $y] $self item VHAIR1 line $v1 -fill [look selectframe] -width 0.5 -dash {4 4 4 4} $self item HHAIR1 line $h1 -fill [look selectframe] -width 0.5 -dash {4 4 4 4} }
! def Canvas hide_crosshair {} { ! .$self.c delete ${self}VHAIR1 ${self}HHAIR1 ! }
############ tooltips --- 4379,4390 ---- } } ! set v1 [list $x $vy1 $x $vy2] ! set h1 [list $vx1 $y $vx2 $y] ! #$self item BORDER rect [list $vx1 $vy1 $vx2 $vy2] -width 10 $self item VHAIR1 line $v1 -fill [look selectframe] -width 0.5 -dash {4 4 4 4} $self item HHAIR1 line $h1 -fill [look selectframe] -width 0.5 -dash {4 4 4 4} }
! def Canvas hide_crosshair {} {$self item_delete VHAIR1 HHAIR1}
############ tooltips