A new version of Morphic was added to project Etoys Inbox:
http://source.squeak.org/etoysinbox/Morphic-kfr.71.mcz ==================== Summary ==================== Name: Morphic-kfr.71 Author: kfr Time: 2 November 2011, 10:58:58 am UUID: 04bd43aa-9c96-9745-89c1-6ddf69c57a23 Ancestors: Morphic-kfr.70 Fixing stuff. Cleaning up code. =============== Diff against Morphic-kfr.70 =============== Item was changed: ----- Method: SketchMorph>>blur:form: (in category 'filters') ----- + blur: aWidth form: filteredForm - blur: width form: filteredForm + | f fOut fWidth | - | f fOut | f := filteredForm asFormOfDepth: 32. + fWidth := f width + (aWidth - 1) max: f width. - f width + width = 0 ifTrue:[^ filteredForm]. fOut := f deepCopy. + ScratchPlugin primBlur: f bits into: fOut bits width: fWidth. - ScratchPlugin primBlur: f bits into: fOut bits width: f width + width. ^ fOut asFormOfDepth: 16. ! Item was changed: ----- Method: SketchMorph>>brightnessShift:form: (in category 'filters') ----- + brightnessShift: aShift form: filteredForm - brightnessShift: shift form: filteredForm + | f fOut shift | + shift := aShift min: 100 max: -100. - | f fOut | f := filteredForm asFormOfDepth: 32. fOut := f deepCopy. ScratchPlugin primShiftBrightness: f bits into: fOut bits by: shift. ^ fOut asFormOfDepth: 16. ! Item was changed: ----- Method: SketchMorph>>filters (in category 'filters') ----- filters + ^filters ifNil:[filters := OrderedCollection new]. + ! - filters ifNil:[filters := OrderedCollection new]. - ^filters! Item was changed: ----- Method: SketchMorph>>filtersAdd: (in category 'filters') ----- + filtersAdd: aFilterWithValue - filtersAdd: aFilterWithValue + self filters + do: [:i | (i includes: aFilterWithValue first) + ifTrue: [filters remove: i]]. + filters add: aFilterWithValue. + self layoutChanged! - - self filters. - filters do: [ : i | (i includes: aFilterWithValue first) ifTrue: [filters remove: i]]. - filters add: aFilterWithValue. - self generateRotatedForm. - self layoutChanged - - - ! Item was changed: ----- Method: SketchMorph>>hueShift:form: (in category 'filters') ----- + hueShift: aShift form: filteredForm - hueShift: shift form: filteredForm + | f fOut shift | + shift := aShift min: 180 max: -180. - | f fOut | f := filteredForm asFormOfDepth: 32. fOut := f deepCopy. ScratchPlugin primShiftHue: f bits into: fOut bits byDegrees: shift. ^ fOut asFormOfDepth: 16. ! Item was changed: ----- Method: SketchMorph>>removeFilters (in category 'filters') ----- removeFilters filters := nil. - self generateRotatedForm. self layoutChanged ! Item was changed: ----- Method: SketchMorph>>saturationShift:form: (in category 'filters') ----- + saturationShift: aShift form: filteredForm - saturationShift: shift form: filteredForm + | f fOut shift | + shift := aShift min: 100 max: -100. - | f fOut | f := filteredForm asFormOfDepth: 32. fOut := f deepCopy. ScratchPlugin primShiftSaturation: f bits into: fOut bits by: shift. ^ fOut asFormOfDepth: 16. ! _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Free forum by Nabble | Edit this page |