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 26 matching lines...) Expand all Loading... |
37 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); | 37 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); |
38 if (entries.isEmpty()) { | 38 if (entries.isEmpty()) { |
39 entries.append(std::make_pair(EDGEMODE_UNKNOWN, emptyString())); | 39 entries.append(std::make_pair(EDGEMODE_UNKNOWN, emptyString())); |
40 entries.append(std::make_pair(EDGEMODE_DUPLICATE, "duplicate")); | 40 entries.append(std::make_pair(EDGEMODE_DUPLICATE, "duplicate")); |
41 entries.append(std::make_pair(EDGEMODE_WRAP, "wrap")); | 41 entries.append(std::make_pair(EDGEMODE_WRAP, "wrap")); |
42 entries.append(std::make_pair(EDGEMODE_NONE, "none")); | 42 entries.append(std::make_pair(EDGEMODE_NONE, "none")); |
43 } | 43 } |
44 return entries; | 44 return entries; |
45 } | 45 } |
46 | 46 |
47 // Animated property definitions | |
48 | |
49 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEConvolveMatrixElement) | |
50 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | |
51 END_REGISTER_ANIMATED_PROPERTIES | |
52 | |
53 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(Document& document
) | 47 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(Document& document
) |
54 : SVGFilterPrimitiveStandardAttributes(SVGNames::feConvolveMatrixTag, docume
nt) | 48 : SVGFilterPrimitiveStandardAttributes(SVGNames::feConvolveMatrixTag, docume
nt) |
55 , m_bias(SVGAnimatedNumber::create(this, SVGNames::biasAttr, SVGNumber::crea
te())) | 49 , m_bias(SVGAnimatedNumber::create(this, SVGNames::biasAttr, SVGNumber::crea
te())) |
56 , m_divisor(SVGAnimatedNumber::create(this, SVGNames::divisorAttr, SVGNumber
::create())) | 50 , m_divisor(SVGAnimatedNumber::create(this, SVGNames::divisorAttr, SVGNumber
::create())) |
57 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 51 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
58 , m_edgeMode(SVGAnimatedEnumeration<EdgeModeType>::create(this, SVGNames::ed
geModeAttr, EDGEMODE_DUPLICATE)) | 52 , m_edgeMode(SVGAnimatedEnumeration<EdgeModeType>::create(this, SVGNames::ed
geModeAttr, EDGEMODE_DUPLICATE)) |
59 , m_kernelMatrix(SVGAnimatedNumberList::create(this, SVGNames::kernelMatrixA
ttr, SVGNumberList::create())) | 53 , m_kernelMatrix(SVGAnimatedNumberList::create(this, SVGNames::kernelMatrixA
ttr, SVGNumberList::create())) |
60 , m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create(this, SVGNames:
:kernelUnitLengthAttr)) | 54 , m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create(this, SVGNames:
:kernelUnitLengthAttr)) |
61 , m_order(SVGAnimatedIntegerOptionalInteger::create(this, SVGNames::orderAtt
r)) | 55 , m_order(SVGAnimatedIntegerOptionalInteger::create(this, SVGNames::orderAtt
r)) |
62 , m_preserveAlpha(SVGAnimatedBoolean::create(this, SVGNames::preserveAlphaAt
tr, SVGBoolean::create())) | 56 , m_preserveAlpha(SVGAnimatedBoolean::create(this, SVGNames::preserveAlphaAt
tr, SVGBoolean::create())) |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 | 244 |
251 RefPtr<FilterEffect> effect = FEConvolveMatrix::create(filter, | 245 RefPtr<FilterEffect> effect = FEConvolveMatrix::create(filter, |
252 IntSize(orderXValue, orderYValue), divisorValue, | 246 IntSize(orderXValue, orderYValue), divisorValue, |
253 m_bias->currentValue()->value(), IntPoint(targetXValue, targ
etYValue), m_edgeMode->currentValue()->enumValue(), | 247 m_bias->currentValue()->value(), IntPoint(targetXValue, targ
etYValue), m_edgeMode->currentValue()->enumValue(), |
254 FloatPoint(kernelUnitLengthXValue, kernelUnitLengthYValue),
m_preserveAlpha->currentValue()->value(), m_kernelMatrix->currentValue()->toFloa
tVector()); | 248 FloatPoint(kernelUnitLengthXValue, kernelUnitLengthYValue),
m_preserveAlpha->currentValue()->value(), m_kernelMatrix->currentValue()->toFloa
tVector()); |
255 effect->inputEffects().append(input1); | 249 effect->inputEffects().append(input1); |
256 return effect.release(); | 250 return effect.release(); |
257 } | 251 } |
258 | 252 |
259 } // namespace WebCore | 253 } // namespace WebCore |
OLD | NEW |