| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 , m_surfaceScale(SVGAnimatedNumber::create(this, SVGNames::surfaceScaleAttr,
SVGNumber::create(1))) | 42 , m_surfaceScale(SVGAnimatedNumber::create(this, SVGNames::surfaceScaleAttr,
SVGNumber::create(1))) |
| 43 , m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create(this, SVGNames:
:kernelUnitLengthAttr)) | 43 , m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create(this, SVGNames:
:kernelUnitLengthAttr)) |
| 44 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 44 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
| 45 { | 45 { |
| 46 ScriptWrappable::init(this); | 46 ScriptWrappable::init(this); |
| 47 | 47 |
| 48 addToPropertyMap(m_diffuseConstant); | 48 addToPropertyMap(m_diffuseConstant); |
| 49 addToPropertyMap(m_surfaceScale); | 49 addToPropertyMap(m_surfaceScale); |
| 50 addToPropertyMap(m_kernelUnitLength); | 50 addToPropertyMap(m_kernelUnitLength); |
| 51 addToPropertyMap(m_in1); | 51 addToPropertyMap(m_in1); |
| 52 registerAnimatedPropertiesForSVGFEDiffuseLightingElement(); | |
| 53 } | 52 } |
| 54 | 53 |
| 55 PassRefPtr<SVGFEDiffuseLightingElement> SVGFEDiffuseLightingElement::create(Docu
ment& document) | 54 PassRefPtr<SVGFEDiffuseLightingElement> SVGFEDiffuseLightingElement::create(Docu
ment& document) |
| 56 { | 55 { |
| 57 return adoptRef(new SVGFEDiffuseLightingElement(document)); | 56 return adoptRef(new SVGFEDiffuseLightingElement(document)); |
| 58 } | 57 } |
| 59 | 58 |
| 60 bool SVGFEDiffuseLightingElement::isSupportedAttribute(const QualifiedName& attr
Name) | 59 bool SVGFEDiffuseLightingElement::isSupportedAttribute(const QualifiedName& attr
Name) |
| 61 { | 60 { |
| 62 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 61 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 ASSERT(renderer->style()); | 189 ASSERT(renderer->style()); |
| 191 Color color = renderer->style()->svgStyle()->lightingColor(); | 190 Color color = renderer->style()->svgStyle()->lightingColor(); |
| 192 | 191 |
| 193 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, m_sur
faceScale->currentValue()->value(), m_diffuseConstant->currentValue()->value(), | 192 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, m_sur
faceScale->currentValue()->value(), m_diffuseConstant->currentValue()->value(), |
| 194 kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->curre
ntValue()->value(), lightSource.release()); | 193 kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->curre
ntValue()->value(), lightSource.release()); |
| 195 effect->inputEffects().append(input1); | 194 effect->inputEffects().append(input1); |
| 196 return effect.release(); | 195 return effect.release(); |
| 197 } | 196 } |
| 198 | 197 |
| 199 } | 198 } |
| OLD | NEW |