| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFESpecularLightingElement) | 44 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFESpecularLightingElement) |
| 45 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) | 45 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) |
| 46 REGISTER_LOCAL_ANIMATED_PROPERTY(specularConstant) | 46 REGISTER_LOCAL_ANIMATED_PROPERTY(specularConstant) |
| 47 REGISTER_LOCAL_ANIMATED_PROPERTY(specularExponent) | 47 REGISTER_LOCAL_ANIMATED_PROPERTY(specularExponent) |
| 48 REGISTER_LOCAL_ANIMATED_PROPERTY(surfaceScale) | 48 REGISTER_LOCAL_ANIMATED_PROPERTY(surfaceScale) |
| 49 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX) | 49 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX) |
| 50 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY) | 50 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY) |
| 51 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | 51 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) |
| 52 END_REGISTER_ANIMATED_PROPERTIES | 52 END_REGISTER_ANIMATED_PROPERTIES |
| 53 | 53 |
| 54 inline SVGFESpecularLightingElement::SVGFESpecularLightingElement(const Qualifie
dName& tagName, Document& document) | 54 inline SVGFESpecularLightingElement::SVGFESpecularLightingElement(Document& docu
ment) |
| 55 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 55 : SVGFilterPrimitiveStandardAttributes(SVGNames::feSpecularLightingTag, docu
ment) |
| 56 , m_specularConstant(1) | 56 , m_specularConstant(1) |
| 57 , m_specularExponent(1) | 57 , m_specularExponent(1) |
| 58 , m_surfaceScale(1) | 58 , m_surfaceScale(1) |
| 59 { | 59 { |
| 60 ASSERT(hasTagName(SVGNames::feSpecularLightingTag)); | |
| 61 ScriptWrappable::init(this); | 60 ScriptWrappable::init(this); |
| 62 registerAnimatedPropertiesForSVGFESpecularLightingElement(); | 61 registerAnimatedPropertiesForSVGFESpecularLightingElement(); |
| 63 } | 62 } |
| 64 | 63 |
| 65 PassRefPtr<SVGFESpecularLightingElement> SVGFESpecularLightingElement::create(co
nst QualifiedName& tagName, Document& document) | 64 PassRefPtr<SVGFESpecularLightingElement> SVGFESpecularLightingElement::create(Do
cument& document) |
| 66 { | 65 { |
| 67 return adoptRef(new SVGFESpecularLightingElement(tagName, document)); | 66 return adoptRef(new SVGFESpecularLightingElement(document)); |
| 68 } | 67 } |
| 69 | 68 |
| 70 const AtomicString& SVGFESpecularLightingElement::kernelUnitLengthXIdentifier() | 69 const AtomicString& SVGFESpecularLightingElement::kernelUnitLengthXIdentifier() |
| 71 { | 70 { |
| 72 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", Ato
micString::ConstructFromLiteral)); | 71 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", Ato
micString::ConstructFromLiteral)); |
| 73 return s_identifier; | 72 return s_identifier; |
| 74 } | 73 } |
| 75 | 74 |
| 76 const AtomicString& SVGFESpecularLightingElement::kernelUnitLengthYIdentifier() | 75 const AtomicString& SVGFESpecularLightingElement::kernelUnitLengthYIdentifier() |
| 77 { | 76 { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 ASSERT(renderer->style()); | 229 ASSERT(renderer->style()); |
| 231 Color color = renderer->style()->svgStyle()->lightingColor(); | 230 Color color = renderer->style()->svgStyle()->lightingColor(); |
| 232 | 231 |
| 233 RefPtr<FilterEffect> effect = FESpecularLighting::create(filter, color, surf
aceScaleCurrentValue(), specularConstantCurrentValue(), | 232 RefPtr<FilterEffect> effect = FESpecularLighting::create(filter, color, surf
aceScaleCurrentValue(), specularConstantCurrentValue(), |
| 234 specularExponentCurrentValue(), kernelUnitLengthXCurrentValue(), kernelU
nitLengthYCurrentValue(), lightSource.release()); | 233 specularExponentCurrentValue(), kernelUnitLengthXCurrentValue(), kernelU
nitLengthYCurrentValue(), lightSource.release()); |
| 235 effect->inputEffects().append(input1); | 234 effect->inputEffects().append(input1); |
| 236 return effect.release(); | 235 return effect.release(); |
| 237 } | 236 } |
| 238 | 237 |
| 239 } | 238 } |
| OLD | NEW |