void SVGPointList::calculateAnimatedValue(SVGAnimationElement* animationElement, float percentage, unsigned repeatCount, SVGPropertyBase* fromValue, SVGPropertyBase* toValue, SVGPropertyBase* toAtEndOfDurationValue, SVGElement* contextElement) { SVGPointList* fromList = toSVGPointList(fromValue); SVGPointList* toList = toSVGPointList(toValue); SVGPointList* toAtEndOfDurationList = toSVGPointList(toAtEndOfDurationValue); size_t fromPointListSize = fromList->length(); size_t toPointListSize = toList->length(); size_t toAtEndOfDurationListSize = toAtEndOfDurationList->length(); if (!adjustFromToListValues(fromList, toList, percentage, animationElement->getAnimationMode())) return; for (size_t i = 0; i < toPointListSize; ++i) { float animatedX = at(i)->x(); float animatedY = at(i)->y(); FloatPoint effectiveFrom; if (fromPointListSize) effectiveFrom = fromList->at(i)->value(); FloatPoint effectiveTo = toList->at(i)->value(); FloatPoint effectiveToAtEnd; if (i < toAtEndOfDurationListSize) effectiveToAtEnd = toAtEndOfDurationList->at(i)->value(); animationElement->animateAdditiveNumber(percentage, repeatCount, effectiveFrom.x(), effectiveTo.x(), effectiveToAtEnd.x(), animatedX); animationElement->animateAdditiveNumber(percentage, repeatCount, effectiveFrom.y(), effectiveTo.y(), effectiveToAtEnd.y(), animatedY); at(i)->setValue(FloatPoint(animatedX, animatedY)); } }
void SVGPointList::add(SVGPropertyBase* other, SVGElement* contextElement) { SVGPointList* otherList = toSVGPointList(other); if (length() != otherList->length()) return; for (size_t i = 0; i < length(); ++i) at(i)->setValue(at(i)->value() + otherList->at(i)->value()); }