[Newbies] Fading out a morph

patrick dudjalija patrick.dudjalija at gmail.com
Thu Jul 19 13:23:03 UTC 2012


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.

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.

].
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20120719/11a5f0cf/attachment.htm


More information about the Beginners mailing list