Class TurbulenceRable8Bit
- java.lang.Object
-
- org.apache.batik.ext.awt.image.renderable.AbstractRable
-
- org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
-
- org.apache.batik.ext.awt.image.renderable.TurbulenceRable8Bit
-
- All Implemented Interfaces:
java.awt.image.renderable.RenderableImage
,Filter
,FilterColorInterpolation
,TurbulenceRable
public class TurbulenceRable8Bit extends AbstractColorInterpolationRable implements TurbulenceRable
Creates a sourceless image from a turbulence function.- Version:
- $Id: TurbulenceRable8Bit.java 1808001 2017-09-11 09:51:29Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double
baseFreqX
(package private) double
baseFreqY
(package private) boolean
fractalNoise
(package private) int
numOctaves
(package private) java.awt.geom.Rectangle2D
region
(package private) int
seed
(package private) boolean
stitched
-
Fields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
csLinear
-
Fields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractRable
props, srcs, stamp
-
-
Constructor Summary
Constructors Constructor Description TurbulenceRable8Bit(java.awt.geom.Rectangle2D region)
TurbulenceRable8Bit(java.awt.geom.Rectangle2D region, int seed, int numOctaves, double baseFreqX, double baseFreqY, boolean stitched, boolean fractalNoise)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.RenderedImage
createRendering(java.awt.image.renderable.RenderContext rc)
double
getBaseFrequencyX()
Get the current base fequency in x direction.double
getBaseFrequencyY()
Get the current base fequency in y direction.java.awt.geom.Rectangle2D
getBounds2D()
Get the turbulence regionint
getNumOctaves()
Get the current number of octaves for the noise function .int
getSeed()
Get the current seed value for the pseudo random number generator.java.awt.geom.Rectangle2D
getTurbulenceRegion()
Get the turbulence regionboolean
isFractalNoise()
Returns true if the turbulence function is using fractal noise, instead of turbulence noise.boolean
isStitched()
Returns true if the turbulence function is currently stitching tiles.void
setBaseFrequencyX(double baseFreqX)
Set the base fequency in x direction.void
setBaseFrequencyY(double baseFreqY)
Set the base fequency in y direction.void
setFractalNoise(boolean fractalNoise)
Turns on/off fractal noise.void
setNumOctaves(int numOctaves)
Set the number of octaves for the noise function .void
setSeed(int seed)
Set the seed value for the pseudo random number generator.void
setStitched(boolean stitched)
Set stitching state for tiles.void
setTurbulenceRegion(java.awt.geom.Rectangle2D turbulenceRegion)
Sets the turbulence region-
Methods inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
convertSourceCS, convertSourceCS, getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinear
-
Methods inherited from class org.apache.batik.ext.awt.image.renderable.AbstractRable
createDefaultRendering, createScaledRendering, getDependencyRegion, getDirtyRegion, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getTimeStamp, getWidth, init, init, init, init, isDynamic, touch
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.batik.ext.awt.image.renderable.Filter
getDependencyRegion, getDirtyRegion, getTimeStamp
-
Methods inherited from interface org.apache.batik.ext.awt.image.renderable.FilterColorInterpolation
getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinear
-
-
-
-
Method Detail
-
getTurbulenceRegion
public java.awt.geom.Rectangle2D getTurbulenceRegion()
Get the turbulence region- Specified by:
getTurbulenceRegion
in interfaceTurbulenceRable
-
getBounds2D
public java.awt.geom.Rectangle2D getBounds2D()
Get the turbulence region- Specified by:
getBounds2D
in interfaceFilter
- Overrides:
getBounds2D
in classAbstractRable
-
getSeed
public int getSeed()
Get the current seed value for the pseudo random number generator.- Specified by:
getSeed
in interfaceTurbulenceRable
- Returns:
- The current seed value for the pseudo random number generator.
-
getNumOctaves
public int getNumOctaves()
Get the current number of octaves for the noise function .- Specified by:
getNumOctaves
in interfaceTurbulenceRable
- Returns:
- The current number of octaves for the noise function .
-
getBaseFrequencyX
public double getBaseFrequencyX()
Get the current base fequency in x direction.- Specified by:
getBaseFrequencyX
in interfaceTurbulenceRable
- Returns:
- The current base fequency in x direction.
-
getBaseFrequencyY
public double getBaseFrequencyY()
Get the current base fequency in y direction.- Specified by:
getBaseFrequencyY
in interfaceTurbulenceRable
- Returns:
- The current base fequency in y direction.
-
isStitched
public boolean isStitched()
Returns true if the turbulence function is currently stitching tiles.- Specified by:
isStitched
in interfaceTurbulenceRable
- Returns:
- true if the turbulence function is currently stitching tiles.
-
isFractalNoise
public boolean isFractalNoise()
Returns true if the turbulence function is using fractal noise, instead of turbulence noise.- Specified by:
isFractalNoise
in interfaceTurbulenceRable
- Returns:
- true if the turbulence function is using fractal noise, instead of turbulence noise.
-
setTurbulenceRegion
public void setTurbulenceRegion(java.awt.geom.Rectangle2D turbulenceRegion)
Sets the turbulence region- Specified by:
setTurbulenceRegion
in interfaceTurbulenceRable
- Parameters:
turbulenceRegion
- region to fill with turbulence function.
-
setSeed
public void setSeed(int seed)
Set the seed value for the pseudo random number generator.- Specified by:
setSeed
in interfaceTurbulenceRable
- Parameters:
seed
- The new seed value for the pseudo random number generator.
-
setNumOctaves
public void setNumOctaves(int numOctaves)
Set the number of octaves for the noise function .- Specified by:
setNumOctaves
in interfaceTurbulenceRable
- Parameters:
numOctaves
- The new number of octaves for the noise function .
-
setBaseFrequencyX
public void setBaseFrequencyX(double baseFreqX)
Set the base fequency in x direction.- Specified by:
setBaseFrequencyX
in interfaceTurbulenceRable
- Parameters:
baseFreqX
- The new base fequency in x direction.
-
setBaseFrequencyY
public void setBaseFrequencyY(double baseFreqY)
Set the base fequency in y direction.- Specified by:
setBaseFrequencyY
in interfaceTurbulenceRable
- Parameters:
baseFreqY
- The new base fequency in y direction.
-
setStitched
public void setStitched(boolean stitched)
Set stitching state for tiles.- Specified by:
setStitched
in interfaceTurbulenceRable
- Parameters:
stitched
- true if the turbulence operator should stitch tiles.
-
setFractalNoise
public void setFractalNoise(boolean fractalNoise)
Turns on/off fractal noise.- Specified by:
setFractalNoise
in interfaceTurbulenceRable
- Parameters:
fractalNoise
- true if fractal noise should be used.
-
createRendering
public java.awt.image.RenderedImage createRendering(java.awt.image.renderable.RenderContext rc)
- Specified by:
createRendering
in interfacejava.awt.image.renderable.RenderableImage
-
-