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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 m_preserveAlpha->setBaseValueAsString(value, parseError); | 124 m_preserveAlpha->setBaseValueAsString(value, parseError); |
125 else if (name == SVGNames::edgeModeAttr) | 125 else if (name == SVGNames::edgeModeAttr) |
126 m_edgeMode->setBaseValueAsString(value, parseError); | 126 m_edgeMode->setBaseValueAsString(value, parseError); |
127 else if (name == SVGNames::targetXAttr) | 127 else if (name == SVGNames::targetXAttr) |
128 m_targetX->setBaseValueAsString(value, parseError); | 128 m_targetX->setBaseValueAsString(value, parseError); |
129 else if (name == SVGNames::targetYAttr) | 129 else if (name == SVGNames::targetYAttr) |
130 m_targetY->setBaseValueAsString(value, parseError); | 130 m_targetY->setBaseValueAsString(value, parseError); |
131 else if (name == SVGNames::orderAttr) { | 131 else if (name == SVGNames::orderAttr) { |
132 m_order->setBaseValueAsString(value, parseError); | 132 m_order->setBaseValueAsString(value, parseError); |
133 if (parseError == NoError && (orderX()->baseValue()->value() < 1 || orde
rY()->baseValue()->value() < 1)) { | 133 if (parseError == NoError && (orderX()->baseValue()->value() < 1 || orde
rY()->baseValue()->value() < 1)) { |
134 document().accessSVGExtensions()->reportWarning( | 134 document().accessSVGExtensions().reportWarning( |
135 "feConvolveMatrix: problem parsing order=\"" + value | 135 "feConvolveMatrix: problem parsing order=\"" + value |
136 + "\". Filtered element will not be displayed."); | 136 + "\". Filtered element will not be displayed."); |
137 } | 137 } |
138 } else | 138 } else |
139 ASSERT_NOT_REACHED(); | 139 ASSERT_NOT_REACHED(); |
140 | 140 |
141 reportAttributeParsingError(parseError, name, value); | 141 reportAttributeParsingError(parseError, name, value); |
142 } | 142 } |
143 | 143 |
144 bool SVGFEConvolveMatrixElement::setFilterEffectAttribute(FilterEffect* effect,
const QualifiedName& attrName) | 144 bool SVGFEConvolveMatrixElement::setFilterEffectAttribute(FilterEffect* effect,
const QualifiedName& attrName) |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 251 |
252 RefPtr<FilterEffect> effect = FEConvolveMatrix::create(filter, | 252 RefPtr<FilterEffect> effect = FEConvolveMatrix::create(filter, |
253 IntSize(orderXValue, orderYValue), divisorValue, | 253 IntSize(orderXValue, orderYValue), divisorValue, |
254 m_bias->currentValue()->value(), IntPoint(targetXValue, targ
etYValue), m_edgeMode->currentValue()->enumValue(), | 254 m_bias->currentValue()->value(), IntPoint(targetXValue, targ
etYValue), m_edgeMode->currentValue()->enumValue(), |
255 FloatPoint(kernelUnitLengthXValue, kernelUnitLengthYValue),
m_preserveAlpha->currentValue()->value(), m_kernelMatrix->currentValue()->toFloa
tVector()); | 255 FloatPoint(kernelUnitLengthXValue, kernelUnitLengthYValue),
m_preserveAlpha->currentValue()->value(), m_kernelMatrix->currentValue()->toFloa
tVector()); |
256 effect->inputEffects().append(input1); | 256 effect->inputEffects().append(input1); |
257 return effect.release(); | 257 return effect.release(); |
258 } | 258 } |
259 | 259 |
260 } // namespace WebCore | 260 } // namespace WebCore |
OLD | NEW |