[mythtv-commits] mythtv/master commit: f39fa3b62 by Mark Kendall (mark-kendall)

MythTV noreply at mythtv.org
Tue Jan 17 10:57:59 UTC 2012


      Author:  Mark Kendall <mkendall at mythtv.org>
 Change Date:  2012-01-17T02:57:01-08:00
   Push Date:  2012/01/17 02:57:46 -0800
  Repository:  mythtv
      Branch:  master
New Revision:  f39fa3b626d98c0629571ecd4676e704747d3ca6
   Changeset:  https://github.com/MythTV/mythtv/commit/f39fa3b62

Log:

Add initial animation support to libmythui.

The bulk of this code is from Jonatan <mythtv at comhem.se> (many thanks!),
with the major changes being:-

- sundry formatting/style changes.
- added OpenGL 2.0/ES support by way of full stackable transformation
support (emulates the deprecated OpenGL push/pop matrix functionality).
- removed the 'size' effect as this doesn't appear to work at the moment
(easy enough to add back).
- moved the Effects struct to a UIEffects class for additional
functionality.
- converted the xml 'zoom' scale to 0-100 (and beyond) rather then
0.0-1.0 (still uses a float internally).
- added separate verticalzoom and horizontalzoom effects. You can use
one in isolation or both together for separate effects and there is
technically nothing stopping you from using them together with normal
'zoom' - though the results will be undefined.
- added a 'centre' attribute that dictates the centre used for both
rotation and zooming. Available centres topleft, top, topright, left,
middle, right, bottomleft, bottom and right. You cannot set a different
centre for rotation and zoom.
- reworked the xml structure in line with Stuart Morgan's suggested
schema (see below).

This currently only works with an OpenGL painter in the main interface
(so no OSD yet) and is currently only triggered on 'AboutToShow' and
'AboutToHide' for windows (ie. no lower level widgets yet). Extending
this should just be a matter of adding additional triggers in the
correct slots. I'll add direct3d support to my long list of direct3d
ToDo's.

There are some obvious issues around deactivating looped animations and
some animation effects based on pre-existing code (e.g. position?
alpha?) appear to interfere with window behaviour (e.g. actions aren't
processed until the animation is complete).

The xml looks something like this:-

<animation trigger="AboutToShow">
    <section duration="500" centre="middle">
        <alpha start="120" end="255" easingcurve="Linear"
reversible="true" looped="true" />
        <zoom start="0" end="100" easingcurve="OutCurve" duration="200"
/>
    </section>
</animation>

This should allow for future improvements such as adding additonal
sections for animations processed in sequence, paths and onCompletion
style triggers.

Attributes will use default values if missing:-
trigger="AboutToShow"
duration="500"
centre="middle"
start="0" (or equivalent)
end="0" (or equivalent)
easingcurve="Linear"
reversible="false"
looped="false"

Added:

   mythtv/libs/libmythui/mythuianimation.cpp
   mythtv/libs/libmythui/mythuianimation.h

Modified:

   mythtv/libs/libmythui/libmythui.pro
   mythtv/libs/libmythui/mythmainwindow.cpp
   mythtv/libs/libmythui/mythmainwindow.h
   mythtv/libs/libmythui/mythpainter.h
   mythtv/libs/libmythui/mythpainter_ogl.cpp
   mythtv/libs/libmythui/mythpainter_ogl.h
   mythtv/libs/libmythui/mythrender_opengl.h
   mythtv/libs/libmythui/mythrender_opengl1.cpp
   mythtv/libs/libmythui/mythrender_opengl1.h
   mythtv/libs/libmythui/mythrender_opengl2.cpp
   mythtv/libs/libmythui/mythrender_opengl2.h
   mythtv/libs/libmythui/mythscreentype.cpp
   mythtv/libs/libmythui/mythuitype.cpp
   mythtv/libs/libmythui/mythuitype.h



More information about the mythtv-commits mailing list