[PD-cvs] pd/src desire.tk,1.1.2.600.2.311,1.1.2.600.2.312

chunlee chunlee at users.sourceforge.net
Tue Aug 7 18:49:04 CEST 2007


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5690

Modified Files:
      Tag: desiredata
	desire.tk 
Log Message:
simplify Crosshair draw


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.311
retrieving revision 1.1.2.600.2.312
diff -C2 -d -r1.1.2.600.2.311 -r1.1.2.600.2.312
*** desire.tk	7 Aug 2007 16:38:04 -0000	1.1.2.600.2.311
--- desire.tk	7 Aug 2007 16:49:00 -0000	1.1.2.600.2.312
***************
*** 6451,6465 ****
  		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}
--- 6451,6458 ----
  		switch -regexp -- $type {^object|outlet|inlet$ {mset {x y x3 y3} [$id bbox]}}
  	}
  	set width [winfo width $c]; set height [winfo height $c]
! 	set x1 [$c canvasx 0]; set y1 [$c canvasy 0]
! 	set h1 [list $x1 $y [expr $x1+$width] $y]
! 	set v1 [list $x $y1 $x [expr $y1+$height]]
  	$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