[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Need an animation example in korundums' ksprite?

meruby

4/8/2005 2:58:00 AM

I like to create an animation program using korundums' ksprite class.
It has some nice things like moveto and notify signal and such. I tried
to find some simple example to do this without any success. Can
somebody show a simple example?

2 Answers

Richard Dale

4/8/2005 1:15:00 PM

0

meruby@gmail.com wrote:

> I like to create an animation program using korundums' ksprite class.
> It has some nice things like moveto and notify signal and such. I tried
> to find some simple example to do this without any success. Can
> somebody show a simple example?
KSprite is in the kdegames module, so it isn't currently in the Korundum
runtime. There are some examples of QCanvas programming in qtruby, but I
don't know how much the KSprite api improves on that.

-- Richard

meruby

4/8/2005 2:12:00 PM

0

KSprite has moveto and notify signal method which is very handy when
you are animating many objects which changes its direction/speed at
different points in time. Together with KSpriteCache, your animation
will be faster too.

Description of

moveto:
Moves the sprite to the given position with the given speed. When it
reaches its desitnation a signal is emmited if the emmiter createNotify
is enabled

createNotify:
Creates a notification object. You can connect to it and it will emit
the signal signalNotify(QCanvasItem *parent, intmode) when a move or
animation is finished.


How about a Qcanvas animation example which will move images along some
random line? I will try to hack one from pyqt if and will post it here
if nobody will come out with one.

Thanks.