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 25 matching lines...) Expand all Loading... |
36 DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEMorphologyElement, SVGNames::radiu
sAttr, radiusYIdentifier(), RadiusY, radiusY) | 36 DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEMorphologyElement, SVGNames::radiu
sAttr, radiusYIdentifier(), RadiusY, radiusY) |
37 | 37 |
38 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEMorphologyElement) | 38 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEMorphologyElement) |
39 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) | 39 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) |
40 REGISTER_LOCAL_ANIMATED_PROPERTY(svgOperator) | 40 REGISTER_LOCAL_ANIMATED_PROPERTY(svgOperator) |
41 REGISTER_LOCAL_ANIMATED_PROPERTY(radiusX) | 41 REGISTER_LOCAL_ANIMATED_PROPERTY(radiusX) |
42 REGISTER_LOCAL_ANIMATED_PROPERTY(radiusY) | 42 REGISTER_LOCAL_ANIMATED_PROPERTY(radiusY) |
43 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | 43 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) |
44 END_REGISTER_ANIMATED_PROPERTIES | 44 END_REGISTER_ANIMATED_PROPERTIES |
45 | 45 |
46 inline SVGFEMorphologyElement::SVGFEMorphologyElement(const QualifiedName& tagNa
me, Document& document) | 46 inline SVGFEMorphologyElement::SVGFEMorphologyElement(Document& document) |
47 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 47 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document) |
48 , m_svgOperator(FEMORPHOLOGY_OPERATOR_ERODE) | 48 , m_svgOperator(FEMORPHOLOGY_OPERATOR_ERODE) |
49 { | 49 { |
50 ASSERT(hasTagName(SVGNames::feMorphologyTag)); | |
51 ScriptWrappable::init(this); | 50 ScriptWrappable::init(this); |
52 registerAnimatedPropertiesForSVGFEMorphologyElement(); | 51 registerAnimatedPropertiesForSVGFEMorphologyElement(); |
53 } | 52 } |
54 | 53 |
55 PassRefPtr<SVGFEMorphologyElement> SVGFEMorphologyElement::create(const Qualifie
dName& tagName, Document& document) | 54 PassRefPtr<SVGFEMorphologyElement> SVGFEMorphologyElement::create(Document& docu
ment) |
56 { | 55 { |
57 return adoptRef(new SVGFEMorphologyElement(tagName, document)); | 56 return adoptRef(new SVGFEMorphologyElement(document)); |
58 } | 57 } |
59 | 58 |
60 const AtomicString& SVGFEMorphologyElement::radiusXIdentifier() | 59 const AtomicString& SVGFEMorphologyElement::radiusXIdentifier() |
61 { | 60 { |
62 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGRadiusX", AtomicString:
:ConstructFromLiteral)); | 61 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGRadiusX", AtomicString:
:ConstructFromLiteral)); |
63 return s_identifier; | 62 return s_identifier; |
64 } | 63 } |
65 | 64 |
66 const AtomicString& SVGFEMorphologyElement::radiusYIdentifier() | 65 const AtomicString& SVGFEMorphologyElement::radiusYIdentifier() |
67 { | 66 { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 166 |
168 if (xRadius < 0 || yRadius < 0) | 167 if (xRadius < 0 || yRadius < 0) |
169 return 0; | 168 return 0; |
170 | 169 |
171 RefPtr<FilterEffect> effect = FEMorphology::create(filter, svgOperatorCurren
tValue(), xRadius, yRadius); | 170 RefPtr<FilterEffect> effect = FEMorphology::create(filter, svgOperatorCurren
tValue(), xRadius, yRadius); |
172 effect->inputEffects().append(input1); | 171 effect->inputEffects().append(input1); |
173 return effect.release(); | 172 return effect.release(); |
174 } | 173 } |
175 | 174 |
176 } // namespace WebCore | 175 } // namespace WebCore |
OLD | NEW |