don't discard iframe children.
[kdelibs.git] / khtml / svg / graphics / filters / SVGFEComposite.cpp
blob4e0dfb541b965fc5513895833b8c02e1cfc51aae
1 /*
2 Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005 Rob Buis <buis@kde.org>
4 2005 Eric Seidel <eric@webkit.org>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 aint with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
22 #include "config.h"
24 #if ENABLE(SVG) && ENABLE(SVG_FILTERS)
25 #include "SVGFEComposite.h"
26 #include "TextStream.h"
28 namespace WebCore {
30 SVGFEComposite::SVGFEComposite(SVGResourceFilter* filter)
31 : SVGFilterEffect(filter)
32 , m_operation(SVG_FECOMPOSITE_OPERATOR_UNKNOWN)
33 , m_k1(0.0f)
34 , m_k2(0.0f)
35 , m_k3(0.0f)
36 , m_k4(0.0f)
40 String SVGFEComposite::in2() const
42 return m_in2;
45 void SVGFEComposite::setIn2(const String& in2)
47 m_in2 = in2;
50 SVGCompositeOperationType SVGFEComposite::operation() const
52 return m_operation;
55 void SVGFEComposite::setOperation(SVGCompositeOperationType oper)
57 m_operation = oper;
60 float SVGFEComposite::k1() const
62 return m_k1;
65 void SVGFEComposite::setK1(float k1)
67 m_k1 = k1;
70 float SVGFEComposite::k2() const
72 return m_k2;
75 void SVGFEComposite::setK2(float k2)
77 m_k2 = k2;
80 float SVGFEComposite::k3() const
82 return m_k3;
85 void SVGFEComposite::setK3(float k3)
87 m_k3 = k3;
90 float SVGFEComposite::k4() const
92 return m_k4;
95 void SVGFEComposite::setK4(float k4)
97 m_k4 = k4;
100 TextStream& SVGFEComposite::externalRepresentation(TextStream& ts) const
102 ts << "[type=COMPOSITE] ";
103 SVGFilterEffect::externalRepresentation(ts);
104 if (!in2().isEmpty())
105 ts << " [in2=\"" << in2() << "\"]";
106 ts << " [k1=" << k1() << " k2=" << k2() << " k3=" << k3() << " k4=" << k4() << "]";
107 return ts;
110 } // namespace WebCore
112 #endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)