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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 CSSPrimitiveValue::UnitType typeWithCalcResolved() const { return m_value->t
ypeWithCalcResolved(); } | 50 CSSPrimitiveValue::UnitType typeWithCalcResolved() const { return m_value->t
ypeWithCalcResolved(); } |
51 void setUnitType(CSSPrimitiveValue::UnitType); | 51 void setUnitType(CSSPrimitiveValue::UnitType); |
52 SVGLengthMode unitMode() const { return static_cast<SVGLengthMode>(m_unitMod
e); } | 52 SVGLengthMode unitMode() const { return static_cast<SVGLengthMode>(m_unitMod
e); } |
53 | 53 |
54 bool operator==(const SVGLength&) const; | 54 bool operator==(const SVGLength&) const; |
55 bool operator!=(const SVGLength& other) const { return !operator==(other); } | 55 bool operator!=(const SVGLength& other) const { return !operator==(other); } |
56 | 56 |
57 float value(const SVGLengthContext&) const; | 57 float value(const SVGLengthContext&) const; |
58 void setValue(float, const SVGLengthContext&); | 58 void setValue(float, const SVGLengthContext&); |
59 void setValueAsNumber(float); | |
60 | 59 |
61 float valueInSpecifiedUnits() const { return m_value->getFloatValue(); } | 60 float valueInSpecifiedUnits() const { return m_value->getFloatValue(); } |
62 void setValueInSpecifiedUnits(float value) | 61 void setValueInSpecifiedUnits(float value) |
63 { | 62 { |
64 m_value = CSSPrimitiveValue::create(value, m_value->typeWithCalcResolved
()); | 63 m_value = CSSPrimitiveValue::create(value, m_value->typeWithCalcResolved
()); |
65 } | 64 } |
66 | 65 |
67 CSSPrimitiveValue* asCSSPrimitiveValue() const { return m_value.get(); } | 66 CSSPrimitiveValue* asCSSPrimitiveValue() const { return m_value.get(); } |
68 | 67 |
69 // Resolves LengthTypePercentage into a normalized floating point number (fu
ll value is 1.0). | 68 // Resolves LengthTypePercentage into a normalized floating point number (fu
ll value is 1.0). |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 104 |
106 Member<CSSPrimitiveValue> m_value; | 105 Member<CSSPrimitiveValue> m_value; |
107 unsigned m_unitMode : 2; | 106 unsigned m_unitMode : 2; |
108 }; | 107 }; |
109 | 108 |
110 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGLength); | 109 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGLength); |
111 | 110 |
112 } // namespace blink | 111 } // namespace blink |
113 | 112 |
114 #endif // SVGLength_h | 113 #endif // SVGLength_h |
OLD | NEW |