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 22 matching lines...) Expand all Loading... |
33 document), | 33 document), |
34 m_diffuseConstant(SVGAnimatedNumber::create(this, | 34 m_diffuseConstant(SVGAnimatedNumber::create(this, |
35 SVGNames::diffuseConstantAttr, | 35 SVGNames::diffuseConstantAttr, |
36 SVGNumber::create(1))), | 36 SVGNumber::create(1))), |
37 m_surfaceScale(SVGAnimatedNumber::create(this, | 37 m_surfaceScale(SVGAnimatedNumber::create(this, |
38 SVGNames::surfaceScaleAttr, | 38 SVGNames::surfaceScaleAttr, |
39 SVGNumber::create(1))), | 39 SVGNumber::create(1))), |
40 m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create( | 40 m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create( |
41 this, | 41 this, |
42 SVGNames::kernelUnitLengthAttr)), | 42 SVGNames::kernelUnitLengthAttr)), |
43 m_in1(SVGAnimatedString::create(this, | 43 m_in1(SVGAnimatedString::create(this, SVGNames::inAttr)) { |
44 SVGNames::inAttr, | |
45 SVGString::create())) { | |
46 addToPropertyMap(m_diffuseConstant); | 44 addToPropertyMap(m_diffuseConstant); |
47 addToPropertyMap(m_surfaceScale); | 45 addToPropertyMap(m_surfaceScale); |
48 addToPropertyMap(m_kernelUnitLength); | 46 addToPropertyMap(m_kernelUnitLength); |
49 addToPropertyMap(m_in1); | 47 addToPropertyMap(m_in1); |
50 } | 48 } |
51 | 49 |
52 DEFINE_TRACE(SVGFEDiffuseLightingElement) { | 50 DEFINE_TRACE(SVGFEDiffuseLightingElement) { |
53 visitor->trace(m_diffuseConstant); | 51 visitor->trace(m_diffuseConstant); |
54 visitor->trace(m_surfaceScale); | 52 visitor->trace(m_surfaceScale); |
55 visitor->trace(m_kernelUnitLength); | 53 visitor->trace(m_kernelUnitLength); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 lightNode ? lightNode->lightSource(filter) : nullptr; | 159 lightNode ? lightNode->lightSource(filter) : nullptr; |
162 | 160 |
163 FilterEffect* effect = FEDiffuseLighting::create( | 161 FilterEffect* effect = FEDiffuseLighting::create( |
164 filter, color, m_surfaceScale->currentValue()->value(), | 162 filter, color, m_surfaceScale->currentValue()->value(), |
165 m_diffuseConstant->currentValue()->value(), lightSource.release()); | 163 m_diffuseConstant->currentValue()->value(), lightSource.release()); |
166 effect->inputEffects().append(input1); | 164 effect->inputEffects().append(input1); |
167 return effect; | 165 return effect; |
168 } | 166 } |
169 | 167 |
170 } // namespace blink | 168 } // namespace blink |
OLD | NEW |