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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 { | 193 { |
194 if (SVGFELightElement::findLightElement(this) != lightElement) | 194 if (SVGFELightElement::findLightElement(this) != lightElement) |
195 return; | 195 return; |
196 | 196 |
197 // The light element has different attribute names. | 197 // The light element has different attribute names. |
198 primitiveAttributeChanged(attrName); | 198 primitiveAttributeChanged(attrName); |
199 } | 199 } |
200 | 200 |
201 PassRefPtr<FilterEffect> SVGFEDiffuseLightingElement::build(SVGFilterBuilder* fi
lterBuilder, Filter* filter) | 201 PassRefPtr<FilterEffect> SVGFEDiffuseLightingElement::build(SVGFilterBuilder* fi
lterBuilder, Filter* filter) |
202 { | 202 { |
203 FilterEffect* input1 = filterBuilder->getEffectById(in1CurrentValue()); | 203 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(in1CurrentV
alue())); |
204 | 204 |
205 if (!input1) | 205 if (!input1) |
206 return 0; | 206 return 0; |
207 | 207 |
208 RefPtr<LightSource> lightSource = SVGFELightElement::findLightSource(this); | 208 RefPtr<LightSource> lightSource = SVGFELightElement::findLightSource(this); |
209 if (!lightSource) | 209 if (!lightSource) |
210 return 0; | 210 return 0; |
211 | 211 |
212 RenderObject* renderer = this->renderer(); | 212 RenderObject* renderer = this->renderer(); |
213 if (!renderer) | 213 if (!renderer) |
214 return 0; | 214 return 0; |
215 | 215 |
216 ASSERT(renderer->style()); | 216 ASSERT(renderer->style()); |
217 Color color = renderer->style()->svgStyle()->lightingColor(); | 217 Color color = renderer->style()->svgStyle()->lightingColor(); |
218 | 218 |
219 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, surfa
ceScaleCurrentValue(), diffuseConstantCurrentValue(), | 219 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, surfa
ceScaleCurrentValue(), diffuseConstantCurrentValue(), |
220 kernelUnitLengthXCurrentValue(), kernelUnitLengthYCurrentValue(), lightS
ource.release()); | 220 kernelUnitLengthXCurrentValue(), kernelUnitLengthYCurrentValue(), lightS
ource.release()); |
221 effect->inputEffects().append(input1); | 221 effect->inputEffects().append(input1); |
222 return effect.release(); | 222 return effect.release(); |
223 } | 223 } |
224 | 224 |
225 } | 225 } |
OLD | NEW |