OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 inline bool isRelative() const { return isRelativeUnit(unitType()); } | 102 inline bool isRelative() const { return isRelativeUnit(unitType()); } |
103 | 103 |
104 bool isZero() const | 104 bool isZero() const |
105 { | 105 { |
106 return !m_valueInSpecifiedUnits; | 106 return !m_valueInSpecifiedUnits; |
107 } | 107 } |
108 | 108 |
109 static SVGLengthMode lengthModeForAnimatedLengthAttribute(const QualifiedNam
e&); | 109 static SVGLengthMode lengthModeForAnimatedLengthAttribute(const QualifiedNam
e&); |
110 | 110 |
111 PassRefPtrWillBeRawPtr<SVGLength> blend(PassRefPtrWillBeRawPtr<SVGLength> fr
om, float progress) const; | |
112 | |
113 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override; | 111 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override; |
114 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned
repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawP
tr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuratio
nValue, SVGElement* contextElement) override; | 112 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned
repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawP
tr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuratio
nValue, SVGElement* contextElement) override; |
115 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGEleme
nt* contextElement) override; | 113 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGEleme
nt* contextElement) override; |
116 | 114 |
117 static AnimatedPropertyType classType() { return AnimatedLength; } | 115 static AnimatedPropertyType classType() { return AnimatedLength; } |
118 | 116 |
119 private: | 117 private: |
120 SVGLength(SVGLengthMode); | 118 SVGLength(SVGLengthMode); |
121 SVGLength(const SVGLength&); | 119 SVGLength(const SVGLength&); |
122 | 120 |
123 float m_valueInSpecifiedUnits; | 121 float m_valueInSpecifiedUnits; |
124 unsigned m_unitMode : 2; | 122 unsigned m_unitMode : 2; |
125 unsigned m_unitType : 4; | 123 unsigned m_unitType : 4; |
126 }; | 124 }; |
127 | 125 |
128 inline PassRefPtrWillBeRawPtr<SVGLength> toSVGLength(PassRefPtrWillBeRawPtr<SVGP
ropertyBase> passBase) | 126 inline PassRefPtrWillBeRawPtr<SVGLength> toSVGLength(PassRefPtrWillBeRawPtr<SVGP
ropertyBase> passBase) |
129 { | 127 { |
130 RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase; | 128 RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase; |
131 ASSERT(base->type() == SVGLength::classType()); | 129 ASSERT(base->type() == SVGLength::classType()); |
132 return static_pointer_cast<SVGLength>(base.release()); | 130 return static_pointer_cast<SVGLength>(base.release()); |
133 } | 131 } |
134 | 132 |
135 } // namespace blink | 133 } // namespace blink |
136 | 134 |
137 #endif // SVGLength_h | 135 #endif // SVGLength_h |
OLD | NEW |