Home | History | Annotate | Download | only in svg

Lines Matching refs:percent

412 unsigned SVGAnimationElement::calculateKeyTimesIndex(float percent) const
417 // cases we don't need to consider the last value, since |percent| is never
422 if (m_keyTimes[index] > percent)
428 float SVGAnimationElement::calculatePercentForSpline(float percent, unsigned splineIndex) const
436 return narrowPrecisionToFloat(bezier.solve(percent, solveEpsilon(duration.value())));
439 float SVGAnimationElement::calculatePercentFromKeyPoints(float percent) const
446 if (percent == 1)
449 unsigned index = calculateKeyTimesIndex(percent);
459 float keyPointPercent = (percent - fromPercent) / (toPercent - fromPercent);
468 float SVGAnimationElement::calculatePercentForFromTo(float percent) const
471 return percent > m_keyTimes[1] ? 1 : 0;
473 return percent;
476 void SVGAnimationElement::currentValuesFromKeyPoints(float percent, float& effectivePercent, String& from, String& to) const
481 effectivePercent = calculatePercentFromKeyPoints(percent);
487 void SVGAnimationElement::currentValuesForValuesAnimation(float percent, float& effectivePercent, String& from, String& to)
493 if (percent == 1 || valuesCount == 1) {
510 return currentValuesFromKeyPoints(percent, effectivePercent, from, to);
516 unsigned index = calculateKeyTimesIndex(percent);
519 index = static_cast<unsigned>(percent * valuesCount);
532 index = static_cast<unsigned>(floorf(percent * (valuesCount - 1)));
542 effectivePercent = (percent - fromPercent) / (toPercent - fromPercent);
601 void SVGAnimationElement::updateAnimation(float percent, unsigned repeatCount, SVGSMILElement* resultElement)
612 currentValuesForValuesAnimation(percent, effectivePercent, from, to);
621 effectivePercent = calculatePercentFromKeyPoints(percent);
623 effectivePercent = calculatePercentForSpline(percent, calculateKeyTimesIndex(percent));
625 effectivePercent = calculatePercentForFromTo(percent);
627 effectivePercent = percent;