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, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. 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 29 matching lines...) Expand all Loading... |
40 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); | 40 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); |
41 if (entries.isEmpty()) { | 41 if (entries.isEmpty()) { |
42 entries.append(std::make_pair(SVGSpreadMethodUnknown, emptyString())); | 42 entries.append(std::make_pair(SVGSpreadMethodUnknown, emptyString())); |
43 entries.append(std::make_pair(SVGSpreadMethodPad, "pad")); | 43 entries.append(std::make_pair(SVGSpreadMethodPad, "pad")); |
44 entries.append(std::make_pair(SVGSpreadMethodReflect, "reflect")); | 44 entries.append(std::make_pair(SVGSpreadMethodReflect, "reflect")); |
45 entries.append(std::make_pair(SVGSpreadMethodRepeat, "repeat")); | 45 entries.append(std::make_pair(SVGSpreadMethodRepeat, "repeat")); |
46 } | 46 } |
47 return entries; | 47 return entries; |
48 } | 48 } |
49 | 49 |
50 // Animated property definitions | |
51 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGradientElement) | |
52 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) | |
53 END_REGISTER_ANIMATED_PROPERTIES | |
54 | |
55 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d
ocument) | 50 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d
ocument) |
56 : SVGElement(tagName, document) | 51 : SVGElement(tagName, document) |
57 , SVGURIReference(this) | 52 , SVGURIReference(this) |
58 , m_gradientTransform(SVGAnimatedTransformList::create(this, SVGNames::gradi
entTransformAttr, SVGTransformList::create())) | 53 , m_gradientTransform(SVGAnimatedTransformList::create(this, SVGNames::gradi
entTransformAttr, SVGTransformList::create())) |
59 , m_spreadMethod(SVGAnimatedEnumeration<SVGSpreadMethodType>::create(this, S
VGNames::spreadMethodAttr, SVGSpreadMethodPad)) | 54 , m_spreadMethod(SVGAnimatedEnumeration<SVGSpreadMethodType>::create(this, S
VGNames::spreadMethodAttr, SVGSpreadMethodPad)) |
60 , m_gradientUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(
this, SVGNames::gradientUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
)) | 55 , m_gradientUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(
this, SVGNames::gradientUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
)) |
61 { | 56 { |
62 ScriptWrappable::init(this); | 57 ScriptWrappable::init(this); |
63 addToPropertyMap(m_gradientTransform); | 58 addToPropertyMap(m_gradientTransform); |
64 addToPropertyMap(m_spreadMethod); | 59 addToPropertyMap(m_spreadMethod); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 float r, g, b, a; | 142 float r, g, b, a; |
148 color.getRGBA(r, g, b, a); | 143 color.getRGBA(r, g, b, a); |
149 | 144 |
150 stops.append(Gradient::ColorStop(offset, r, g, b, a)); | 145 stops.append(Gradient::ColorStop(offset, r, g, b, a)); |
151 } | 146 } |
152 | 147 |
153 return stops; | 148 return stops; |
154 } | 149 } |
155 | 150 |
156 } | 151 } |
OLD | NEW |