From 3fab04805ea4b7ae584fcfe425bc8355a64d2c36 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Tue, 1 Mar 2011 19:52:43 +0000 Subject: [PATCH] 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 --- clutter/clutter-actor-private.h | 1 + clutter/clutter-actor.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/clutter/clutter-actor-private.h b/clutter/clutter-actor-private.h index 37bd7d560..b59800852 100644 --- a/clutter/clutter-actor-private.h +++ b/clutter/clutter-actor-private.h @@ -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); diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index b2ea1100e..92990bb51 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -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