2008-02-11 Matthew Allum <mallum@openedhand.com>

* clutter/clutter-actor.c:
        Minor documentation tweak to class description.

        * clutter/clutter-behaviour-scale.c:
        'Force' start + end vals of scale behaviour
        (#779, Havoc Pennington)
This commit is contained in:
Matthew Allum 2008-02-11 20:31:16 +00:00
parent bab8b24aed
commit 3ef9e235ef
3 changed files with 37 additions and 9 deletions

View File

@ -1,3 +1,12 @@
2008-02-11 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-actor.c:
Minor documentation tweak to class description.
* clutter/clutter-behaviour-scale.c:
'Force' start + end vals of scale behaviour
(#779, Havoc Pennington)
2008-02-11 Emmanuele Bassi <ebassi@openedhand.com>
* README:

View File

@ -2376,7 +2376,8 @@ clutter_actor_set_size_internalu (ClutterActor *self,
* <note>This function is a "request" to the #ClutterActor. Depending
* on the actual implementation, calling clutter_actor_set_size() might
* not produce visible results. Calling this function on a #ClutterGroup,
* for instance, will not resize the group.</note>
* for instance, will not resize the group - as its size is dependant
* on bounding box of actual contents</note>
*/
void
clutter_actor_set_size (ClutterActor *self,

View File

@ -93,11 +93,28 @@ clutter_behaviour_scale_alpha_notify (ClutterBehaviour *behave,
guint32 alpha_value)
{
ClutterBehaviourScalePrivate *priv;
ClutterFixed scale_x, scale_y, factor;
ClutterFixed scale_x, scale_y;
ScaleFrameClosure closure = { 0, };
priv = CLUTTER_BEHAVIOUR_SCALE (behave)->priv;
/* Fix the start/end values, avoids potential rounding errors on large
* values.
*/
if (alpha_value == CLUTTER_ALPHA_MAX_ALPHA)
{
scale_x = priv->x_scale_end;
scale_y = priv->y_scale_end;
}
else if (alpha_value == 0)
{
scale_x = priv->x_scale_start;
scale_y = priv->y_scale_start;
}
else
{
ClutterFixed factor;
factor = CLUTTER_INT_TO_FIXED (alpha_value) / CLUTTER_ALPHA_MAX_ALPHA;
scale_x = CLUTTER_FIXED_MUL (factor,
@ -107,6 +124,7 @@ clutter_behaviour_scale_alpha_notify (ClutterBehaviour *behave,
scale_y = CLUTTER_FIXED_MUL (factor,
(priv->y_scale_end - priv->y_scale_start));
scale_y += priv->y_scale_start;
}
closure.scale_x = scale_x;
closure.scale_y = scale_y;