| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 return lightSource->setElevation(lightElement->elevation()->currentValue
()->value()); | 79 return lightSource->setElevation(lightElement->elevation()->currentValue
()->value()); |
| 80 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName =
= SVGNames::zAttr) | 80 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName =
= SVGNames::zAttr) |
| 81 return lightSource->setPosition(effect->getFilter()->resolve3dPoint(ligh
tElement->position())); | 81 return lightSource->setPosition(effect->getFilter()->resolve3dPoint(ligh
tElement->position())); |
| 82 if (attrName == SVGNames::pointsAtXAttr || attrName == SVGNames::pointsAtYAt
tr || attrName == SVGNames::pointsAtZAttr) | 82 if (attrName == SVGNames::pointsAtXAttr || attrName == SVGNames::pointsAtYAt
tr || attrName == SVGNames::pointsAtZAttr) |
| 83 return lightSource->setPointsAt(effect->getFilter()->resolve3dPoint(ligh
tElement->pointsAt())); | 83 return lightSource->setPointsAt(effect->getFilter()->resolve3dPoint(ligh
tElement->pointsAt())); |
| 84 if (attrName == SVGNames::specularExponentAttr) | 84 if (attrName == SVGNames::specularExponentAttr) |
| 85 return lightSource->setSpecularExponent(lightElement->specularExponent()
->currentValue()->value()); | 85 return lightSource->setSpecularExponent(lightElement->specularExponent()
->currentValue()->value()); |
| 86 if (attrName == SVGNames::limitingConeAngleAttr) | 86 if (attrName == SVGNames::limitingConeAngleAttr) |
| 87 return lightSource->setLimitingConeAngle(lightElement->limitingConeAngle
()->currentValue()->value()); | 87 return lightSource->setLimitingConeAngle(lightElement->limitingConeAngle
()->currentValue()->value()); |
| 88 | 88 |
| 89 ASSERT_NOT_REACHED(); | 89 return SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute(effect
, attrName); |
| 90 return false; | |
| 91 } | 90 } |
| 92 | 91 |
| 93 void SVGFEDiffuseLightingElement::svgAttributeChanged(const QualifiedName& attrN
ame) | 92 void SVGFEDiffuseLightingElement::svgAttributeChanged(const QualifiedName& attrN
ame) |
| 94 { | 93 { |
| 95 if (attrName == SVGNames::surfaceScaleAttr | 94 if (attrName == SVGNames::surfaceScaleAttr |
| 96 || attrName == SVGNames::diffuseConstantAttr | 95 || attrName == SVGNames::diffuseConstantAttr |
| 97 || attrName == SVGNames::lighting_colorAttr) { | 96 || attrName == SVGNames::lighting_colorAttr) { |
| 98 SVGElement::InvalidationGuard invalidationGuard(this); | 97 SVGElement::InvalidationGuard invalidationGuard(this); |
| 99 primitiveAttributeChanged(attrName); | 98 primitiveAttributeChanged(attrName); |
| 100 return; | 99 return; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 FilterEffect* effect = FEDiffuseLighting::create(filter, | 135 FilterEffect* effect = FEDiffuseLighting::create(filter, |
| 137 color, | 136 color, |
| 138 m_surfaceScale->currentValue()->value(), | 137 m_surfaceScale->currentValue()->value(), |
| 139 m_diffuseConstant->currentValue()->value(), | 138 m_diffuseConstant->currentValue()->value(), |
| 140 lightSource.release()); | 139 lightSource.release()); |
| 141 effect->inputEffects().append(input1); | 140 effect->inputEffects().append(input1); |
| 142 return effect; | 141 return effect; |
| 143 } | 142 } |
| 144 | 143 |
| 145 } // namespace blink | 144 } // namespace blink |
| OLD | NEW |