Home | History | Annotate | Download | only in svg
      1 /*
      2  * Copyright (C) 2006 Oliver Hunt <oliver (at) nerget.com>
      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 SVGFEDisplacementMapElement_h
     21 #define SVGFEDisplacementMapElement_h
     22 
     23 #if ENABLE(SVG) && ENABLE(FILTERS)
     24 #include "FEDisplacementMap.h"
     25 #include "SVGAnimatedEnumeration.h"
     26 #include "SVGAnimatedNumber.h"
     27 #include "SVGFilterPrimitiveStandardAttributes.h"
     28 
     29 namespace WebCore {
     30 
     31 class SVGFEDisplacementMapElement : public SVGFilterPrimitiveStandardAttributes {
     32 public:
     33     static PassRefPtr<SVGFEDisplacementMapElement> create(const QualifiedName&, Document*);
     34 
     35     static ChannelSelectorType stringToChannel(const String&);
     36 
     37 private:
     38     SVGFEDisplacementMapElement(const QualifiedName& tagName, Document*);
     39 
     40     virtual void parseMappedAttribute(Attribute*);
     41     virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName);
     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     // Animated property declarations
     49     DECLARE_ANIMATED_STRING(In1, in1)
     50     DECLARE_ANIMATED_STRING(In2, in2)
     51     DECLARE_ANIMATED_ENUMERATION(XChannelSelector, xChannelSelector)
     52     DECLARE_ANIMATED_ENUMERATION(YChannelSelector, yChannelSelector)
     53     DECLARE_ANIMATED_NUMBER(Scale, scale)
     54 };
     55 
     56 } // namespace WebCore
     57 
     58 #endif // ENABLE(SVG)
     59 #endif // SVGFEDisplacementMapElement_h
     60