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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 return false; | 131 return false; |
132 } | 132 } |
133 | 133 |
134 void SVGFEDiffuseLightingElement::svgAttributeChanged(const QualifiedName& attrN
ame) | 134 void SVGFEDiffuseLightingElement::svgAttributeChanged(const QualifiedName& attrN
ame) |
135 { | 135 { |
136 if (!isSupportedAttribute(attrName)) { | 136 if (!isSupportedAttribute(attrName)) { |
137 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); | 137 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); |
138 return; | 138 return; |
139 } | 139 } |
140 | 140 |
141 SVGElementInstance::InvalidationGuard invalidationGuard(this); | 141 SVGElement::InvalidationGuard invalidationGuard(this); |
142 | 142 |
143 if (attrName == SVGNames::surfaceScaleAttr | 143 if (attrName == SVGNames::surfaceScaleAttr |
144 || attrName == SVGNames::diffuseConstantAttr | 144 || attrName == SVGNames::diffuseConstantAttr |
145 || attrName == SVGNames::kernelUnitLengthAttr | 145 || attrName == SVGNames::kernelUnitLengthAttr |
146 || attrName == SVGNames::lighting_colorAttr) { | 146 || attrName == SVGNames::lighting_colorAttr) { |
147 primitiveAttributeChanged(attrName); | 147 primitiveAttributeChanged(attrName); |
148 return; | 148 return; |
149 } | 149 } |
150 | 150 |
151 if (attrName == SVGNames::inAttr) { | 151 if (attrName == SVGNames::inAttr) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 ASSERT(renderer->style()); | 183 ASSERT(renderer->style()); |
184 Color color = renderer->style()->svgStyle()->lightingColor(); | 184 Color color = renderer->style()->svgStyle()->lightingColor(); |
185 | 185 |
186 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, m_sur
faceScale->currentValue()->value(), m_diffuseConstant->currentValue()->value(), | 186 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, m_sur
faceScale->currentValue()->value(), m_diffuseConstant->currentValue()->value(), |
187 kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->curre
ntValue()->value(), lightSource.release()); | 187 kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->curre
ntValue()->value(), lightSource.release()); |
188 effect->inputEffects().append(input1); | 188 effect->inputEffects().append(input1); |
189 return effect.release(); | 189 return effect.release(); |
190 } | 190 } |
191 | 191 |
192 } | 192 } |
OLD | NEW |