24 #if ENABLE(SVG) && ENABLE(SVG_FILTERS)
26 #include "TextStream.h"
30 SVGFETurbulence::SVGFETurbulence(SVGResourceFilter* filter)
31 : SVGFilterEffect(filter)
32 , m_baseFrequencyX(0.0f)
33 , m_baseFrequencyY(0.0f)
36 , m_stitchTiles(false)
37 , m_type(SVG_TURBULENCE_TYPE_UNKNOWN)
41 SVGTurbulanceType SVGFETurbulence::type()
const
46 void SVGFETurbulence::setType(SVGTurbulanceType type)
51 float SVGFETurbulence::baseFrequencyY()
const
53 return m_baseFrequencyY;
56 void SVGFETurbulence::setBaseFrequencyY(
float baseFrequencyY)
58 m_baseFrequencyY = baseFrequencyY;
61 float SVGFETurbulence::baseFrequencyX()
const
63 return m_baseFrequencyX;
66 void SVGFETurbulence::setBaseFrequencyX(
float baseFrequencyX)
68 m_baseFrequencyX = baseFrequencyX;
71 float SVGFETurbulence::seed()
const
76 void SVGFETurbulence::setSeed(
float seed)
81 int SVGFETurbulence::numOctaves()
const
86 void SVGFETurbulence::setNumOctaves(
bool numOctaves)
88 m_numOctaves = numOctaves;
91 bool SVGFETurbulence::stitchTiles()
const
96 void SVGFETurbulence::setStitchTiles(
bool stitch)
98 m_stitchTiles = stitch;
101 static TextStream&
operator<<(TextStream& ts, SVGTurbulanceType t)
105 case SVG_TURBULENCE_TYPE_UNKNOWN:
106 ts <<
"UNKNOWN";
break;
107 case SVG_TURBULENCE_TYPE_TURBULENCE:
108 ts <<
"TURBULANCE";
break;
109 case SVG_TURBULENCE_TYPE_FRACTALNOISE:
110 ts <<
"NOISE";
break;
115 TextStream& SVGFETurbulence::externalRepresentation(TextStream& ts)
const
117 ts <<
"[type=TURBULENCE] ";
118 SVGFilterEffect::externalRepresentation(ts);
119 ts <<
" [turbulence type=" << type() <<
"]"
120 <<
" [base frequency x=" << baseFrequencyX() <<
" y=" << baseFrequencyY() <<
"]"
121 <<
" [seed=" << seed() <<
"]"
122 <<
" [num octaves=" << numOctaves() <<
"]"
123 <<
" [stitch tiles=" << stitchTiles() <<
"]";
130 #endif // ENABLE(SVG) && ENABLE(SVG_FILTERS)
QDebug operator<<(QDebug s, KDebugStreamFunction f)