OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com> | 4 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com> |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 return specularLighting->setSurfaceScale(m_surfaceScale->currentValue()-
>value()); | 70 return specularLighting->setSurfaceScale(m_surfaceScale->currentValue()-
>value()); |
71 if (attrName == SVGNames::specularConstantAttr) | 71 if (attrName == SVGNames::specularConstantAttr) |
72 return specularLighting->setSpecularConstant(m_specularConstant->current
Value()->value()); | 72 return specularLighting->setSpecularConstant(m_specularConstant->current
Value()->value()); |
73 if (attrName == SVGNames::specularExponentAttr) | 73 if (attrName == SVGNames::specularExponentAttr) |
74 return specularLighting->setSpecularExponent(m_specularExponent->current
Value()->value()); | 74 return specularLighting->setSpecularExponent(m_specularExponent->current
Value()->value()); |
75 | 75 |
76 LightSource* lightSource = const_cast<LightSource*>(specularLighting->lightS
ource()); | 76 LightSource* lightSource = const_cast<LightSource*>(specularLighting->lightS
ource()); |
77 SVGFELightElement* lightElement = SVGFELightElement::findLightElement(*this)
; | 77 SVGFELightElement* lightElement = SVGFELightElement::findLightElement(*this)
; |
78 ASSERT(lightSource); | 78 ASSERT(lightSource); |
79 ASSERT(lightElement); | 79 ASSERT(lightElement); |
80 ASSERT(effect->filter()); | 80 ASSERT(effect->getFilter()); |
81 | 81 |
82 if (attrName == SVGNames::azimuthAttr) | 82 if (attrName == SVGNames::azimuthAttr) |
83 return lightSource->setAzimuth(lightElement->azimuth()->currentValue()->
value()); | 83 return lightSource->setAzimuth(lightElement->azimuth()->currentValue()->
value()); |
84 if (attrName == SVGNames::elevationAttr) | 84 if (attrName == SVGNames::elevationAttr) |
85 return lightSource->setElevation(lightElement->elevation()->currentValue
()->value()); | 85 return lightSource->setElevation(lightElement->elevation()->currentValue
()->value()); |
86 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName =
= SVGNames::zAttr) | 86 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName =
= SVGNames::zAttr) |
87 return lightSource->setPosition(effect->filter()->resolve3dPoint(lightEl
ement->position())); | 87 return lightSource->setPosition(effect->getFilter()->resolve3dPoint(ligh
tElement->position())); |
88 if (attrName == SVGNames::pointsAtXAttr || attrName == SVGNames::pointsAtYAt
tr || attrName == SVGNames::pointsAtZAttr) | 88 if (attrName == SVGNames::pointsAtXAttr || attrName == SVGNames::pointsAtYAt
tr || attrName == SVGNames::pointsAtZAttr) |
89 return lightSource->setPointsAt(effect->filter()->resolve3dPoint(lightEl
ement->pointsAt())); | 89 return lightSource->setPointsAt(effect->getFilter()->resolve3dPoint(ligh
tElement->pointsAt())); |
90 if (attrName == SVGNames::specularExponentAttr) | 90 if (attrName == SVGNames::specularExponentAttr) |
91 return lightSource->setSpecularExponent(lightElement->specularExponent()
->currentValue()->value()); | 91 return lightSource->setSpecularExponent(lightElement->specularExponent()
->currentValue()->value()); |
92 if (attrName == SVGNames::limitingConeAngleAttr) | 92 if (attrName == SVGNames::limitingConeAngleAttr) |
93 return lightSource->setLimitingConeAngle(lightElement->limitingConeAngle
()->currentValue()->value()); | 93 return lightSource->setLimitingConeAngle(lightElement->limitingConeAngle
()->currentValue()->value()); |
94 | 94 |
95 ASSERT_NOT_REACHED(); | 95 ASSERT_NOT_REACHED(); |
96 return false; | 96 return false; |
97 } | 97 } |
98 | 98 |
99 void SVGFESpecularLightingElement::svgAttributeChanged(const QualifiedName& attr
Name) | 99 void SVGFESpecularLightingElement::svgAttributeChanged(const QualifiedName& attr
Name) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 color, | 143 color, |
144 m_surfaceScale->currentValue()->value(), | 144 m_surfaceScale->currentValue()->value(), |
145 m_specularConstant->currentValue()->value(), | 145 m_specularConstant->currentValue()->value(), |
146 m_specularExponent->currentValue()->value(), | 146 m_specularExponent->currentValue()->value(), |
147 lightSource.release()); | 147 lightSource.release()); |
148 effect->inputEffects().append(input1); | 148 effect->inputEffects().append(input1); |
149 return effect.release(); | 149 return effect.release(); |
150 } | 150 } |
151 | 151 |
152 } // namespace blink | 152 } // namespace blink |
OLD | NEW |