forked from qt-creator/qt-creator
Apply interpolation when restoring an animation-curve
+ Notify timeline when inserting a keyframe Change-Id: I91548c4e45306e9a6c6490cc94b88080de3910ac Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
#include <QLineF>
|
||||
#include <QPainterPath>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace DesignTools {
|
||||
|
||||
AnimationCurve::AnimationCurve()
|
||||
@@ -127,6 +129,21 @@ double AnimationCurve::maximumValue() const
|
||||
return m_maxY;
|
||||
}
|
||||
|
||||
std::string AnimationCurve::string() const
|
||||
{
|
||||
std::stringstream sstream;
|
||||
sstream << "{ ";
|
||||
for (size_t i = 0; i < m_frames.size(); ++i) {
|
||||
if (i == m_frames.size() - 1)
|
||||
sstream << m_frames[i].string();
|
||||
else
|
||||
sstream << m_frames[i].string() << ", ";
|
||||
}
|
||||
sstream << " }";
|
||||
|
||||
return sstream.str();
|
||||
}
|
||||
|
||||
CurveSegment AnimationCurve::segment(double time) const
|
||||
{
|
||||
CurveSegment seg;
|
||||
|
||||
Reference in New Issue
Block a user