• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB.  If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef SVGFEMorphologyElement_h
21 #define SVGFEMorphologyElement_h
22 
23 #if ENABLE(SVG) && ENABLE(FILTERS)
24 #include "FEMorphology.h"
25 #include "SVGAnimatedEnumeration.h"
26 #include "SVGAnimatedNumber.h"
27 #include "SVGFilterPrimitiveStandardAttributes.h"
28 
29 namespace WebCore {
30 
31 class SVGFEMorphologyElement : public SVGFilterPrimitiveStandardAttributes {
32 public:
33     static PassRefPtr<SVGFEMorphologyElement> create(const QualifiedName&, Document*);
34 
35     void setRadius(float radiusX, float radiusY);
36 
37 private:
38     SVGFEMorphologyElement(const QualifiedName&, Document*);
39 
40     virtual void parseMappedAttribute(Attribute*);
41     virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&);
42     virtual void svgAttributeChanged(const QualifiedName&);
43     virtual void synchronizeProperty(const QualifiedName&);
44     virtual void fillAttributeToPropertyTypeMap();
45     virtual AttributeToPropertyTypeMap& attributeToPropertyTypeMap();
46     virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*);
47 
48     static const AtomicString& radiusXIdentifier();
49     static const AtomicString& radiusYIdentifier();
50 
51     // Animated property declarations
52     DECLARE_ANIMATED_STRING(In1, in1)
53     DECLARE_ANIMATED_ENUMERATION(_operator, _operator)
54     DECLARE_ANIMATED_NUMBER(RadiusX, radiusX)
55     DECLARE_ANIMATED_NUMBER(RadiusY, radiusY)
56 };
57 
58 } // namespace WebCore
59 
60 #endif // ENABLE(SVG)
61 #endif
62