[etoys-dev] Etoys: Etoys-kfr.95.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Oct 24 14:00:10 EDT 2011


Karl Ramberg uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-kfr.95.mcz

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

Name: Etoys-kfr.95
Author: kfr
Time: 24 October 2011, 7:59:23 pm
UUID: 238320d7-b378-a746-892f-c4a910ffa21d
Ancestors: Etoys-bf.94

Add blur: brightness: satruation: and hue: to graphics category. Now possible to play a little with picture colors etc.

=============== Diff against Etoys-bf.94 ===============

Item was added:
+ ----- Method: Player>>blur: (in category '*Etoys-Scratch') -----
+ blur: aWidth 
+ 	| f fOut |
+ 	f := self getGraphic asFormOfDepth: 32.
+ 	fOut := f bits copy.
+ 	ScratchPlugin
+ 		primBlur: f bits
+ 		into: fOut
+ 		width: f width + aWidth.
+ 	f bits: fOut.
+ 	self
+ 		setGraphic: (f asFormOfDepth: 16)!

Item was added:
+ ----- Method: Player>>brightness: (in category '*Etoys-Scratch') -----
+ brightness: aNumber 
+ 	| f fOut |
+ 	f := self getGraphic asFormOfDepth: 32.
+ 	fOut := f deepCopy.
+ 	ScratchPlugin
+ 		primShiftBrightness: f bits
+ 		into: fOut bits
+ 		by: aNumber.
+ 	self
+ 		setGraphic: (fOut asFormOfDepth: 16)!

Item was added:
+ ----- Method: Player>>hue: (in category '*Etoys-Scratch') -----
+ hue: aDegree 
+ 	| f fOut degree |
+ 	degree := aDegree.
+ 	degree > 180
+ 		ifTrue: [degree := -360 + degree].
+ 	f := self getGraphic asFormOfDepth: 32.
+ 	fOut := f deepCopy.
+ 	ScratchPlugin
+ 		primShiftHue: f bits
+ 		into: fOut bits
+ 		byDegrees: degree.
+ 	self
+ 		setGraphic: (fOut asFormOfDepth: 16)!

Item was added:
+ ----- Method: Player>>saturation: (in category '*Etoys-Scratch') -----
+ saturation: aNumber 
+ 	| f fOut |
+ 	f := self getGraphic asFormOfDepth: 32.
+ 	fOut := f deepCopy.
+ 	ScratchPlugin
+ 		primShiftSaturation: f bits
+ 		into: fOut bits
+ 		by: aNumber.
+ 	self
+ 		setGraphic: (fOut asFormOfDepth: 16)!

Item was changed:
  ----- Method: SketchMorph class>>additionsToViewerCategories (in category '*eToys-scripting') -----
  additionsToViewerCategories
+ 	^ #(#(#graphics #(#(#slot #graphic 'The picture currently being worn' #Graphic #readWrite #Player #getGraphic #Player #setGraphic:) #(#command #wearCostumeOf: 'wear the costume of...' #Player) #(#slot #baseGraphic 'The picture originally painted for this object, but can subsequently be changed via menu or script' #Graphic #readWrite #Player #getBaseGraphic #Player #setBaseGraphic:) #(#command #restoreBaseGraphic 'Make my picture be the one I remember in my baseGraphic') #(#slot #rotationStyle 'How the picture should change when the heading is modified' #RotationStyle #readWrite #Player #getRotationStyle #Player #setRotationStyle:) #(#command #flipLeftRight 'Flip the picture left to right' #Player) #(#command #flipUpDown 'Flip the picture upside down' #Player) #(#command #blur: 'blur the image...' #Number) #(#command #hue: 'change color hue degree...' #Number) #(#command #brightness: 'change color brightness...' #Number) #(#command #saturation: 'change color saturation...' #Number))) )!
- 	"Answer a list of (<categoryName> <list of category specs>) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories."
- 
- 	^ #((graphics (
- (slot graphic 	'The picture currently being worn' Graphic	 readWrite Player getGraphic Player setGraphic:)
- (command wearCostumeOf: 'wear the costume of...' Player)
- (slot baseGraphic 	'The picture originally painted for this object, but can subsequently be changed via menu or script' Graphic	 readWrite Player getBaseGraphic Player setBaseGraphic:)
- (command restoreBaseGraphic 'Make my picture be the one I remember in my baseGraphic')
- 
- (slot rotationStyle 'How the picture should change when the heading is modified' RotationStyle readWrite Player getRotationStyle Player setRotationStyle:)
- (command flipLeftRight 'Flip the picture left to right' Player)
- (command flipUpDown 'Flip the picture upside down' Player)
- )))
- 
- 
- !



More information about the etoys-dev mailing list