示例#1
0
void SVGAnimatedIntegerAnimator::calculateAnimatedValue(float percentage, unsigned repeatCount, SVGAnimatedType* from, SVGAnimatedType* to, SVGAnimatedType* toAtEndOfDuration, SVGAnimatedType* animated)
{
    ASSERT(m_animationElement);
    ASSERT(m_contextElement);

    int fromInteger = m_animationElement->animationMode() == ToAnimation ? animated->integer() : from->integer();
    int toInteger = to->integer();
    int toAtEndOfDurationInteger = toAtEndOfDuration->integer();
    int& animatedInteger = animated->integer();

    calculateAnimatedInteger(m_animationElement, percentage, repeatCount, fromInteger, toInteger, toAtEndOfDurationInteger, animatedInteger);
}
示例#2
0
void SVGAnimatedIntegerAnimator::calculateAnimatedValue(float percentage, unsigned repeatCount, OwnPtr<SVGAnimatedType>& from, OwnPtr<SVGAnimatedType>& to, OwnPtr<SVGAnimatedType>& animated)
{
    ASSERT(m_animationElement);
    ASSERT(m_contextElement);

    int& fromInteger = from->integer();
    int& toInteger = to->integer();
    int& animatedInteger = animated->integer();
    m_animationElement->adjustFromToValues<int>(0, fromInteger, toInteger, animatedInteger, percentage, m_contextElement);

    calculateAnimatedInteger(m_animationElement, percentage, repeatCount, fromInteger, toInteger, animatedInteger);
}