KHTML
SVGFEComposite.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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 }
00111
00112 #endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)