mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
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:
parent
bab8b24aed
commit
3ef9e235ef
@ -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:
|
||||
|
@ -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,
|
||||
|
@ -93,20 +93,38 @@ 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;
|
||||
|
||||
factor = CLUTTER_INT_TO_FIXED (alpha_value) / CLUTTER_ALPHA_MAX_ALPHA;
|
||||
/* 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;
|
||||
|
||||
scale_x = CLUTTER_FIXED_MUL (factor,
|
||||
(priv->x_scale_end - priv->x_scale_start));
|
||||
scale_x += priv->x_scale_start;
|
||||
factor = CLUTTER_INT_TO_FIXED (alpha_value) / CLUTTER_ALPHA_MAX_ALPHA;
|
||||
|
||||
scale_y = CLUTTER_FIXED_MUL (factor,
|
||||
(priv->y_scale_end - priv->y_scale_start));
|
||||
scale_y += priv->y_scale_start;
|
||||
scale_x = CLUTTER_FIXED_MUL (factor,
|
||||
(priv->x_scale_end - priv->x_scale_start));
|
||||
scale_x += priv->x_scale_start;
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user