OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2011, 2012. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011, 2012. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 const SVGPointList& fromPointList = m_animationElement->animationMode() == T
oAnimation ? animated->pointList() : from->pointList(); | 88 const SVGPointList& fromPointList = m_animationElement->animationMode() == T
oAnimation ? animated->pointList() : from->pointList(); |
89 const SVGPointList& toPointList = to->pointList(); | 89 const SVGPointList& toPointList = to->pointList(); |
90 const SVGPointList& toAtEndOfDurationPointList = toAtEndOfDuration->pointLis
t(); | 90 const SVGPointList& toAtEndOfDurationPointList = toAtEndOfDuration->pointLis
t(); |
91 SVGPointList& animatedPointList = animated->pointList(); | 91 SVGPointList& animatedPointList = animated->pointList(); |
92 if (!m_animationElement->adjustFromToListValues<SVGPointList>(fromPointList,
toPointList, animatedPointList, percentage)) | 92 if (!m_animationElement->adjustFromToListValues<SVGPointList>(fromPointList,
toPointList, animatedPointList, percentage)) |
93 return; | 93 return; |
94 | 94 |
95 unsigned fromPointListSize = fromPointList.size(); | 95 unsigned fromPointListSize = fromPointList.size(); |
96 unsigned toPointListSize = toPointList.size(); | 96 unsigned toPointListSize = toPointList.size(); |
| 97 unsigned toAtEndOfDurationSize = toAtEndOfDurationPointList.size(); |
97 | 98 |
98 for (unsigned i = 0; i < toPointListSize; ++i) { | 99 for (unsigned i = 0; i < toPointListSize; ++i) { |
99 FloatPoint effectiveFrom; | 100 FloatPoint effectiveFrom; |
100 if (fromPointListSize) | 101 if (fromPointListSize) |
101 effectiveFrom = fromPointList[i]; | 102 effectiveFrom = fromPointList[i]; |
| 103 FloatPoint effectiveToAtEnd = i < toAtEndOfDurationSize ? toAtEndOfDurat
ionPointList[i] : FloatPoint(); |
102 | 104 |
103 float animatedX = animatedPointList[i].x(); | 105 float animatedX = animatedPointList[i].x(); |
104 float animatedY = animatedPointList[i].y(); | 106 float animatedY = animatedPointList[i].y(); |
105 m_animationElement->animateAdditiveNumber(percentage, repeatCount, effec
tiveFrom.x(), toPointList[i].x(), toAtEndOfDurationPointList[i].x(), animatedX); | 107 m_animationElement->animateAdditiveNumber(percentage, repeatCount, effec
tiveFrom.x(), toPointList[i].x(), effectiveToAtEnd.x(), animatedX); |
106 m_animationElement->animateAdditiveNumber(percentage, repeatCount, effec
tiveFrom.y(), toPointList[i].y(), toAtEndOfDurationPointList[i].y(), animatedY); | 108 m_animationElement->animateAdditiveNumber(percentage, repeatCount, effec
tiveFrom.y(), toPointList[i].y(), effectiveToAtEnd.y(), animatedY); |
107 animatedPointList[i] = FloatPoint(animatedX, animatedY); | 109 animatedPointList[i] = FloatPoint(animatedX, animatedY); |
108 } | 110 } |
109 } | 111 } |
110 | 112 |
111 float SVGAnimatedPointListAnimator::calculateDistance(const String&, const Strin
g&) | 113 float SVGAnimatedPointListAnimator::calculateDistance(const String&, const Strin
g&) |
112 { | 114 { |
113 // FIXME: Distance calculation is not possible for SVGPointList right now. W
e need the distance of for every single value. | 115 // FIXME: Distance calculation is not possible for SVGPointList right now. W
e need the distance of for every single value. |
114 return -1; | 116 return -1; |
115 } | 117 } |
116 | 118 |
117 } | 119 } |
118 | 120 |
119 #endif // ENABLE(SVG) | 121 #endif // ENABLE(SVG) |
OLD | NEW |