Lines Matching refs:baseFrequencyX
53 FETurbulence::FETurbulence(Filter* filter, TurbulenceType type, float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, bool stitchTiles)
56 , m_baseFrequencyX(baseFrequencyX)
64 PassRefPtr<FETurbulence> FETurbulence::create(Filter* filter, TurbulenceType type, float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, bool stitchTiles)
66 return adoptRef(new FETurbulence(filter, type, baseFrequencyX, baseFrequencyY, numOctaves, seed, stitchTiles));
95 float FETurbulence::baseFrequencyX() const
100 bool FETurbulence::setBaseFrequencyX(float baseFrequencyX)
102 if (m_baseFrequencyX == baseFrequencyX)
104 m_baseFrequencyX = baseFrequencyX;
268 unsigned char FETurbulence::calculateTurbulenceValueForPoint(int channel, PaintingData& paintingData, StitchData& stitchData, const FloatPoint& point, float baseFrequencyX, float baseFrequencyY)
277 if (baseFrequencyX) {
278 float lowFrequency = floorf(tileWidth * baseFrequencyX) / tileWidth;
279 float highFrequency = ceilf(tileWidth * baseFrequencyX) / tileWidth;
281 if (baseFrequencyX / lowFrequency < highFrequency / baseFrequencyX)
282 baseFrequencyX = lowFrequency;
284 baseFrequencyX = highFrequency;
295 stitchData.width = roundf(tileWidth * baseFrequencyX);
301 FloatPoint noiseVector(point.x() * baseFrequencyX, point.y() * baseFrequencyY);
330 inline void FETurbulence::fillRegion(Uint8ClampedArray* pixelArray, PaintingData& paintingData, int startY, int endY, float baseFrequencyX, float baseFrequencyY)
344 pixelArray->set(indexOfPixelChannel, calculateTurbulenceValueForPoint(channel, paintingData, stitchData, filter()->mapAbsolutePointToLocalPoint(point), baseFrequencyX, baseFrequencyY));
351 parameters->filter->fillRegion(parameters->pixelArray, *parameters->paintingData, parameters->startY, parameters->endY, parameters->baseFrequencyX, parameters->baseFrequencyY);
390 params.baseFrequencyX = m_baseFrequencyX;
413 float baseFrequencyX = m_baseFrequencyX / absoluteTransform.a();
416 SkPerlinNoiseShader::CreateFractalNoise(SkFloatToScalar(baseFrequencyX),
419 SkPerlinNoiseShader::CreateTurbulence(SkFloatToScalar(baseFrequencyX),
453 << "baseFrequency=\"" << baseFrequencyX() << ", " << baseFrequencyY() << "\" "