Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19596
Modified Files: Tag: devel_0_39 desire.tk Log Message: worked out another fix for crosshair (matju's fix kept)
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.372 retrieving revision 1.1.2.373 diff -C2 -d -r1.1.2.372 -r1.1.2.373 *** desire.tk 18 Aug 2006 08:18:15 -0000 1.1.2.372 --- desire.tk 18 Aug 2006 12:43:28 -0000 1.1.2.373 *************** *** 2388,2393 **** def Canvas adjust_scrollbars {} { set c .$self.c ! # set size [$c bbox all] ! set size [$c bbox $@children] if {$size != ""} { mset {xmin ymin xmax ymax} {0 0 100 100} --- 2388,2393 ---- def Canvas adjust_scrollbars {} { set c .$self.c ! set size [$c bbox all] ! # set size [$c bbox $@children] if {$size != ""} { mset {xmin ymin xmax ymax} {0 0 100 100} *************** *** 4324,4332 **** global crosshair set c .$self.c set region [$c cget -scrollregion] # the following line is not right. mset {vx1 vx2} [$c xview] mset {vy1 vy2} [$c yview] ! mset {vx1 vy1 vx2 vy2} [lzip * [list $vx1 $vy1 $vx2 $vx2] $region] mset {type id detail} $target if {$crosshair(hairsnap)} { --- 4324,4339 ---- 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] ! puts " vx1 $vx1 vy1 $vy1 vx2 $vx2 vy2 $vy2" mset {type id detail} $target if {$crosshair(hairsnap)} { *************** *** 4341,4346 **** } } ! set v1 [list $x $vy1 $x $vy2] ! set h1 [list $vx1 $y $vx2 $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} --- 4348,4355 ---- } } ! #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}