Commit Graph

6 Commits

Author SHA1 Message Date
Emmanuele Bassi
41bb03da2d Use the new macros for adding private data 2013-07-03 18:04:32 +01:00
Emmanuele Bassi
b658023324 property-transition: Lazily convert the interpolated value
If the Interval used has a different type than the property we are
animating through a PropertyTransition then we should transform the
interpolated value before applying it, to avoid warnings down the
line.
2012-06-18 22:21:14 +01:00
Emmanuele Bassi
b21cb29479 property-transition: Verify the interval on compute_value()
By checking if the interval is valid inside compute_value() we can catch
the cases where the interval values of a PropertyTransition are set
after the transition has been added to an Animatable instance - i.e. the
following code:

  let transition = new Clutter.PropertyTransition();
  transition.set_property_name('opacity');
  actor.add_transition('opacityAnim', transition);
  transition.set_to_value(0);

should be equivalent to:

  let transition = new Clutter.PropertyTransition();
  transition.set_property_name('opacity');
  transition.set_to_value(0);
  actor.add_transition('opacityAnim', transition);

instead of emitting a warning.
2012-06-08 17:33:30 +01:00
Emmanuele Bassi
7660f5d0c6 transition: Use current values if no interval is defined
Once a ClutterPropertyTransition is attached to a ClutterAnimatable, if
no interval is set we can simply use the current state of the property
to define the from and to values. This allows the creation of property
transitions from the current state of the Animatable instance without
excessive verbosity.
2012-06-08 14:33:01 +01:00
Emmanuele Bassi
15952f26cb property-transition: Remove animatable from the ctor
Should not have been there in the first place: the animatable will be
set either using ClutterTransition API, or when adding the transition
to a ClutterActor.
2012-03-20 11:59:32 +00:00
Emmanuele Bassi
40bcbf9c0d Add ClutterPropertyTransition
ClutterPropertyTransition is a ClutterTransition that animates a
property of a ClutterAnimatable implementation.
2012-03-15 17:01:12 +00:00