24 #if ENABLE(SVG) && ENABLE(SVG_FILTERS)
26 #include "TextStream.h"
30 SVGFEComponentTransfer::SVGFEComponentTransfer(SVGResourceFilter* filter)
31 : SVGFilterEffect(filter)
35 SVGComponentTransferFunction SVGFEComponentTransfer::redFunction()
const
40 void SVGFEComponentTransfer::setRedFunction(
const SVGComponentTransferFunction& func)
45 SVGComponentTransferFunction SVGFEComponentTransfer::greenFunction()
const
50 void SVGFEComponentTransfer::setGreenFunction(
const SVGComponentTransferFunction& func)
55 SVGComponentTransferFunction SVGFEComponentTransfer::blueFunction()
const
60 void SVGFEComponentTransfer::setBlueFunction(
const SVGComponentTransferFunction& func)
65 SVGComponentTransferFunction SVGFEComponentTransfer::alphaFunction()
const
70 void SVGFEComponentTransfer::setAlphaFunction(
const SVGComponentTransferFunction& func)
75 static TextStream&
operator<<(TextStream& ts, SVGComponentTransferType t)
79 case SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN:
80 ts <<
"UNKNOWN";
break;
81 case SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY:
82 ts <<
"IDENTITY";
break;
83 case SVG_FECOMPONENTTRANSFER_TYPE_TABLE:
85 case SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE:
86 ts <<
"DISCRETE";
break;
87 case SVG_FECOMPONENTTRANSFER_TYPE_LINEAR:
88 ts <<
"LINEAR";
break;
89 case SVG_FECOMPONENTTRANSFER_TYPE_GAMMA:
95 static TextStream&
operator<<(TextStream& ts,
const SVGComponentTransferFunction &func)
97 ts <<
"[type=" << func.type <<
"]";
99 case SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN:
100 case SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY:
102 case SVG_FECOMPONENTTRANSFER_TYPE_TABLE:
103 case SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE:
105 ts <<
" [table values=";
106 Vector<float>::const_iterator itr=func.tableValues.begin();
107 if (itr != func.tableValues.end()) {
109 for (; itr!=func.tableValues.end(); itr++) {
116 case SVG_FECOMPONENTTRANSFER_TYPE_LINEAR:
117 ts <<
" [slope=" << func.slope <<
"]"
118 <<
" [intercept=" << func.intercept <<
"]";
120 case SVG_FECOMPONENTTRANSFER_TYPE_GAMMA:
121 ts <<
" [amplitude=" << func.amplitude <<
"]"
122 <<
" [exponent=" << func.exponent <<
"]"
123 <<
" [offset=" << func.offset <<
"]";
129 TextStream& SVGFEComponentTransfer::externalRepresentation(TextStream& ts)
const
131 ts <<
"[type=COMPONENT-TRANSFER] ";
132 SVGFilterEffect::externalRepresentation(ts);
133 ts <<
" [red func=" << redFunction() <<
"]"
134 <<
" [green func=" << greenFunction() <<
"]"
135 <<
" [blue func=" << blueFunction() <<
"]"
136 <<
" [alpha func=" << alphaFunction() <<
"]";
142 #endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)
QDebug operator<<(QDebug s, KDebugStreamFunction f)