[etoys-dev] Etoys: Etoys-bf.30.mcz

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


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

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

Name: Etoys-bf.30
Author: bf
Time: 26 June 2010, 3:06:30 pm
UUID: d688099d-4cf2-4bf6-bf35-ce490d257df2
Ancestors: Etoys-kfr.29

- fix color component accessing (SQ-627)
- move them from WS-Sound package to Etoys package

=============== Diff against Etoys-kfr.29 ===============

Item was added:
+ ----- Method: Player>>getHue (in category 'slots-color components') -----
+ getHue
+ 	| hue |
+ 	hue := self getColor hue.
+ 	^ hue > 180
+ 		ifTrue: [-360 + hue]
+ 		ifFalse: [hue]!

Item was added:
+ ----- Method: Player>>getGreen (in category 'slots-color components') -----
+ getGreen
+ 	^ self getColor green * 100!

Item was added:
+ ----- Method: Player>>setBrightness: (in category 'slots-color components') -----
+ setBrightness: aFloat 
+ 	"Set the brightness of my costume, if appropriate."
+ 
+ 	| aColor aValue |
+ 	aColor := self getColor.
+ 	aValue := (aFloat / 100 max: 0) min: 1.
+ 	self setColor: (Color
+ 		h: aColor hue
+ 		s: aColor saturation
+ 		v: aValue
+ 		alpha: aColor alpha)!

Item was added:
+ ----- Method: Player>>setHue: (in category 'slots-color components') -----
+ setHue: aFloat
+ 	"Set the hue of my costume, if appropriate."
+ 
+ 	| aColor aValue |
+ 	aColor := self getColor.
+ 	aValue := aFloat \\ 360.
+ 	self setColor: (Color
+ 		h: aValue
+ 		s: aColor saturation
+ 		v: aColor brightness
+ 		alpha: aColor alpha)!

Item was added:
+ ----- Method: Player>>setRed: (in category 'slots-color components') -----
+ setRed: aFloat
+ 	"Set the red component of my costume, if appropriate."
+ 
+ 	| aColor aValue |
+ 	aColor := self getColor.
+ 	aValue := (aFloat / 100 max: 0) min: 1.
+ 	self setColor: (Color
+ 		r: aValue
+ 		g: aColor green
+ 		b: aColor blue
+ 		alpha: aColor alpha)!

Item was added:
+ ----- Method: Player>>getRed (in category 'slots-color components') -----
+ getRed
+ 	^ self getColor red * 100!

Item was changed:
+ ----- Method: Player>>getAlpha (in category 'slots-color components') -----
- ----- Method: Player>>getAlpha (in category 'slot getters/setters') -----
  getAlpha
+ 	^ self getColor alpha * 100!
- 	^ self costume renderedMorph color alpha * 100!

Item was added:
+ ----- Method: Player>>getBlue (in category 'slots-color components') -----
+ getBlue
+ 	^ self getColor blue * 100!

Item was added:
+ ----- Method: Player>>getSaturation (in category 'slots-color components') -----
+ getSaturation
+ 	^ self getColor saturation * 100!

Item was added:
+ ----- Method: Player>>setBlue: (in category 'slots-color components') -----
+ setBlue: aFloat
+ 	"Set the blue component of my costume, if appropriate."
+ 
+ 	| aColor aValue |
+ 	aColor := self getColor.
+ 	aValue := (aFloat / 100 max: 0) min: 1.
+ 	self setColor: (Color
+ 		r: aColor red
+ 		g: aColor green
+ 		b: aValue
+ 		alpha: aColor alpha)!

Item was added:
+ ----- Method: Player>>setSaturation: (in category 'slots-color components') -----
+ setSaturation: aFloat 
+ 	"Set the saturation of my costume, if appropriate."
+ 
+ 	| aColor aValue |
+ 	aColor := self getColor.
+ 	aValue := (aFloat / 100 max: 0) min: 1.
+ 	self setColor: (Color
+ 		h: aColor hue
+ 		s: aValue
+ 		v: aColor brightness
+ 		alpha: aColor alpha)!

Item was added:
+ ----- Method: Player>>getBrightness (in category 'slots-color components') -----
+ getBrightness
+ 	^ self getColor brightness * 100!

Item was changed:
+ ----- Method: Player>>setAlpha: (in category 'slots-color components') -----
- ----- Method: Player>>setAlpha: (in category 'slot getters/setters') -----
  setAlpha: aFloat
  	"Set the alpha component of my costume, if appropriate."
  
+ 	| aColor aValue |
+ 	aColor := self getColor.
+ 	aValue := (aFloat / 100 max: 0) min: 1.
+ 	self setColor: (Color
+ 		r: aColor red
+ 		g: aColor green
+ 		b: aColor blue
+ 		alpha: aValue)!
- 	| 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: aColor blue
- 				alpha: aValue)]!

Item was added:
+ ----- Method: Player>>setGreen: (in category 'slots-color components') -----
+ setGreen: aFloat
+ 	"Set the green component of my costume, if appropriate."
+ 
+ 	| aColor aValue |
+ 	aColor := self getColor.
+ 	aValue := (aFloat / 100 max: 0) min: 1.
+ 	self setColor: (Color
+ 		r: aColor red
+ 		g: aValue
+ 		b: aColor blue
+ 		alpha: aColor alpha)!



More information about the etoys-dev mailing list