org.apache.batik.ext.awt.image.renderable

Class TurbulenceRable8Bit

public class TurbulenceRable8Bit extends AbstractColorInterpolationRable implements TurbulenceRable

Creates a sourceless image from a turbulence function.
Constructor Summary
TurbulenceRable8Bit(Rectangle2D region)
TurbulenceRable8Bit(Rectangle2D region, int seed, int numOctaves, double baseFreqX, double baseFreqY, boolean stitched, boolean fractalNoise)
Method Summary
RenderedImagecreateRendering(RenderContext rc)
doublegetBaseFrequencyX()
Get the current base fequency in x direction.
doublegetBaseFrequencyY()
Get the current base fequency in y direction.
Rectangle2DgetBounds2D()
Get the turbulence region
intgetNumOctaves()
Get the current number of octaves for the noise function .
intgetSeed()
Get the current seed value for the pseudo random number generator.
Rectangle2DgetTurbulenceRegion()
Get the turbulence region
booleanisFractalNoise()
Returns true if the turbulence function is using fractal noise, instead of turbulence noise.
booleanisStitched()
Returns true if the turbulence function is currently stitching tiles.
voidsetBaseFrequencyX(double baseFreqX)
Set the base fequency in x direction.
voidsetBaseFrequencyY(double baseFreqY)
Set the base fequency in y direction.
voidsetFractalNoise(boolean fractalNoise)
Turns on/off fractal noise.
voidsetNumOctaves(int numOctaves)
Set the number of octaves for the noise function .
voidsetSeed(int seed)
Set the seed value for the pseudo random number generator.
voidsetStitched(boolean stitched)
Set stitching state for tiles.
voidsetTurbulenceRegion(Rectangle2D turbulenceRegion)
Sets the turbulence region

Constructor Detail

TurbulenceRable8Bit

public TurbulenceRable8Bit(Rectangle2D region)

TurbulenceRable8Bit

public TurbulenceRable8Bit(Rectangle2D region, int seed, int numOctaves, double baseFreqX, double baseFreqY, boolean stitched, boolean fractalNoise)

Method Detail

createRendering

public RenderedImage createRendering(RenderContext rc)

getBaseFrequencyX

public double getBaseFrequencyX()
Get the current base fequency in x direction.

Returns: The current base fequency in x direction.

getBaseFrequencyY

public double getBaseFrequencyY()
Get the current base fequency in y direction.

Returns: The current base fequency in y direction.

getBounds2D

public Rectangle2D getBounds2D()
Get the turbulence region

getNumOctaves

public int getNumOctaves()
Get the current number of octaves for the noise function .

Returns: The current number of octaves for the noise function .

getSeed

public int getSeed()
Get the current seed value for the pseudo random number generator.

Returns: The current seed value for the pseudo random number generator.

getTurbulenceRegion

public Rectangle2D getTurbulenceRegion()
Get the turbulence region

isFractalNoise

public boolean isFractalNoise()
Returns true if the turbulence function is using fractal noise, instead of turbulence noise.

Returns: true if the turbulence function is using fractal noise, instead of turbulence noise.

isStitched

public boolean isStitched()
Returns true if the turbulence function is currently stitching tiles.

Returns: true if the turbulence function is currently stitching tiles.

setBaseFrequencyX

public void setBaseFrequencyX(double baseFreqX)
Set the base fequency in x direction.

Parameters: baseFreqX The new base fequency in x direction.

setBaseFrequencyY

public void setBaseFrequencyY(double baseFreqY)
Set the base fequency in y direction.

Parameters: baseFreqY The new base fequency in y direction.

setFractalNoise

public void setFractalNoise(boolean fractalNoise)
Turns on/off fractal noise.

Parameters: fractalNoise true if fractal noise should be used.

setNumOctaves

public void setNumOctaves(int numOctaves)
Set the number of octaves for the noise function .

Parameters: numOctaves The new number of octaves for the noise function .

setSeed

public void setSeed(int seed)
Set the seed value for the pseudo random number generator.

Parameters: seed The new seed value for the pseudo random number generator.

setStitched

public void setStitched(boolean stitched)
Set stitching state for tiles.

Parameters: stitched true if the turbulence operator should stitch tiles.

setTurbulenceRegion

public void setTurbulenceRegion(Rectangle2D turbulenceRegion)
Sets the turbulence region

Parameters: turbulenceRegion region to fill with turbulence function.

Copyright B) 2007 Apache Software Foundation. All Rights Reserved.