[PD-cvs] pd/src desire.tk,1.1.2.431,1.1.2.432

Mathieu Bouchard matju at users.sourceforge.net
Thu Aug 31 13:07:57 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	desire.tk 
Log Message:
[bluify $c] replaced by [color_* [$self look bg]]


Index: desire.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v
retrieving revision 1.1.2.431
retrieving revision 1.1.2.432
diff -C2 -d -r1.1.2.431 -r1.1.2.432
*** desire.tk	31 Aug 2006 00:24:48 -0000	1.1.2.431
--- desire.tk	31 Aug 2006 11:07:55 -0000	1.1.2.432
***************
*** 541,545 ****
  
  set accels {}
- #foreach k [array names key] {dict set accels $key($k) $k}
  
  ################## set up main window #########################
--- 541,544 ----
***************
*** 3019,3032 ****
  ############ colouring
  
! proc bluify {colour} {
! 	global look
! 	scan $colour         #%02x%02x%02x r g b
! 	#scan [$self look sliderbg] #%02x%02x%02x R G B
! 	scan $look(Slider:bg) #%02x%02x%02x R G B
  	return [format #%02x%02x%02x [expr ($r*$R)>>8] [expr ($g*$G)>>8] [expr ($b*$B)>>8]]
  }
  
! proc darker {colour} {
! 	scan $colour #%02x%02x%02x r g b
  	set r [expr $r*3/4]
  	set g [expr $g*3/4]
--- 3018,3030 ----
  ############ colouring
  
! proc color_* {c1 c2} {
! 	scan $c1 #%02x%02x%02x r g b
! 	scan $c2 #%02x%02x%02x R G B
  	return [format #%02x%02x%02x [expr ($r*$R)>>8] [expr ($g*$G)>>8] [expr ($b*$B)>>8]]
  }
  
! # equivalent to color* #c0c0c0 $c
! proc darker {c} {
! 	scan $c #%02x%02x%02x r g b
  	set r [expr $r*3/4]
  	set g [expr $g*3/4]
***************
*** 3280,3284 ****
  	set xyb [list [expr $x2-1] [expr $y1+1] [expr $x1+1] [expr $y1+1] [expr $x1+1] [expr $y2-1]]
  	set xyc [list [expr $x2-1] [expr $y1+1] [expr $x2-1] [expr $y2-1] [expr $x1+1] [expr $y2-1]]
! 	set color [bluify [parse_color $@bcol]]
  	if {[$self selected?]} {set frcol [$self look selectframe]} {set frcol [$self look frame3]}
  	$self item BASE  rectangle $xya -fill $color -outline $frcol
--- 3278,3282 ----
  	set xyb [list [expr $x2-1] [expr $y1+1] [expr $x1+1] [expr $y1+1] [expr $x1+1] [expr $y2-1]]
  	set xyc [list [expr $x2-1] [expr $y1+1] [expr $x2-1] [expr $y2-1] [expr $x1+1] [expr $y2-1]]
! 	set color [color_* [$self look bg] [parse_color $@bcol]]
  	if {[$self selected?]} {set frcol [$self look selectframe]} {set frcol [$self look frame3]}
  	$self item BASE  rectangle $xya -fill $color -outline $frcol
***************
*** 3891,3895 ****
  	set l [expr [$self orient]?$@h:$@w]
  	set span [expr $@max-$@min]
! 	set color [bluify #ffffff]
  	if {[$self orient]} {
  		set size $@w
--- 3889,3893 ----
  	set l [expr [$self orient]?$@h:$@w]
  	set span [expr $@max-$@min]
! 	set color [$self look bg]
  	if {[$self orient]} {
  		set size $@w
***************
*** 4005,4015 ****
  	mset {x1 y1 x2 y2} [$self bbox]
  	if {$@flash} {
! 		.$@canvas.c itemconfigure ${self}BUT -fill [bluify [parse_color $@fcol]]
! 		after 100 [list .$@canvas.c itemconfigure ${self}BUT -fill [bluify [parse_color $@bcol]]]
  		set $@flash 0
  	} else {
  		set colour [parse_color $@bcol]
  		set rect [list [expr $x1+2] [expr $y1+2] [expr $x2-2] [expr $y2-2]]
! 		$self item BUT oval $rect -fill [bluify $colour] -tags "${self}BUT $self"
  	}
  }
--- 4003,4013 ----
  	mset {x1 y1 x2 y2} [$self bbox]
  	if {$@flash} {
! 		.$@canvas.c itemconfigure ${self}BUT -fill [color_* [look bg] [parse_color $@fcol]]
! 		after 100 [list .$@canvas.c itemconfigure ${self}BUT -fill [color_* [$self look bg] [parse_color $@bcol]]]
  		set $@flash 0
  	} else {
  		set colour [parse_color $@bcol]
  		set rect [list [expr $x1+2] [expr $y1+2] [expr $x2-2] [expr $y2-2]]
! 		$self item BUT oval $rect -fill [color_* [$self look bg] $colour] -tags "${self}BUT $self"
  	}
  }
***************
*** 4026,4031 ****
  	set @count $count
  	set @flash 1
! 	#.$@canvas.c itemconfigure ${self}BUT -fill [bluify [parse_color $@fcol]]
! 	#after 100 [list .$@canvas.c itemconfigure ${self}BUT -fill [bluify [parse_color $@bcol]]]
  }
  
--- 4024,4029 ----
  	set @count $count
  	set @flash 1
! 	#.$@canvas.c itemconfigure ${self}BUT -fill [color_* [$self look bg] [parse_color $@fcol]]
! 	#after 100 [list .$@canvas.c itemconfigure ${self}BUT -fill [color_* [$self look bg] [parse_color $@bcol]]]
  }
  
***************
*** 4042,4046 ****
  	set colour [parse_color $@bcol]
  	set t [expr int(($@w+29)/30)]
! 	set fill [bluify $colour]
  	set x3 [expr $x1+$t+2]; set y3 [expr $y1+$t+2]
  	set x4 [expr $x2-$t-2];	set y4 [expr $y2-$t-2]
--- 4040,4044 ----
  	set colour [parse_color $@bcol]
  	set t [expr int(($@w+29)/30)]
! 	set fill [color_* [$self look bg] $colour]
  	set x3 [expr $x1+$t+2]; set y3 [expr $y1+$t+2]
  	set x4 [expr $x2-$t-2];	set y4 [expr $y2-$t-2]
***************
*** 4048,4052 ****
  		set fill [parse_color $@fcol]
  	} {
! 		set fill [bluify [parse_color $@bcol]]
  	}
  	$self item X1 line [list $x3 $y3 [expr $x4+1] [expr $y4+1]] -width $t -fill $fill
--- 4046,4050 ----
  		set fill [parse_color $@fcol]
  	} {
! 		set fill [color_* [$self look bg] [parse_color $@bcol]]
  	}
  	$self item X1 line [list $x3 $y3 [expr $x4+1] [expr $y4+1]] -width $t -fill $fill
***************
*** 4100,4104 ****
  	set x3 [expr $x1+$@w/4]
  	set x4 [expr $x2-$@w/4]
! 	$self item BASE rectangle [list $x1 $y1 $x2 $y2] -width 0 -fill [bluify $colour]
  	for {set i 1} {$i<=40} {incr i} {
  		set y [expr $y1 + ($led_size+1)*(41-$i) - ($led_size+1)/2]
--- 4098,4102 ----
  	set x3 [expr $x1+$@w/4]
  	set x4 [expr $x2-$@w/4]
! 	$self item BASE rectangle [list $x1 $y1 $x2 $y2] -width 0 -fill [color_* [$self look bg] $colour]
  	for {set i 1} {$i<=40} {incr i} {
  		set y [expr $y1 + ($led_size+1)*(41-$i) - ($led_size+1)/2]
***************
*** 4121,4125 ****
  	}
  	set y [expr $y1 + ($led_size+1)*(41-$@value) - ($led_size+1)/2]
! 	$self item MASK rectangle [list $x3 $y1 $x4 $y] -width 0 -fill [bluify $colour]
  	set c [lindex $vu_col $@peak]
  	set y [expr $y1 + ($led_size+1)*(41-$@peak) - ($led_size+1)/2]
--- 4119,4123 ----
  	}
  	set y [expr $y1 + ($led_size+1)*(41-$@value) - ($led_size+1)/2]
! 	$self item MASK rectangle [list $x3 $y1 $x4 $y] -width 0 -fill [color_* [$self look bg] $colour]
  	set c [lindex $vu_col $@peak]
  	set y [expr $y1 + ($led_size+1)*(41-$@peak) - ($led_size+1)/2]





More information about the Pd-cvs mailing list