This is so silly, but I am not able to understand how to add an image to a
candy stage. Here is the code I used:
kaa.candy.init()
window_size = (1360, 768)
stage = kaa.candy.Stage(window_size)
img = kaa.candy.widgets.Image(None, None, skin.get_background_image())
stage.add(img)
And here is what I get:
(/home/chandanp/workspace/python/newvo/src/main.py:5515): Clutter-CRITICAL
**: texture_init_tiles: assertion `x_pot != 0 || y_pot != 0' failed
(/home/chandanp/workspace/python/newvo/src/main.py:5515): Clutter-CRITICAL
**: texture_upload_data: assertion `priv->x_tiles != NULL && priv->y_tiles
!= NULL' failed
But I try to add the image using candyxml it works fine. Here is that code:
kaa.candy.init()
window_size = (1360, 768)
stage = kaa.candy.Stage(window_size)
xml = '''
<candyxml geometry='800x600'>
<image name='background' url='$filename'/>
</candyxml>
'''
layout = stage.candyxml(xml)[1]
img_context =
dict(filename='/home/chandanp/workspace/python/newvo/res/images/royale/background.jpg')
stage.add(layout.image.background, context=img_context)
What am I doing wrong?
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel