| 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 30 matching lines...) Expand all Loading... |
| 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 | 50 // Animated property definitions |
| 51 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGradientElement) | |
| 52 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) | |
| 53 END_REGISTER_ANIMATED_PROPERTIES | |
| 54 | 51 |
| 55 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d
ocument) | 52 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d
ocument) |
| 56 : SVGElement(tagName, document) | 53 : SVGElement(tagName, document) |
| 57 , SVGURIReference(this) | 54 , SVGURIReference(this) |
| 58 , m_gradientTransform(SVGAnimatedTransformList::create(this, SVGNames::gradi
entTransformAttr, SVGTransformList::create())) | 55 , m_gradientTransform(SVGAnimatedTransformList::create(this, SVGNames::gradi
entTransformAttr, SVGTransformList::create())) |
| 59 , m_spreadMethod(SVGAnimatedEnumeration<SVGSpreadMethodType>::create(this, S
VGNames::spreadMethodAttr, SVGSpreadMethodPad)) | 56 , 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
)) | 57 , m_gradientUnits(SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>::create(
this, SVGNames::gradientUnitsAttr, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
)) |
| 61 { | 58 { |
| 62 ScriptWrappable::init(this); | 59 ScriptWrappable::init(this); |
| 63 addToPropertyMap(m_gradientTransform); | 60 addToPropertyMap(m_gradientTransform); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 float r, g, b, a; | 144 float r, g, b, a; |
| 148 color.getRGBA(r, g, b, a); | 145 color.getRGBA(r, g, b, a); |
| 149 | 146 |
| 150 stops.append(Gradient::ColorStop(offset, r, g, b, a)); | 147 stops.append(Gradient::ColorStop(offset, r, g, b, a)); |
| 151 } | 148 } |
| 152 | 149 |
| 153 return stops; | 150 return stops; |
| 154 } | 151 } |
| 155 | 152 |
| 156 } | 153 } |
| OLD | NEW |