> On May 26, 2012, 5:44 a.m., Thorsten Zachmann wrote: > > stage/part/animations/strategy/KPrSmilValues.cpp, lines 80-86 > > <http://git.reviewboard.kde.org/r/105030/diff/1/?file=65363#file65363line80> > > > > When loading a formula the smil:values is not used so I guess it should > > not be loaded here. > > Paul Mendez wrote: > smil:values defines where formula starts and ends like in: > <anim:animate smil:begin="0s" smil:dur="664ms" > smil:targetElement="shape-11" smil:attributeName="y" smil:values="0.5;1" > anim:formula="y-sin(pi*$)/3" smil:keyTimes="0;1"/> > or I'am missing something? > > Thorsten Zachmann wrote: > According to the ODF spec 19.6 > ... > ? "$" (U+0024, DOLLAR SIGN): The identifier ”$” is replaced by a value > between 0 and 1 > (inclusive) that represents a proportional offset into an animation > element's duration. > ... > If an anim:formula attribute is given, it overrides the smil:values, > smil:to, smil:from > and smil:by attributes as specified in 15.3.2. > > Also in the above formula there is no change and the 0.5 which is there > is also not used in your code. > Can you see if these values are used in OO/LO? Does the animation change > inf the smil:values is removed from the xml and you test again? > > > > Paul Mendez wrote: > In the current code smil:values are used to set startValue and endValue > that are used when init cache is called, so they define when the animation > starts and ends. I tried with a file without that values and neither Stage > nor LO can play the animation.
The time pased from KPrAnimate to KPrSmilValues::value is in the range defined for KPrSmilValues::startValue() - KPrSmilValues::endValue(). This range is set when initializing the cache in KPrAnimate::init method. I think LO use something similar, because it can play anim:formula animations if there isn't the smil:values tags. Nevertheless, I'm not sure if that is the correct interpretation of the standard. If time must go between 0 and 1 for every anim:formula animation, I just need to set a new start and end values when parsing the formula. However, I think that the code that saves smil:value tag when saving anim:formula must remain for compatibility with LO. - Paul ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/105030/#review14168 ----------------------------------------------------------- On May 27, 2012, 3:04 p.m., Paul Mendez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/105030/ > ----------------------------------------------------------- > > (Updated May 27, 2012, 3:04 p.m.) > > > Review request for Calligra. > > > Description > ------- > > Add support for Anim:Formula tag in Stage. (That key is part of ODF > animations specification). > > Note: animations tested don't run as smooth as in LibreOffice because > KeySplines tag is not implemented. > > > Diffs > ----- > > stage/part/CMakeLists.txt 3c7916ef7496af21e65d9a5441d5cb924829c347 > stage/part/animations/KPrAnimate.cpp > dddd1fa401d596e7e23688f950428cd0ea76b639 > stage/part/animations/strategy/KPrFormulaParser.h PRE-CREATION > stage/part/animations/strategy/KPrFormulaParser.cpp PRE-CREATION > stage/part/animations/strategy/KPrSmilValues.h > 163d78b830a151ce150192000890a395f9e273dd > stage/part/animations/strategy/KPrSmilValues.cpp > 3faafc4eb1c8783224f9f32c38106407cc219096 > stage/part/animations/strategy/KPrValueParser.h > 8f3c6ebcdf7ae9f5d938d97d518f21977b572940 > stage/part/animations/strategy/KPrValueParser.cpp > ca7fac767142e64b9711ccf835efcb9a4c242e36 > > Diff: http://git.reviewboard.kde.org/r/105030/diff/ > > > Testing > ------- > > Test some animations of documents created in Libre Office (One test document > is also uploaded) > > > Thanks, > > Paul Mendez > >
_______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel