[PD-cvs] pd/src desire.tk,1.1.2.600.2.266,1.1.2.600.2.267
Mathieu Bouchard
matju at users.sourceforge.net
Thu Aug 2 21:37:43 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14339
Modified Files:
Tag: desiredata
desire.tk
Log Message:
fix for crosshair
Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.266
retrieving revision 1.1.2.600.2.267
diff -C2 -d -r1.1.2.600.2.266 -r1.1.2.600.2.267
*** desire.tk 2 Aug 2007 18:01:21 -0000 1.1.2.600.2.266
--- desire.tk 2 Aug 2007 19:37:39 -0000 1.1.2.600.2.267
***************
*** 6439,6443 ****
def Crosshair draw {} {
set c [$@canvas widget]
! set z $@[$@canvas zoom]
mset {type id detail} $@target
mset {cx1 cy1 cx2 cy2} [$@canvas get_bbox]
--- 6439,6443 ----
def Crosshair draw {} {
set c [$@canvas widget]
! set z [$@canvas zoom]
mset {type id detail} $@target
mset {cx1 cy1 cx2 cy2} [$@canvas get_bbox]
***************
*** 6445,6467 ****
set y $@y
if {[$@canvas look hairsnap]} {
! switch -regexp -- $type {
! ^object|outlet|inlet$ {
! mset {x y x3 y3} [$id bbox]
! set @follow $id
! }
! ^move|edit$ {mset {x y x3 y3} [$@follow bbox]}
! }
}
mset {l r} [$c xview]
mset {t b} [$c yview]
set width [winfo width $c]; set height [winfo height $c]
! set w [expr (1 / ($r - $l)) * $width]
! set h [expr (1 / ($b - $t)) * $height]
set x1 [expr ($w*$l+$cx1+7)/$z]
set y1 [expr ($h*$t+$cy1+7)/$z]
! set x2 [expr $x1+$width-14]
set y2 [expr $height+$y1-14]
set h1 [list $x1 $y $x2 $y]
! set v1 [list $x $y1 $x $y2]
$self item VHAIR1 line $v1 -fill [$@canvas look crosshair] -width 0.5 -dash {4 4 4 4}
$self item HHAIR1 line $h1 -fill [$@canvas look crosshair] -width 0.5 -dash {4 4 4 4}
--- 6445,6461 ----
set y $@y
if {[$@canvas look hairsnap]} {
! switch -regexp -- $type {^object|outlet|inlet$ {mset {x y x3 y3} [$id bbox]}}
}
mset {l r} [$c xview]
mset {t b} [$c yview]
set width [winfo width $c]; set height [winfo height $c]
! set w [expr (1 / ($r-$l)) * $width]
! set h [expr (1 / ($b-$t)) * $height]
set x1 [expr ($w*$l+$cx1+7)/$z]
set y1 [expr ($h*$t+$cy1+7)/$z]
! set x2 [expr $width+$x1-14]
set y2 [expr $height+$y1-14]
set h1 [list $x1 $y $x2 $y]
! set v1 [list $x $y1 $x $y2]
$self item VHAIR1 line $v1 -fill [$@canvas look crosshair] -width 0.5 -dash {4 4 4 4}
$self item HHAIR1 line $h1 -fill [$@canvas look crosshair] -width 0.5 -dash {4 4 4 4}
More information about the Pd-cvs
mailing list