KHTML
SVGFEComposite.cpp
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 00003 2004, 2005 Rob Buis <buis@kde.org> 00004 2005 Eric Seidel <eric@webkit.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 aint with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #include "config.h" 00023 00024 #if ENABLE(SVG) && ENABLE(SVG_FILTERS) 00025 #include "SVGFEComposite.h" 00026 #include "TextStream.h" 00027 00028 namespace WebCore { 00029 00030 SVGFEComposite::SVGFEComposite(SVGResourceFilter* filter) 00031 : SVGFilterEffect(filter) 00032 , m_operation(SVG_FECOMPOSITE_OPERATOR_UNKNOWN) 00033 , m_k1(0.0f) 00034 , m_k2(0.0f) 00035 , m_k3(0.0f) 00036 , m_k4(0.0f) 00037 { 00038 } 00039 00040 String SVGFEComposite::in2() const 00041 { 00042 return m_in2; 00043 } 00044 00045 void SVGFEComposite::setIn2(const String& in2) 00046 { 00047 m_in2 = in2; 00048 } 00049 00050 SVGCompositeOperationType SVGFEComposite::operation() const 00051 { 00052 return m_operation; 00053 } 00054 00055 void SVGFEComposite::setOperation(SVGCompositeOperationType oper) 00056 { 00057 m_operation = oper; 00058 } 00059 00060 float SVGFEComposite::k1() const 00061 { 00062 return m_k1; 00063 } 00064 00065 void SVGFEComposite::setK1(float k1) 00066 { 00067 m_k1 = k1; 00068 } 00069 00070 float SVGFEComposite::k2() const 00071 { 00072 return m_k2; 00073 } 00074 00075 void SVGFEComposite::setK2(float k2) 00076 { 00077 m_k2 = k2; 00078 } 00079 00080 float SVGFEComposite::k3() const 00081 { 00082 return m_k3; 00083 } 00084 00085 void SVGFEComposite::setK3(float k3) 00086 { 00087 m_k3 = k3; 00088 } 00089 00090 float SVGFEComposite::k4() const 00091 { 00092 return m_k4; 00093 } 00094 00095 void SVGFEComposite::setK4(float k4) 00096 { 00097 m_k4 = k4; 00098 } 00099 00100 TextStream& SVGFEComposite::externalRepresentation(TextStream& ts) const 00101 { 00102 ts << "[type=COMPOSITE] "; 00103 SVGFilterEffect::externalRepresentation(ts); 00104 if (!in2().isEmpty()) 00105 ts << " [in2=\"" << in2() << "\"]"; 00106 ts << " [k1=" << k1() << " k2=" << k2() << " k3=" << k3() << " k4=" << k4() << "]"; 00107 return ts; 00108 } 00109 00110 } // namespace WebCore 00111 00112 #endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)
KDE 4.6 API Reference