[mythtv-commits] mythtv/master commit: f39fa3b62 by Mark Kendall (mark-kendall)
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
New Revision: f39fa3b626d98c0629571ecd4676e704747d3ca6
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
- 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
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:-
<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"
This should allow for future improvements such as adding additonal
sections for animations processed in sequence, paths and onCompletion
Attributes will use default values if missing:-
start="0" (or equivalent)
end="0" (or equivalent)
More information about the mythtv-commits