| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010, 2011. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010, 2011. 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } | 114 } |
| 115 | 115 |
| 116 bool SVGPathBlender::blendMoveToSegment() | 116 bool SVGPathBlender::blendMoveToSegment() |
| 117 { | 117 { |
| 118 FloatPoint fromTargetPoint; | 118 FloatPoint fromTargetPoint; |
| 119 FloatPoint toTargetPoint; | 119 FloatPoint toTargetPoint; |
| 120 if ((m_fromSource->hasMoreData() && !m_fromSource->parseMoveToSegment(fromTa
rgetPoint)) | 120 if ((m_fromSource->hasMoreData() && !m_fromSource->parseMoveToSegment(fromTa
rgetPoint)) |
| 121 || !m_toSource->parseMoveToSegment(toTargetPoint)) | 121 || !m_toSource->parseMoveToSegment(toTargetPoint)) |
| 122 return false; | 122 return false; |
| 123 | 123 |
| 124 m_consumer->moveTo(blendAnimatedFloatPoint(fromTargetPoint, toTargetPoint),
false, m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode); | 124 m_consumer->moveTo(blendAnimatedFloatPoint(fromTargetPoint, toTargetPoint),
m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode); |
| 125 m_fromCurrentPoint = m_fromMode == AbsoluteCoordinates ? fromTargetPoint : m
_fromCurrentPoint + fromTargetPoint; | 125 m_fromCurrentPoint = m_fromMode == AbsoluteCoordinates ? fromTargetPoint : m
_fromCurrentPoint + fromTargetPoint; |
| 126 m_toCurrentPoint = m_toMode == AbsoluteCoordinates ? toTargetPoint : m_toCur
rentPoint + toTargetPoint; | 126 m_toCurrentPoint = m_toMode == AbsoluteCoordinates ? toTargetPoint : m_toCur
rentPoint + toTargetPoint; |
| 127 return true; | 127 return true; |
| 128 } | 128 } |
| 129 | 129 |
| 130 bool SVGPathBlender::blendLineToSegment() | 130 bool SVGPathBlender::blendLineToSegment() |
| 131 { | 131 { |
| 132 FloatPoint fromTargetPoint; | 132 FloatPoint fromTargetPoint; |
| 133 FloatPoint toTargetPoint; | 133 FloatPoint toTargetPoint; |
| 134 if ((m_fromSource->hasMoreData() && !m_fromSource->parseLineToSegment(fromTa
rgetPoint)) | 134 if ((m_fromSource->hasMoreData() && !m_fromSource->parseLineToSegment(fromTa
rgetPoint)) |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 if (m_fromSource->hasMoreData() != m_toSource->hasMoreData()) | 393 if (m_fromSource->hasMoreData() != m_toSource->hasMoreData()) |
| 394 return false; | 394 return false; |
| 395 if (!m_fromSource->hasMoreData() || !m_toSource->hasMoreData()) | 395 if (!m_fromSource->hasMoreData() || !m_toSource->hasMoreData()) |
| 396 return true; | 396 return true; |
| 397 } | 397 } |
| 398 | 398 |
| 399 return true; | 399 return true; |
| 400 } | 400 } |
| 401 | 401 |
| 402 } | 402 } |
| OLD | NEW |