[Newbies] Fading out a morph

Tobias Pape Das.Linux at gmx.de
Thu Jul 19 13:33:53 UTC 2012


Am 19.07.2012 um 15:23 schrieb patrick dudjalija:

> Hello everyone !
>  
> I found a way to fade out a morph via the BitBlt class.
> Problem is with the code line "(Duration seconds:1) asDelay wait."
> When this line is present, i don't see the intermediary states, only the final result.
> But i need wait time at each iteration of BitBlt copyBits, precisely to visualize the fading out ...
>  
> see code below.

this should probably done in the stepping of the morph.

>  
> Thank you very much for any help ...

>  
> Patrick
>  
>  
> |s|
> s:=SketchMorph fromStream: (FileStream readOnlyFileNamed:'.\images\LesPetitesBetes\abeille.png').
> 
> s openInWorld.
> 
> s center:Display center.
> 
> 1 to: 10 do: [:el|
> 
> (Duration seconds:1) asDelay wait.
> 
> (BitBlt
> destForm: s form
> sourceForm: nil
> halftoneForm: ((Color white) alpha:0.2)
> combinationRule:24
> destOrigin:0 at 0
> sourceOrigin:0 at 0
> extent:(s extent)
> clipRect: ((0 at 0) extent: (s extent)) ) copyBits.
> 
> ].

You probably want to check out the animations Package of
Marcel:

https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/animations


Best
	-Tobias


More information about the Beginners mailing list