[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Bug with ARGB32 buffer canvas when stride != output width * 4



On Mon, 2006-04-03 at 23:53 -0400, Jason Tackaberry wrote:
>    movie.osd.add_child(kaa.canvas.Text("Hello E!"))
>    movie.osd.show() # osd is hidden by default

Oh, another cool feature of kaa.canvas is the animation engine.  So if
you want to fade the OSD in:

   # Start fully transparent
   movie.osd.set_opacity(0)
   # Set visible
   movie.osd.show()
   # Animate to fully opaque in 0.5 seconds.
   movie.animate("opacity", opacity=1, duration=0.5)

Or maybe you want to crossfade two images for 2 seconds.  (image1 is
visible, image2 is currently set to opacity=0):

   image1.animate("opacity", opacity=0, duration=2)
   image2.animate("opacity", opacity=1, duration=2)

SVG is supported too:

   i = movie.osd.add_child(kaa.canvas.Image("vectors.svg"))

If you increase the size of an SVG image, it will rerender the SVG (can
be optionally disabled):

   i.resize(width="100%")  # aspect ratio is maintained by default

MNG is also supported:

   i = movie.osd.add_child(kaa.canvas.Image("animated.mng"))

Nothing else needs to be done; the mng is now being animated on the
canvas.

Maybe we want to stop the animation in 5 seconds:

   kaa.notifier.OneShotTimer(i.stop).start(5)

So the api offers a lot of additional stuff that's not supported by
evas.  Another thing is clipping of text objects so that it fades the
text out instead of abruptly clipping.  (This is currently an ugly hack
because it uses Imlib2, so I'm definitely keen to learn when evas allows
this natively.)

Jason.