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 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 if (attrName == SVGNames::baseFrequencyAttr) { | 82 if (attrName == SVGNames::baseFrequencyAttr) { |
83 bool baseFrequencyXChanged = turbulence->setBaseFrequencyX(baseFrequency
X()->currentValue()->value()); | 83 bool baseFrequencyXChanged = turbulence->setBaseFrequencyX(baseFrequency
X()->currentValue()->value()); |
84 bool baseFrequencyYChanged = turbulence->setBaseFrequencyY(baseFrequency
Y()->currentValue()->value()); | 84 bool baseFrequencyYChanged = turbulence->setBaseFrequencyY(baseFrequency
Y()->currentValue()->value()); |
85 return (baseFrequencyXChanged || baseFrequencyYChanged); | 85 return (baseFrequencyXChanged || baseFrequencyYChanged); |
86 } | 86 } |
87 if (attrName == SVGNames::seedAttr) | 87 if (attrName == SVGNames::seedAttr) |
88 return turbulence->setSeed(m_seed->currentValue()->value()); | 88 return turbulence->setSeed(m_seed->currentValue()->value()); |
89 if (attrName == SVGNames::numOctavesAttr) | 89 if (attrName == SVGNames::numOctavesAttr) |
90 return turbulence->setNumOctaves(m_numOctaves->currentValue()->value()); | 90 return turbulence->setNumOctaves(m_numOctaves->currentValue()->value()); |
91 | 91 |
92 ASSERT_NOT_REACHED(); | 92 return SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute(effect
, attrName); |
93 return false; | |
94 } | 93 } |
95 | 94 |
96 void SVGFETurbulenceElement::svgAttributeChanged(const QualifiedName& attrName) | 95 void SVGFETurbulenceElement::svgAttributeChanged(const QualifiedName& attrName) |
97 { | 96 { |
98 if (attrName == SVGNames::baseFrequencyAttr | 97 if (attrName == SVGNames::baseFrequencyAttr |
99 || attrName == SVGNames::numOctavesAttr | 98 || attrName == SVGNames::numOctavesAttr |
100 || attrName == SVGNames::seedAttr | 99 || attrName == SVGNames::seedAttr |
101 || attrName == SVGNames::stitchTilesAttr | 100 || attrName == SVGNames::stitchTilesAttr |
102 || attrName == SVGNames::typeAttr) { | 101 || attrName == SVGNames::typeAttr) { |
103 SVGElement::InvalidationGuard invalidationGuard(this); | 102 SVGElement::InvalidationGuard invalidationGuard(this); |
104 primitiveAttributeChanged(attrName); | 103 primitiveAttributeChanged(attrName); |
105 return; | 104 return; |
106 } | 105 } |
107 | 106 |
108 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); | 107 SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName); |
109 } | 108 } |
110 | 109 |
111 FilterEffect* SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter* filter) | 110 FilterEffect* SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter* filter) |
112 { | 111 { |
113 return FETurbulence::create(filter, | 112 return FETurbulence::create(filter, |
114 m_type->currentValue()->enumValue(), | 113 m_type->currentValue()->enumValue(), |
115 baseFrequencyX()->currentValue()->value(), | 114 baseFrequencyX()->currentValue()->value(), |
116 baseFrequencyY()->currentValue()->value(), | 115 baseFrequencyY()->currentValue()->value(), |
117 m_numOctaves->currentValue()->value(), | 116 m_numOctaves->currentValue()->value(), |
118 m_seed->currentValue()->value(), | 117 m_seed->currentValue()->value(), |
119 m_stitchTiles->currentValue()->enumValue() == SVG_STITCHTYPE_STITCH); | 118 m_stitchTiles->currentValue()->enumValue() == SVG_STITCHTYPE_STITCH); |
120 } | 119 } |
121 | 120 |
122 } // namespace blink | 121 } // namespace blink |
OLD | NEW |