| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document) | 50 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document) |
| 51 , m_radius(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAtt
r)) | 51 , m_radius(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAtt
r)) |
| 52 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 52 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
| 53 , m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create(this,
SVGNames::operatorAttr, FEMORPHOLOGY_OPERATOR_ERODE)) | 53 , m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create(this,
SVGNames::operatorAttr, FEMORPHOLOGY_OPERATOR_ERODE)) |
| 54 { | 54 { |
| 55 ScriptWrappable::init(this); | 55 ScriptWrappable::init(this); |
| 56 | 56 |
| 57 addToPropertyMap(m_radius); | 57 addToPropertyMap(m_radius); |
| 58 addToPropertyMap(m_in1); | 58 addToPropertyMap(m_in1); |
| 59 addToPropertyMap(m_svgOperator); | 59 addToPropertyMap(m_svgOperator); |
| 60 registerAnimatedPropertiesForSVGFEMorphologyElement(); | |
| 61 } | 60 } |
| 62 | 61 |
| 63 PassRefPtr<SVGFEMorphologyElement> SVGFEMorphologyElement::create(Document& docu
ment) | 62 PassRefPtr<SVGFEMorphologyElement> SVGFEMorphologyElement::create(Document& docu
ment) |
| 64 { | 63 { |
| 65 return adoptRef(new SVGFEMorphologyElement(document)); | 64 return adoptRef(new SVGFEMorphologyElement(document)); |
| 66 } | 65 } |
| 67 | 66 |
| 68 void SVGFEMorphologyElement::setRadius(float x, float y) | 67 void SVGFEMorphologyElement::setRadius(float x, float y) |
| 69 { | 68 { |
| 70 radiusX()->baseValue()->setValue(x); | 69 radiusX()->baseValue()->setValue(x); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 152 |
| 154 if (xRadius < 0 || yRadius < 0) | 153 if (xRadius < 0 || yRadius < 0) |
| 155 return nullptr; | 154 return nullptr; |
| 156 | 155 |
| 157 RefPtr<FilterEffect> effect = FEMorphology::create(filter, m_svgOperator->cu
rrentValue()->enumValue(), xRadius, yRadius); | 156 RefPtr<FilterEffect> effect = FEMorphology::create(filter, m_svgOperator->cu
rrentValue()->enumValue(), xRadius, yRadius); |
| 158 effect->inputEffects().append(input1); | 157 effect->inputEffects().append(input1); |
| 159 return effect.release(); | 158 return effect.release(); |
| 160 } | 159 } |
| 161 | 160 |
| 162 } // namespace WebCore | 161 } // namespace WebCore |
| OLD | NEW |