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 21 matching lines...) Expand all Loading... |
32 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_ERODE, "erode")); | 32 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_ERODE, "erode")); |
33 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_DILATE, "dilate")); | 33 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_DILATE, "dilate")); |
34 } | 34 } |
35 return entries; | 35 return entries; |
36 } | 36 } |
37 | 37 |
38 inline SVGFEMorphologyElement::SVGFEMorphologyElement(Document& document) | 38 inline SVGFEMorphologyElement::SVGFEMorphologyElement(Document& document) |
39 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document), | 39 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document), |
40 m_radius( | 40 m_radius( |
41 SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAttr)), | 41 SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAttr)), |
42 m_in1(SVGAnimatedString::create(this, | 42 m_in1(SVGAnimatedString::create(this, SVGNames::inAttr)), |
43 SVGNames::inAttr, | |
44 SVGString::create())), | |
45 m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create( | 43 m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create( |
46 this, | 44 this, |
47 SVGNames::operatorAttr, | 45 SVGNames::operatorAttr, |
48 FEMORPHOLOGY_OPERATOR_ERODE)) { | 46 FEMORPHOLOGY_OPERATOR_ERODE)) { |
49 addToPropertyMap(m_radius); | 47 addToPropertyMap(m_radius); |
50 addToPropertyMap(m_in1); | 48 addToPropertyMap(m_in1); |
51 addToPropertyMap(m_svgOperator); | 49 addToPropertyMap(m_svgOperator); |
52 } | 50 } |
53 | 51 |
54 DEFINE_TRACE(SVGFEMorphologyElement) { | 52 DEFINE_TRACE(SVGFEMorphologyElement) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // (This is handled by FEMorphology) | 109 // (This is handled by FEMorphology) |
112 float xRadius = radiusX()->currentValue()->value(); | 110 float xRadius = radiusX()->currentValue()->value(); |
113 float yRadius = radiusY()->currentValue()->value(); | 111 float yRadius = radiusY()->currentValue()->value(); |
114 FilterEffect* effect = FEMorphology::create( | 112 FilterEffect* effect = FEMorphology::create( |
115 filter, m_svgOperator->currentValue()->enumValue(), xRadius, yRadius); | 113 filter, m_svgOperator->currentValue()->enumValue(), xRadius, yRadius); |
116 effect->inputEffects().append(input1); | 114 effect->inputEffects().append(input1); |
117 return effect; | 115 return effect; |
118 } | 116 } |
119 | 117 |
120 } // namespace blink | 118 } // namespace blink |
OLD | NEW |