Using Clutter 0.8.6, here's what I did: texture = clutter_texture_new (); clutter_container_add_actor (container, texture); clutter_actor_hide (texture); clutter_texture_set_from_file (...); // actor is now visible
Looking behind the scenes, adding it to the container makes it MAPPED, and set_cogl_texture within set_from_file make it REALIZED, therefore it becomes VISIBLE.
But this seems very unintuitive to the API user who is shielded from these details. I suspect fixing this might require an extra variable to track what the user _wants_ the state to be, so maybe it's better just to document the side effect of set_from_file?
My apologies if this is already addressed in later code. If I just hide the actor again after the set_from_file call, I can work around this, so I don't have a direct need to dig deeper.
- Geoff -- To unsubscribe send a mail to [email protected]
