| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 if (attrName == SVGNames::edgeModeAttr) | 144 if (attrName == SVGNames::edgeModeAttr) |
| 145 return convolveMatrix->setEdgeMode(m_edgeMode->currentValue()->enumValue
()); | 145 return convolveMatrix->setEdgeMode(m_edgeMode->currentValue()->enumValue
()); |
| 146 if (attrName == SVGNames::divisorAttr) | 146 if (attrName == SVGNames::divisorAttr) |
| 147 return convolveMatrix->setDivisor(m_divisor->currentValue()->value()); | 147 return convolveMatrix->setDivisor(m_divisor->currentValue()->value()); |
| 148 if (attrName == SVGNames::biasAttr) | 148 if (attrName == SVGNames::biasAttr) |
| 149 return convolveMatrix->setBias(m_bias->currentValue()->value()); | 149 return convolveMatrix->setBias(m_bias->currentValue()->value()); |
| 150 if (attrName == SVGNames::targetXAttr || attrName == SVGNames::targetYAttr) | 150 if (attrName == SVGNames::targetXAttr || attrName == SVGNames::targetYAttr) |
| 151 return convolveMatrix->setTargetOffset(targetPoint()); | 151 return convolveMatrix->setTargetOffset(targetPoint()); |
| 152 if (attrName == SVGNames::preserveAlphaAttr) | 152 if (attrName == SVGNames::preserveAlphaAttr) |
| 153 return convolveMatrix->setPreserveAlpha(m_preserveAlpha->currentValue()-
>value()); | 153 return convolveMatrix->setPreserveAlpha(m_preserveAlpha->currentValue()-
>value()); |
| 154 | 154 return SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute(effect
, attrName); |
| 155 ASSERT_NOT_REACHED(); | |
| 156 return false; | |
| 157 } | 155 } |
| 158 | 156 |
| 159 void SVGFEConvolveMatrixElement::svgAttributeChanged(const QualifiedName& attrNa
me) | 157 void SVGFEConvolveMatrixElement::svgAttributeChanged(const QualifiedName& attrNa
me) |
| 160 { | 158 { |
| 161 if (attrName == SVGNames::edgeModeAttr | 159 if (attrName == SVGNames::edgeModeAttr |
| 162 || attrName == SVGNames::divisorAttr | 160 || attrName == SVGNames::divisorAttr |
| 163 || attrName == SVGNames::biasAttr | 161 || attrName == SVGNames::biasAttr |
| 164 || attrName == SVGNames::targetXAttr | 162 || attrName == SVGNames::targetXAttr |
| 165 || attrName == SVGNames::targetYAttr | 163 || attrName == SVGNames::targetYAttr |
| 166 || attrName == SVGNames::preserveAlphaAttr) { | 164 || attrName == SVGNames::preserveAlphaAttr) { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 197 | 195 |
| 198 FilterEffect* effect = FEConvolveMatrix::create(filter, | 196 FilterEffect* effect = FEConvolveMatrix::create(filter, |
| 199 matrixOrder(), divisorValue, | 197 matrixOrder(), divisorValue, |
| 200 m_bias->currentValue()->value(), targetPoint(), m_edgeMode->currentValue
()->enumValue(), | 198 m_bias->currentValue()->value(), targetPoint(), m_edgeMode->currentValue
()->enumValue(), |
| 201 m_preserveAlpha->currentValue()->value(), m_kernelMatrix->currentValue()
->toFloatVector()); | 199 m_preserveAlpha->currentValue()->value(), m_kernelMatrix->currentValue()
->toFloatVector()); |
| 202 effect->inputEffects().append(input1); | 200 effect->inputEffects().append(input1); |
| 203 return effect; | 201 return effect; |
| 204 } | 202 } |
| 205 | 203 |
| 206 } // namespace blink | 204 } // namespace blink |
| OLD | NEW |