OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 2 * Copyright (C) 2005 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEDiffuseLightingElement) | 42 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEDiffuseLightingElement) |
43 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) | 43 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) |
44 REGISTER_LOCAL_ANIMATED_PROPERTY(diffuseConstant) | 44 REGISTER_LOCAL_ANIMATED_PROPERTY(diffuseConstant) |
45 REGISTER_LOCAL_ANIMATED_PROPERTY(surfaceScale) | 45 REGISTER_LOCAL_ANIMATED_PROPERTY(surfaceScale) |
46 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX) | 46 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX) |
47 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY) | 47 REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY) |
48 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | 48 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) |
49 END_REGISTER_ANIMATED_PROPERTIES | 49 END_REGISTER_ANIMATED_PROPERTIES |
50 | 50 |
51 inline SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(const QualifiedN
ame& tagName, Document* document) | 51 inline SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(const QualifiedN
ame& tagName, Document& document) |
52 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 52 : SVGFilterPrimitiveStandardAttributes(tagName, document) |
53 , m_diffuseConstant(1) | 53 , m_diffuseConstant(1) |
54 , m_surfaceScale(1) | 54 , m_surfaceScale(1) |
55 { | 55 { |
56 ASSERT(hasTagName(SVGNames::feDiffuseLightingTag)); | 56 ASSERT(hasTagName(SVGNames::feDiffuseLightingTag)); |
57 ScriptWrappable::init(this); | 57 ScriptWrappable::init(this); |
58 registerAnimatedPropertiesForSVGFEDiffuseLightingElement(); | 58 registerAnimatedPropertiesForSVGFEDiffuseLightingElement(); |
59 } | 59 } |
60 | 60 |
61 PassRefPtr<SVGFEDiffuseLightingElement> SVGFEDiffuseLightingElement::create(cons
t QualifiedName& tagName, Document* document) | 61 PassRefPtr<SVGFEDiffuseLightingElement> SVGFEDiffuseLightingElement::create(cons
t QualifiedName& tagName, Document& document) |
62 { | 62 { |
63 return adoptRef(new SVGFEDiffuseLightingElement(tagName, document)); | 63 return adoptRef(new SVGFEDiffuseLightingElement(tagName, document)); |
64 } | 64 } |
65 | 65 |
66 const AtomicString& SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier() | 66 const AtomicString& SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier() |
67 { | 67 { |
68 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", Ato
micString::ConstructFromLiteral)); | 68 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGKernelUnitLengthX", Ato
micString::ConstructFromLiteral)); |
69 return s_identifier; | 69 return s_identifier; |
70 } | 70 } |
71 | 71 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 ASSERT(renderer->style()); | 219 ASSERT(renderer->style()); |
220 Color color = renderer->style()->svgStyle()->lightingColor(); | 220 Color color = renderer->style()->svgStyle()->lightingColor(); |
221 | 221 |
222 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, surfa
ceScaleCurrentValue(), diffuseConstantCurrentValue(), | 222 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, surfa
ceScaleCurrentValue(), diffuseConstantCurrentValue(), |
223 kernelUnitLengthXCurrentValue(), kernelUnitLengthYCurrentValue(), lightS
ource.release()); | 223 kernelUnitLengthXCurrentValue(), kernelUnitLengthYCurrentValue(), lightS
ource.release()); |
224 effect->inputEffects().append(input1); | 224 effect->inputEffects().append(input1); |
225 return effect.release(); | 225 return effect.release(); |
226 } | 226 } |
227 | 227 |
228 } | 228 } |
OLD | NEW |