Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.155.mcz
==================== Summary ====================
Name: MorphicExtras-mt.155 Author: mt Time: 3 March 2015, 9:29:08.112 pm UUID: c74a5771-8891-9640-9476-7dfdaf3c6f38 Ancestors: MorphicExtras-bf.154
Extended animated image morph so that it can be used with forms coming from animated gifs that only store diff/delta-frames.
=============== Diff against MorphicExtras-bf.154 ===============
Item was changed: ImageMorph subclass: #AnimatedImageMorph + instanceVariableNames: 'images delays stepTime nextTime imageIndex formsAreDiffs' - instanceVariableNames: 'images delays stepTime nextTime imageIndex' classVariableNames: '' poolDictionaries: '' category: 'MorphicExtras-AdditionalMorphs'!
!AnimatedImageMorph commentStamp: '<historical>' prior: 0! I am an ImageMorph that can hold more than one image. Each image has its own delay time.!
Item was added: + ----- Method: AnimatedImageMorph>>formsAreDiffs (in category 'accessing') ----- + formsAreDiffs + "Should the forms be drawn on top of each other to produce the frame?" + ^ formsAreDiffs ifNil: [false]!
Item was added: + ----- Method: AnimatedImageMorph>>formsAreDiffs: (in category 'accessing') ----- + formsAreDiffs: aBoolean + + formsAreDiffs := aBoolean. + self reset.!
Item was changed: ----- Method: AnimatedImageMorph>>fromReader: (in category 'private') ----- fromReader: reader + images := reader forms. delays := reader delays. + self reset.! - imageIndex := 0. - self image: (Form extent: images first extent depth: 32). - self step!
Item was added: + ----- Method: AnimatedImageMorph>>reset (in category 'private') ----- + reset + + imageIndex := 0. + self image: (Form extent: images first extent depth: 32). + self step.!
Item was changed: ----- Method: AnimatedImageMorph>>step (in category 'stepping and presenter') ----- step + | d next | - | d | images isEmpty ifTrue: [^ self]. nextTime > Time millisecondClockValue ifTrue: [^self]. self changed . + next := images at: (imageIndex := imageIndex \ images size + 1). + self formsAreDiffs + ifFalse: [self image: next] + ifTrue: [self image getCanvas translucentImage: next at: next offset].. - self image: (images at: - (imageIndex := imageIndex \ images size + 1)). self changed . d := (delays at: imageIndex) ifNil: [0]. nextTime := Time millisecondClockValue + d !
squeak-dev@lists.squeakfoundation.org