[etoys-dev] Etoys: WS-Sound-bf.3.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jun 26 09:07:41 EDT 2010


Bert Freudenberg uploaded a new version of WS-Sound to project Etoys:
http://source.squeak.org/etoys/WS-Sound-bf.3.mcz

==================== Summary ====================

Name: WS-Sound-bf.3
Author: bf
Time: 26 June 2010, 3:07:35 pm
UUID: 7b8e6812-b159-4277-b93b-7687cd5ed010
Ancestors: WS-Sound-kfr.2

- move  color component accessors from WS-Sound package to Etoys package

=============== Diff against WS-Sound-kfr.2 ===============

Item was removed:
- ----- Method: Player>>setRed: (in category '*WS-Sound-Slots') -----
- setRed: aFloat
- 	"Set the red component of my costume, if appropriate."
- 
- 	| aMorph aValue aColor |
- 	aMorph := self costume renderedMorph.
- 	(aColor := aMorph color) isColor ifTrue:
- 		[aValue := (aFloat / 100 max: 0) min: 1.
- 		aMorph color:
- 			 (Color
- 				r: aValue
- 				g: aColor green
- 				b: aColor blue
- 				alpha: aColor alpha)]!

Item was removed:
- ----- Method: Player>>getBrightness (in category '*WS-Sound-Slots') -----
- getBrightness
- 	^ self costume renderedMorph color brightness * 100!

Item was removed:
- ----- Method: Player>>getBlue (in category '*WS-Sound-Slots') -----
- getBlue
- 	^ self costume renderedMorph color blue * 100!

Item was removed:
- ----- Method: Player>>setSaturation: (in category '*WS-Sound-Slots') -----
- setSaturation: aFloat 
- 	"Set the saturation of my costume, if appropriate."
- 
- 	| aMorph aValue aColor  |
- 	aMorph := self costume renderedMorph.
- 	(aColor := aMorph color) isColor ifTrue:
- 		[aValue := (aFloat / 100 max: 0) min: 1.
- 		aMorph color:
- 			(Color
- 				h: aColor hue
- 				s: aValue
- 				v: aColor brightness)]!

Item was removed:
- ----- Method: Player>>getSaturation (in category '*WS-Sound-Slots') -----
- getSaturation
- 	^ self costume renderedMorph color saturation * 100!

Item was removed:
- ----- Method: Player>>setGreen: (in category '*WS-Sound-Slots') -----
- setGreen: aFloat
- 	"Set the green component of my costume, if appropriate."
- 
- 	| aMorph aValue aColor |
- 	aMorph := self costume renderedMorph.
- 	(aColor := aMorph color) isColor ifTrue:
- 		[aValue := (aFloat / 100 max: 0) min: 1.
- 		aMorph color:
- 			(Color
- 				r: aColor red
- 				g: aValue
- 				b: aColor blue
- 				alpha: aColor alpha)]!

Item was removed:
- ----- Method: Player>>setBlue: (in category '*WS-Sound-Slots') -----
- setBlue: aFloat
- 	"Set the blue component of my costume, if appropriate."
- 
- 	| aMorph aValue aColor  |
- 	aMorph := self costume renderedMorph.
- 	(aColor := aMorph color) isColor ifTrue:
- 		[aValue := (aFloat / 100 max: 0) min: 1.
- 		aMorph color:
- 			(Color
- 				r: aColor red
- 				g: aColor green
- 				b: aValue
- 				alpha: aColor alpha)]!

Item was removed:
- ----- Method: Player>>getHue (in category '*WS-Sound-Slots') -----
- getHue
- 	| hue |
- 	hue _ self costume  renderedMorph color hue.
- 	^ hue > 180
- 		ifTrue: [-360 + hue]
- 		ifFalse: [hue]!

Item was removed:
- ----- Method: Player>>setBrightness: (in category '*WS-Sound-Slots') -----
- setBrightness: aFloat 
- 	"Set the brightness of my costume, if appropriate."
- 
- 	| aMorph aValue aColor  |
- 	aMorph := self costume renderedMorph.
- 	(aColor := aMorph color) isColor ifTrue:
- 		[aValue := (aFloat / 100 max: 0) min: 1.
- 		aMorph color:
- 			(Color
- 				h: aColor hue
- 				s: aColor saturation
- 				v: aValue)]!

Item was removed:
- ----- Method: Player>>getGreen (in category '*WS-Sound-Slots') -----
- getGreen
- 	^ self costume renderedMorph color green * 100!

Item was removed:
- ----- Method: Player>>getRed (in category '*WS-Sound-Slots') -----
- getRed
- 	^ self costume renderedMorph color red * 100!

Item was removed:
- ----- Method: Player>>setHue: (in category '*WS-Sound-Slots') -----
- setHue: aFloat
- 	"Set the hue of my costume, if appropriate."
- 
- 	| aMorph aValue aColor  |
- 	aMorph := self costume renderedMorph.
- 	(aColor := aMorph color) isColor ifTrue:
- 		[aValue := aFloat \\ 360.
- 		aMorph color:
- 			(Color
- 				h: aValue
- 				s: aColor saturation
- 				v: aColor brightness)]!



More information about the etoys-dev mailing list