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(const QualifiedName& tagNa
me, Document& document) |
47 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 47 : SVGFilterPrimitiveStandardAttributes(tagName, document) |
48 , m_svgOperator(FEMORPHOLOGY_OPERATOR_ERODE) | 48 , m_svgOperator(FEMORPHOLOGY_OPERATOR_ERODE) |
49 { | 49 { |
50 ASSERT(hasTagName(SVGNames::feMorphologyTag)); | 50 ASSERT(hasTagName(SVGNames::feMorphologyTag)); |
51 ScriptWrappable::init(this); | 51 ScriptWrappable::init(this); |
52 registerAnimatedPropertiesForSVGFEMorphologyElement(); | 52 registerAnimatedPropertiesForSVGFEMorphologyElement(); |
53 } | 53 } |
54 | 54 |
55 PassRefPtr<SVGFEMorphologyElement> SVGFEMorphologyElement::create(const Qualifie
dName& tagName, Document* document) | 55 PassRefPtr<SVGFEMorphologyElement> SVGFEMorphologyElement::create(const Qualifie
dName& tagName, Document& document) |
56 { | 56 { |
57 return adoptRef(new SVGFEMorphologyElement(tagName, document)); | 57 return adoptRef(new SVGFEMorphologyElement(tagName, document)); |
58 } | 58 } |
59 | 59 |
60 const AtomicString& SVGFEMorphologyElement::radiusXIdentifier() | 60 const AtomicString& SVGFEMorphologyElement::radiusXIdentifier() |
61 { | 61 { |
62 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGRadiusX", AtomicString:
:ConstructFromLiteral)); | 62 DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGRadiusX", AtomicString:
:ConstructFromLiteral)); |
63 return s_identifier; | 63 return s_identifier; |
64 } | 64 } |
65 | 65 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 if (xRadius < 0 || yRadius < 0) | 168 if (xRadius < 0 || yRadius < 0) |
169 return 0; | 169 return 0; |
170 | 170 |
171 RefPtr<FilterEffect> effect = FEMorphology::create(filter, svgOperatorCurren
tValue(), xRadius, yRadius); | 171 RefPtr<FilterEffect> effect = FEMorphology::create(filter, svgOperatorCurren
tValue(), xRadius, yRadius); |
172 effect->inputEffects().append(input1); | 172 effect->inputEffects().append(input1); |
173 return effect.release(); | 173 return effect.release(); |
174 } | 174 } |
175 | 175 |
176 } // namespace WebCore | 176 } // namespace WebCore |
OLD | NEW |