clutter-actor: Add an internal _clutter_actor_get_opacity_override

This is needed if an effect wants to temporarily override the paint
opacity. It needs to be able to restore the old opacity override in
the post_paint handler otherwise it would replace the effect of the
opacity override from any outer effects.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2541
This commit is contained in:
Neil Roberts 2011-03-01 19:52:43 +00:00
parent 0c576c0c33
commit 3fab04805e
2 changed files with 9 additions and 0 deletions

View File

@ -131,6 +131,7 @@ void _clutter_actor_rerealize (ClutterActor *self,
void _clutter_actor_set_opacity_override (ClutterActor *self,
gint opacity);
gint _clutter_actor_get_opacity_override (ClutterActor *self);
void _clutter_actor_set_in_clone_paint (ClutterActor *self,
gboolean is_in_clone_paint);

View File

@ -10192,6 +10192,14 @@ _clutter_actor_set_opacity_override (ClutterActor *self,
self->priv->opacity_override = opacity;
}
gint
_clutter_actor_get_opacity_override (ClutterActor *self)
{
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), -1);
return self->priv->opacity_override;
}
/* Allows you to disable applying the actors model view transform during
* a paint. Used by ClutterClone. */
void