| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } | 105 } |
| 106 | 106 |
| 107 void SVGRect::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*) | 107 void SVGRect::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement*) |
| 108 { | 108 { |
| 109 m_value += toSVGRect(other)->value(); | 109 m_value += toSVGRect(other)->value(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void SVGRect::calculateAnimatedValue(SVGAnimationElement* animationElement, floa
t percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from
Value, PassRefPtrWillBeRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<S
VGPropertyBase> toAtEndOfDurationValue, SVGElement*) | 112 void SVGRect::calculateAnimatedValue(SVGAnimationElement* animationElement, floa
t percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from
Value, PassRefPtrWillBeRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<S
VGPropertyBase> toAtEndOfDurationValue, SVGElement*) |
| 113 { | 113 { |
| 114 ASSERT(animationElement); | 114 ASSERT(animationElement); |
| 115 RefPtrWillBeRawPtr<SVGRect> fromRect = animationElement->animationMode() ==
ToAnimation ? PassRefPtrWillBeRawPtr<SVGRect>(this) : toSVGRect(fromValue); | 115 RefPtrWillBeRawPtr<SVGRect> fromRect = animationElement->getAnimationMode()
== ToAnimation ? PassRefPtrWillBeRawPtr<SVGRect>(this) : toSVGRect(fromValue); |
| 116 RefPtrWillBeRawPtr<SVGRect> toRect = toSVGRect(toValue); | 116 RefPtrWillBeRawPtr<SVGRect> toRect = toSVGRect(toValue); |
| 117 RefPtrWillBeRawPtr<SVGRect> toAtEndOfDurationRect = toSVGRect(toAtEndOfDurat
ionValue); | 117 RefPtrWillBeRawPtr<SVGRect> toAtEndOfDurationRect = toSVGRect(toAtEndOfDurat
ionValue); |
| 118 | 118 |
| 119 float animatedX = x(); | 119 float animatedX = x(); |
| 120 float animatedY = y(); | 120 float animatedY = y(); |
| 121 float animatedWidth = width(); | 121 float animatedWidth = width(); |
| 122 float animatedHeight = height(); | 122 float animatedHeight = height(); |
| 123 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->x
(), toRect->x(), toAtEndOfDurationRect->x(), animatedX); | 123 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->x
(), toRect->x(), toAtEndOfDurationRect->x(), animatedX); |
| 124 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->y
(), toRect->y(), toAtEndOfDurationRect->y(), animatedY); | 124 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->y
(), toRect->y(), toAtEndOfDurationRect->y(), animatedY); |
| 125 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->w
idth(), toRect->width(), toAtEndOfDurationRect->width(), animatedWidth); | 125 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->w
idth(), toRect->width(), toAtEndOfDurationRect->width(), animatedWidth); |
| 126 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->h
eight(), toRect->height(), toAtEndOfDurationRect->height(), animatedHeight); | 126 animationElement->animateAdditiveNumber(percentage, repeatCount, fromRect->h
eight(), toRect->height(), toAtEndOfDurationRect->height(), animatedHeight); |
| 127 | 127 |
| 128 m_value = FloatRect(animatedX, animatedY, animatedWidth, animatedHeight); | 128 m_value = FloatRect(animatedX, animatedY, animatedWidth, animatedHeight); |
| 129 } | 129 } |
| 130 | 130 |
| 131 float SVGRect::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVG
Element* contextElement) | 131 float SVGRect::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVG
Element* contextElement) |
| 132 { | 132 { |
| 133 // FIXME: Distance calculation is not possible for SVGRect right now. We nee
d the distance for every single value. | 133 // FIXME: Distance calculation is not possible for SVGRect right now. We nee
d the distance for every single value. |
| 134 return -1; | 134 return -1; |
| 135 } | 135 } |
| 136 | 136 |
| 137 void SVGRect::setInvalid() | 137 void SVGRect::setInvalid() |
| 138 { | 138 { |
| 139 m_value = FloatRect(0.0f, 0.0f, 0.0f, 0.0f); | 139 m_value = FloatRect(0.0f, 0.0f, 0.0f, 0.0f); |
| 140 m_isValid = false; | 140 m_isValid = false; |
| 141 } | 141 } |
| 142 | 142 |
| 143 } // namespace blink | 143 } // namespace blink |
| OLD | NEW |