1 /* 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann (at) kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis (at) kde.org> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public License 16 * along with this library; see the file COPYING.LIB. If not, write to 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef SVGComponentTransferFunctionElement_h 22 #define SVGComponentTransferFunctionElement_h 23 24 #include "core/svg/SVGAnimatedEnumeration.h" 25 #include "core/svg/SVGAnimatedNumber.h" 26 #include "core/svg/SVGAnimatedNumberList.h" 27 #include "core/svg/SVGElement.h" 28 #include "platform/graphics/filters/FEComponentTransfer.h" 29 30 namespace blink { 31 32 template<> const SVGEnumerationStringEntries& getStaticStringEntries<ComponentTransferType>(); 33 34 class SVGComponentTransferFunctionElement : public SVGElement { 35 DEFINE_WRAPPERTYPEINFO(); 36 public: 37 ComponentTransferFunction transferFunction() const; 38 39 SVGAnimatedNumberList* tableValues() { return m_tableValues.get(); } 40 SVGAnimatedNumber* slope() { return m_slope.get(); } 41 SVGAnimatedNumber* intercept() { return m_intercept.get(); } 42 SVGAnimatedNumber* amplitude() { return m_amplitude.get(); } 43 SVGAnimatedNumber* exponent() { return m_exponent.get(); } 44 SVGAnimatedNumber* offset() { return m_offset.get(); } 45 SVGAnimatedEnumeration<ComponentTransferType>* type() { return m_type.get(); } 46 47 protected: 48 SVGComponentTransferFunctionElement(const QualifiedName&, Document&); 49 50 bool isSupportedAttribute(const QualifiedName&); 51 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE FINAL; 52 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE FINAL; 53 54 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE FINAL { return false; } 55 56 private: 57 RefPtr<SVGAnimatedNumberList> m_tableValues; 58 RefPtr<SVGAnimatedNumber> m_slope; 59 RefPtr<SVGAnimatedNumber> m_intercept; 60 RefPtr<SVGAnimatedNumber> m_amplitude; 61 RefPtr<SVGAnimatedNumber> m_exponent; 62 RefPtr<SVGAnimatedNumber> m_offset; 63 RefPtr<SVGAnimatedEnumeration<ComponentTransferType> > m_type; 64 }; 65 66 } // namespace blink 67 68 #endif // SVGComponentTransferFunctionElement_h 69