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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGradientElement) | 47 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGGradientElement) |
48 REGISTER_LOCAL_ANIMATED_PROPERTY(spreadMethod) | 48 REGISTER_LOCAL_ANIMATED_PROPERTY(spreadMethod) |
49 REGISTER_LOCAL_ANIMATED_PROPERTY(gradientUnits) | 49 REGISTER_LOCAL_ANIMATED_PROPERTY(gradientUnits) |
50 REGISTER_LOCAL_ANIMATED_PROPERTY(gradientTransform) | 50 REGISTER_LOCAL_ANIMATED_PROPERTY(gradientTransform) |
51 REGISTER_LOCAL_ANIMATED_PROPERTY(href) | 51 REGISTER_LOCAL_ANIMATED_PROPERTY(href) |
52 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) | 52 REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired) |
53 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) | 53 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGElement) |
54 END_REGISTER_ANIMATED_PROPERTIES | 54 END_REGISTER_ANIMATED_PROPERTIES |
55 | 55 |
56 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* d
ocument) | 56 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document& d
ocument) |
57 : SVGElement(tagName, document) | 57 : SVGElement(tagName, document) |
58 , m_spreadMethod(SVGSpreadMethodPad) | 58 , m_spreadMethod(SVGSpreadMethodPad) |
59 , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) | 59 , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) |
60 { | 60 { |
61 ScriptWrappable::init(this); | 61 ScriptWrappable::init(this); |
62 registerAnimatedPropertiesForSVGGradientElement(); | 62 registerAnimatedPropertiesForSVGGradientElement(); |
63 } | 63 } |
64 | 64 |
65 bool SVGGradientElement::isSupportedAttribute(const QualifiedName& attrName) | 65 bool SVGGradientElement::isSupportedAttribute(const QualifiedName& attrName) |
66 { | 66 { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 float r, g, b, a; | 159 float r, g, b, a; |
160 color.getRGBA(r, g, b, a); | 160 color.getRGBA(r, g, b, a); |
161 | 161 |
162 stops.append(Gradient::ColorStop(offset, r, g, b, a)); | 162 stops.append(Gradient::ColorStop(offset, r, g, b, a)); |
163 } | 163 } |
164 | 164 |
165 return stops; | 165 return stops; |
166 } | 166 } |
167 | 167 |
168 } | 168 } |
OLD | NEW |