[PD-cvs] pd/src desire.tk,1.1.2.600.2.174,1.1.2.600.2.175

chunlee chunlee at users.sourceforge.net
Mon Feb 12 22:28:18 CET 2007


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

Modified Files:
      Tag: desiredata
	desire.tk 
Log Message:
put require tcldot in catch


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.600.2.174
retrieving revision 1.1.2.600.2.175
diff -C2 -d -r1.1.2.600.2.174 -r1.1.2.600.2.175
*** desire.tk	30 Jan 2007 22:06:52 -0000	1.1.2.600.2.174
--- desire.tk	12 Feb 2007 21:28:15 -0000	1.1.2.600.2.175
***************
*** 8007,8014 ****
  }
  #-----------------------------------------------------------------
!  #!/usr/local/bin/wish
! lappend ::auto_path /usr/lib/graphviz
! puts $::auto_path
! package require Tcldot
  def Canvas graphviz_sort {} {
  	set nodes {}
--- 8007,8013 ----
  }
  #-----------------------------------------------------------------
! 
! #lappend ::auto_path /usr/local/lib/graphviz
! catch {package require Tcldot}
  def Canvas graphviz_sort {} {
  	set nodes {}
***************
*** 8022,8034 ****
  		lappend nodes [$g addnode $child label "[$child text]" shape "record" height "0.1"]
  		lappend nodes $child
- 		#for {set i 0} {$i < [$child ninlets]} {incr i} {
- 		#	$g addnode ${child}i${i} label "" shape "circle" width "0.1" height "0.1"
- 		#	[$g findnode ${child}i${i}] addedge [$g findnode $child]  arrowhead "none" style "dashed"
- 		#}
- 		#for {set i 0} {$i < [$child noutlets]} {incr i} {
- 		#	$g addnode ${child}o${i} label "" shape "circle" width "0.1" height "0.1"
- 		#	[$g findnode $child] addedge [$g findnode ${child}o${i}]  arrowhead "none" style "dashed"
- 		#}
- 		
  	}
  	puts "$nodes"
--- 8021,8024 ----
***************
*** 8038,8045 ****
  		set n1  [lindex $nodes [expr [lsearch $nodes $obj1]-1]] 
  		set n2  [lindex $nodes [expr [lsearch $nodes $obj2]-1]]
- 		#set n1 [$g findnode ${obj1}o${port1}]
- 		#set n2 [$g findnode ${obj2}i${port2}]
  		$n1 addedge $n2
- 		#puts "n1:: $n1 -> n2:: $n2"
  	}
  	#$g layout
--- 8028,8032 ----
***************
*** 8056,8067 ****
  	set contents [read $fd]
  	close $fd
  	foreach line [split $contents "\n"] {
  		switch [lindex $line 0] {
  			graph {set gw [lindex $line 2]; set gh [lindex $line 3]}
  			node {
! 				set m 65
  				set id [lindex $line 1]
  				set x [lindex $line 2]; set y [lindex $line 3]
! 				$id moveto [expr $x*$m] [expr ($gh-$y)*$m]
  				
  			}
--- 8043,8059 ----
  	set contents [read $fd]
  	close $fd
+ 	exec rm graph.txt
+ 	mset {x1 y1 x2 y2} [[$self widget] bbox all]
+ 	set width [expr $x2 - $x1]
+ 	set height [expr $y2 - $y1]
  	foreach line [split $contents "\n"] {
  		switch [lindex $line 0] {
  			graph {set gw [lindex $line 2]; set gh [lindex $line 3]}
  			node {
! 				set w [expr $width/$gw]
! 				set h [expr $height/$gh]
  				set id [lindex $line 1]
  				set x [lindex $line 2]; set y [lindex $line 3]
! 				$id moveto [expr $x*$w] [expr ($gh-$y)*$h]
  				
  			}





More information about the Pd-cvs mailing list