* float-alpha-value:
[script] Parse easing modes by name
[docs] Update the easing modes documentation
[animation] Implement new easing functions
[animation] Move the alpha value to floating point
The current Alpha value is an unsigned integer that can be used
implicitly as a fixed point value. This makes writing an alpha
function overshooting below and above the current range basically
impossible without complicating an already complex code, and
creating weird corner cases.
For this reason, the Alpha value should be defined as a floating
point normalized value, spanning a range between 0.0 and 1.0; in
order to allow overshooting, the valid range is extended one unit
below and one unit above, thus making it -1.0 .. 2.0.
This commit updates the various users of the ClutterAlpha API
and the tests cases.
This commit also removes all the current alpha functions exposed
in the public API.
This is the result of running a number of sed and perl scripts over the code to
do 90% of the work in converting from 16.16 fixed to single precision floating
point.
Note: A pristine cogl-fixed.c has been maintained as a standalone utility API
so that applications may still take advantage of fixed point if they
desire for certain optimisations where lower precision may be acceptable.
Note: no API changes were made in Clutter, only in Cogl.
Overview of changes:
- Within clutter/* all usage of the COGL_FIXED_ macros have been changed to use
the CLUTTER_FIXED_ macros.
- Within cogl/* all usage of the COGL_FIXED_ macros have been completly stripped
and expanded into code that works with single precision floats instead.
- Uses of cogl_fixed_* have been replaced with single precision math.h
alternatives.
- Uses of COGL_ANGLE_* and cogl_angle_* have been replaced so we use a float for
angles and math.h replacements.
Bug 1209 - Move fixed point API in COGL
* clutter/cogl/cogl-fixed.h:
* clutter/cogl/cogl.h.in:
* clutter/cogl/common/Makefile.am:
* clutter/cogl/common/cogl-fixed.c: Add fixed point API, modelled
after the ClutterFixed. The CoglFixed API supercedes the ClutterFixed
one and avoids the dependency of COGL on Clutter's own API.
* clutter/cogl/common/cogl-clip-stack.c:
* clutter/cogl/common/cogl-primitives.c:
* clutter/cogl/common/cogl-primitives.h: Update internal usage of
ClutterFixed to CoglFixed.
* clutter/cogl/gl/Makefile.am:
* clutter/cogl/gl/cogl-primitives.c:
* clutter/cogl/gl/cogl-texture.c:
* clutter/cogl/gl/cogl.c: Ditto, in the GL implementation of the
COGL API.
* clutter/cogl/gles/Makefile.am:
* clutter/cogl/gles/cogl-fbo.c:
* clutter/cogl/gles/cogl-gles2-wrapper.c:
* clutter/cogl/gles/cogl-primitives.c:
* clutter/cogl/gles/cogl-texture.c:
* clutter/cogl/gles/cogl.c: Ditto, in the GLES implementation of
the COGL API.
* clutter/pango/pangoclutter-glyph-cache.c:
* clutter/pango/pangoclutter-glyph-cache.h: Ditto, in the Pango
renderer glyphs cache.
* clutter/clutter-fixed.c:
* clutter/clutter-fixed.h: ClutterFixed and related API becomes
a simple transition API for bindings and public Clutter API.
* clutter/clutter-actor.c:
* clutter/clutter-alpha.c:
* clutter/clutter-backend.c:
* clutter/clutter-behaviour-depth.c:
* clutter/clutter-behaviour-ellipse.c:
* clutter/clutter-behaviour-path.c:
* clutter/clutter-behaviour-rotate.c:
* clutter/clutter-behaviour-scale.c:
* clutter/clutter-clone-texture.c:
* clutter/clutter-color.c:
* clutter/clutter-entry.c:
* clutter/clutter-stage.c:
* clutter/clutter-texture.c:
* clutter/clutter-timeline.c:
* clutter/clutter-units.h: Move from the internal usage of
ClutterFixed to CoglFixed.
* doc/reference/clutter/clutter-sections.txt:
* doc/reference/cogl/cogl-docs.sgml:
* doc/reference/cogl/cogl-sections.txt: Update the documentation.
* tests/test-cogl-tex-tile.c:
* tests/test-project.c: Fix tests after the API change
* README: Add release notes.
* clutter/clutter-behaviour-depth.h:
* clutter/clutter-behaviour-depth.c:
(clutter_behaviour_depth_set_bounds),
(clutter_behaviour_depth_get_bounds): Add the depth-start and
depth-end accessors.
* tests/test-depth.c (timeline_completed): Use set_bounds()
instead of g_object_set().
* clutter.symbols: Add clutter_behaviour_depth_set_bounds()
and clutter_behaviour_opacity_get_bounds() to the list of
public symbols.
* clutter/clutter-behaviour-depth.c:
Modify to work like all other behvaiours in not forcing
increasing order in behaviour 'limits'. (#436)
Rename limit min/max props to start/end.
* tests/test-depth.c:
Simplify test-case to work with above change and
without multiple ramps
* clutter/clutter-behaviour-rotate.c:
Handle CW rotation when end > start and similar for CCW just
like ellipse behaviour.
* clutter/clutter-behaviour-depth.c: Clarify that what drives
the movement along the Z axis is the ClutterAlpha object (we
don't have the luxury of a rollover like the opacity does);
so, if you want to go from 0 to -100 you have to use a
decreasing function, just as well if you want to go from 100
to 0. Using a min-depth of 100 and a max-depth of 0 and an
increasing function is undefined behaviour.
* tests/Makefile.am:
* tests/test-depth.c: Add a test case for the depth behaviour.
To follow the other simple behaviours, the ClutterBehaviourDepth:min-depth
and ClutterBehaviourDepth:max-depth properties have been renamed to
ClutterBehaviourDepth:depth-start and ClutterBehaviourDepth:depth-end
respectively.