OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 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 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com> | 4 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com> |
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 bool SVGFESpecularLightingElement::isSupportedAttribute(const QualifiedName& att
rName) | 82 bool SVGFESpecularLightingElement::isSupportedAttribute(const QualifiedName& att
rName) |
83 { | 83 { |
84 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 84 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
85 if (supportedAttributes.isEmpty()) { | 85 if (supportedAttributes.isEmpty()) { |
86 supportedAttributes.add(SVGNames::inAttr); | 86 supportedAttributes.add(SVGNames::inAttr); |
87 supportedAttributes.add(SVGNames::specularConstantAttr); | 87 supportedAttributes.add(SVGNames::specularConstantAttr); |
88 supportedAttributes.add(SVGNames::specularExponentAttr); | 88 supportedAttributes.add(SVGNames::specularExponentAttr); |
89 supportedAttributes.add(SVGNames::surfaceScaleAttr); | 89 supportedAttributes.add(SVGNames::surfaceScaleAttr); |
90 supportedAttributes.add(SVGNames::kernelUnitLengthAttr); | 90 supportedAttributes.add(SVGNames::kernelUnitLengthAttr); |
91 } | 91 } |
92 return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslato
r>(attrName); | 92 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
93 } | 93 } |
94 | 94 |
95 void SVGFESpecularLightingElement::parseAttribute(const QualifiedName& name, con
st AtomicString& value) | 95 void SVGFESpecularLightingElement::parseAttribute(const QualifiedName& name, con
st AtomicString& value) |
96 { | 96 { |
97 if (!isSupportedAttribute(name)) { | 97 if (!isSupportedAttribute(name)) { |
98 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); | 98 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); |
99 return; | 99 return; |
100 } | 100 } |
101 | 101 |
102 if (name == SVGNames::inAttr) { | 102 if (name == SVGNames::inAttr) { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 ASSERT(renderer->style()); | 230 ASSERT(renderer->style()); |
231 Color color = renderer->style()->svgStyle()->lightingColor(); | 231 Color color = renderer->style()->svgStyle()->lightingColor(); |
232 | 232 |
233 RefPtr<FilterEffect> effect = FESpecularLighting::create(filter, color, surf
aceScale(), specularConstant(), | 233 RefPtr<FilterEffect> effect = FESpecularLighting::create(filter, color, surf
aceScale(), specularConstant(), |
234 specularExponent(), kernelUnitLengthX(
), kernelUnitLengthY(), lightSource.release()); | 234 specularExponent(), kernelUnitLengthX(
), kernelUnitLengthY(), lightSource.release()); |
235 effect->inputEffects().append(input1); | 235 effect->inputEffects().append(input1); |
236 return effect.release(); | 236 return effect.release(); |
237 } | 237 } |
238 | 238 |
239 } | 239 } |
OLD | NEW |