2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
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.
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.
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.
21 #ifndef SVGComponentTransferFunctionElement_h
22 #define SVGComponentTransferFunctionElement_h
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"
32 template<> const SVGEnumerationStringEntries& getStaticStringEntries<ComponentTransferType>();
34 class SVGComponentTransferFunctionElement : public SVGElement {
36 ComponentTransferFunction transferFunction() const;
38 SVGAnimatedNumberList* tableValues() { return m_tableValues.get(); }
39 SVGAnimatedNumber* slope() { return m_slope.get(); }
40 SVGAnimatedNumber* intercept() { return m_intercept.get(); }
41 SVGAnimatedNumber* amplitude() { return m_amplitude.get(); }
42 SVGAnimatedNumber* exponent() { return m_exponent.get(); }
43 SVGAnimatedNumber* offset() { return m_offset.get(); }
44 SVGAnimatedEnumeration<ComponentTransferType>* type() { return m_type.get(); }
47 SVGComponentTransferFunctionElement(const QualifiedName&, Document&);
49 bool isSupportedAttribute(const QualifiedName&);
50 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE FINAL;
51 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE FINAL;
53 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE FINAL { return false; }
56 RefPtr<SVGAnimatedNumberList> m_tableValues;
57 RefPtr<SVGAnimatedNumber> m_slope;
58 RefPtr<SVGAnimatedNumber> m_intercept;
59 RefPtr<SVGAnimatedNumber> m_amplitude;
60 RefPtr<SVGAnimatedNumber> m_exponent;
61 RefPtr<SVGAnimatedNumber> m_offset;
62 RefPtr<SVGAnimatedEnumeration<ComponentTransferType> > m_type;