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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement( | 76 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement( |
77 Document& document) | 77 Document& document) |
78 : SVGFilterPrimitiveStandardAttributes(SVGNames::feConvolveMatrixTag, | 78 : SVGFilterPrimitiveStandardAttributes(SVGNames::feConvolveMatrixTag, |
79 document), | 79 document), |
80 m_bias(SVGAnimatedNumber::create(this, | 80 m_bias(SVGAnimatedNumber::create(this, |
81 SVGNames::biasAttr, | 81 SVGNames::biasAttr, |
82 SVGNumber::create())), | 82 SVGNumber::create())), |
83 m_divisor(SVGAnimatedNumber::create(this, | 83 m_divisor(SVGAnimatedNumber::create(this, |
84 SVGNames::divisorAttr, | 84 SVGNames::divisorAttr, |
85 SVGNumber::create())), | 85 SVGNumber::create())), |
86 m_in1(SVGAnimatedString::create(this, | 86 m_in1(SVGAnimatedString::create(this, SVGNames::inAttr)), |
87 SVGNames::inAttr, | |
88 SVGString::create())), | |
89 m_edgeMode( | 87 m_edgeMode( |
90 SVGAnimatedEnumeration<EdgeModeType>::create(this, | 88 SVGAnimatedEnumeration<EdgeModeType>::create(this, |
91 SVGNames::edgeModeAttr, | 89 SVGNames::edgeModeAttr, |
92 EDGEMODE_DUPLICATE)), | 90 EDGEMODE_DUPLICATE)), |
93 m_kernelMatrix(SVGAnimatedNumberList::create(this, | 91 m_kernelMatrix( |
94 SVGNames::kernelMatrixAttr, | 92 SVGAnimatedNumberList::create(this, SVGNames::kernelMatrixAttr)), |
95 SVGNumberList::create())), | |
96 m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create( | 93 m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create( |
97 this, | 94 this, |
98 SVGNames::kernelUnitLengthAttr)), | 95 SVGNames::kernelUnitLengthAttr)), |
99 m_order(SVGAnimatedOrder::create(this)), | 96 m_order(SVGAnimatedOrder::create(this)), |
100 m_preserveAlpha(SVGAnimatedBoolean::create(this, | 97 m_preserveAlpha( |
101 SVGNames::preserveAlphaAttr, | 98 SVGAnimatedBoolean::create(this, SVGNames::preserveAlphaAttr)), |
102 SVGBoolean::create())), | |
103 m_targetX(SVGAnimatedInteger::create(this, | 99 m_targetX(SVGAnimatedInteger::create(this, |
104 SVGNames::targetXAttr, | 100 SVGNames::targetXAttr, |
105 SVGInteger::create())), | 101 SVGInteger::create())), |
106 m_targetY(SVGAnimatedInteger::create(this, | 102 m_targetY(SVGAnimatedInteger::create(this, |
107 SVGNames::targetYAttr, | 103 SVGNames::targetYAttr, |
108 SVGInteger::create())) { | 104 SVGInteger::create())) { |
109 addToPropertyMap(m_preserveAlpha); | 105 addToPropertyMap(m_preserveAlpha); |
110 addToPropertyMap(m_divisor); | 106 addToPropertyMap(m_divisor); |
111 addToPropertyMap(m_bias); | 107 addToPropertyMap(m_bias); |
112 addToPropertyMap(m_kernelUnitLength); | 108 addToPropertyMap(m_kernelUnitLength); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 FilterEffect* effect = FEConvolveMatrix::create( | 209 FilterEffect* effect = FEConvolveMatrix::create( |
214 filter, matrixOrder(), divisorValue, m_bias->currentValue()->value(), | 210 filter, matrixOrder(), divisorValue, m_bias->currentValue()->value(), |
215 targetPoint(), m_edgeMode->currentValue()->enumValue(), | 211 targetPoint(), m_edgeMode->currentValue()->enumValue(), |
216 m_preserveAlpha->currentValue()->value(), | 212 m_preserveAlpha->currentValue()->value(), |
217 m_kernelMatrix->currentValue()->toFloatVector()); | 213 m_kernelMatrix->currentValue()->toFloatVector()); |
218 effect->inputEffects().append(input1); | 214 effect->inputEffects().append(input1); |
219 return effect; | 215 return effect; |
220 } | 216 } |
221 | 217 |
222 } // namespace blink | 218 } // namespace blink |
OLD | NEW |