Karl Ramberg uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-kfr.145.mcz ==================== Summary ==================== Name: Etoys-kfr.145 Author: kfr Time: 4 December 2012, 9:42:14 pm UUID: 8e24c94e-c24d-be48-adab-d8c6b19d4c04 Ancestors: Etoys-kfr.144 Change the graphic filters to use slots instead of commands =============== Diff against Etoys-kfr.144 =============== Item was removed: - ----- Method: Player>>blur: (in category 'sketch filters') ----- - blur: aNumber - self sendMessageToCostume: #filtersAdd: with: { #blur:form: . aNumber}! Item was removed: - ----- Method: Player>>brightnessShift: (in category 'sketch filters') ----- - brightnessShift: aNumber - self sendMessageToCostume: #filtersAdd: with: { #brightnessShift:form: . aNumber}! Item was removed: - ----- Method: Player>>fishEye: (in category 'sketch filters') ----- - fishEye: aNumber - self sendMessageToCostume: #filtersAdd: with: { #fishEye:form: . aNumber}! Item was added: + ----- Method: Player>>getBlur (in category 'sketch filters') ----- + getBlur + ^ self getFilterValue: #blur:form:! Item was added: + ----- Method: Player>>getBrightnessShift (in category 'sketch filters') ----- + getBrightnessShift + ^ self getFilterValue: #brightnessShift:form:! Item was added: + ----- Method: Player>>getFilterValue: (in category 'sketch filters') ----- + getFilterValue: aFilter + self costume filters + do: [:i | (i includes: aFilter) + ifTrue: [^i second]]. + ^0! Item was added: + ----- Method: Player>>getHueShift (in category 'sketch filters') ----- + getHueShift + ^ self getFilterValue: #hueShift:form:! Item was added: + ----- Method: Player>>getSaturationShift (in category 'sketch filters') ----- + getSaturationShift + ^ self getFilterValue: #saturationShift:form:! Item was added: + ----- Method: Player>>getWhirl (in category 'sketch filters') ----- + getWhirl + ^ self getFilterValue: #whirl:form:! Item was removed: - ----- Method: Player>>hueShift: (in category 'sketch filters') ----- - hueShift: aNumber - self sendMessageToCostume: #filtersAdd: with: {#hueShift:form:. aNumber}! Item was removed: - ----- Method: Player>>saturationShift: (in category 'sketch filters') ----- - saturationShift: aNumber - self sendMessageToCostume: #filtersAdd: with: { #saturationShift:form: . aNumber}! Item was added: + ----- Method: Player>>setBlur: (in category 'sketch filters') ----- + setBlur: aNumber + self sendMessageToCostume: #filtersAdd: with: { #blur:form: . aNumber}! Item was added: + ----- Method: Player>>setBrightnessShift: (in category 'sketch filters') ----- + setBrightnessShift: aNumber + self sendMessageToCostume: #filtersAdd: with: { #brightnessShift:form: . aNumber}! Item was added: + ----- Method: Player>>setFishEye: (in category 'sketch filters') ----- + setFishEye: aNumber + self sendMessageToCostume: #filtersAdd: with: { #fishEye:form: . aNumber}! Item was added: + ----- Method: Player>>setHueShift: (in category 'sketch filters') ----- + setHueShift: aNumber + self sendMessageToCostume: #filtersAdd: with: {#hueShift:form:. aNumber}! Item was added: + ----- Method: Player>>setSaturationShift: (in category 'sketch filters') ----- + setSaturationShift: aNumber + self sendMessageToCostume: #filtersAdd: with: { #saturationShift:form: . aNumber}! Item was added: + ----- Method: Player>>setWhirl: (in category 'sketch filters') ----- + setWhirl: aNumber + self sendMessageToCostume: #filtersAdd: with: { #whirl:form: . aNumber}! Item was removed: - ----- Method: Player>>whirl: (in category 'sketch filters') ----- - whirl: aNumber - self sendMessageToCostume: #filtersAdd: with: { #whirl:form: . aNumber}! Item was changed: ----- Method: SketchMorph class>>additionsToViewerCategoryGraphicsFilters (in category '*eToys-scripting') ----- additionsToViewerCategoryGraphicsFilters "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 filters' ( + (slot hueShift 'Shift the hue of the pictures colors. -180 to 180' Number readWrite Player getHueShift Player setHueShift:) + (slot brightnessShift 'Shift the brightness of the picture -100 to 100' Number readWrite Player getBrightnessShift Player setBrightnessShift:) + (slot saturationShift 'Shift the saturation of the pictures colors -100 to 100' Number readWrite Player getSaturationShift Player setSaturationShift:) + (slot blur 'Blur the picture. 1 to 10' Number readWrite Player getBlur Player setBlur:) + (slot fishEye 'Make a fish eye effect on the picture. -10 and up' Number readWrite Player getFishEye Player setFishEye:) + (slot whirl 'Make a whirl effect on the picture.' Number readWrite Player getWhirl Player setWhirl:) - (command hueShift: 'Shift the hue of the pictures colors. -180 to 180' Number) - (command brightnessShift: 'Shift the brightness of the picture -100 to 100' Number) - (command saturationShift: 'Shift the saturation of the pictures colors -100 to 100' Number) - (command blur: 'Blur the picture. 1 to 10' Number) - (command fishEye: 'Make a fish eye effect on the picture. -10 and up' Number) - (command whirl: 'Make a whirl effect on the picture.' Number) (command removeFilters 'Remove the picture filters' ) )) ! _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Free forum by Nabble | Edit this page |