railo.runtime.img.filter
Class CellularFilter

java.lang.Object
  extended by railo.runtime.img.filter.AbstractBufferedImageOp
      extended by railo.runtime.img.filter.WholeImageFilter
          extended by railo.runtime.img.filter.CellularFilter
All Implemented Interfaces:
BufferedImageOp, Cloneable, DynFiltering, Function2D
Direct Known Subclasses:
CrystallizeFilter, PointillizeFilter

public class CellularFilter
extends WholeImageFilter
implements Function2D, Cloneable, DynFiltering

A filter which produces an image with a cellular texture.


Nested Class Summary
 class CellularFilter.Point
           
 
Field Summary
 float amount
           
 float bias
           
 float distancePower
           
 float gain
           
static int HEXAGONAL
           
static int OCTAGONAL
           
static int RANDOM
           
static int SQUARE
           
static int TRIANGULAR
           
 float turbulence
           
 boolean useColor
           
 
Constructor Summary
CellularFilter()
           
 
Method Summary
 Object clone()
           
 float evaluate(float x, float y)
           
 BufferedImage filter(BufferedImage src, Struct parameters)
           
 float getAmount()
          Get the amount of texture.
 float getAngle()
          Returns the angle of the texture.
 float getAngleCoefficient()
           
 float getCoefficient(int i)
           
 Colormap getColormap()
          Get the colormap to be used for the filter.
 float getDistancePower()
           
 float getF1()
           
 float getF2()
           
 float getF3()
           
 float getF4()
           
 float getGradientCoefficient()
           
 int getGridType()
           
 int getPixel(int x, int y, int[] inPixels, int width, int height)
           
 float getRandomness()
           
 float getScale()
          Returns the scale of the texture.
 float getStretch()
          Returns the stretch factor of the texture.
 float getTurbulence()
          Returns the turbulence of the effect.
 void setAmount(float amount)
          Set the amount of effect.
 void setAngle(float angle)
          Specifies the angle of the texture.
 void setAngleCoefficient(float angleCoefficient)
           
 void setCoefficient(int i, float v)
           
 void setColormap(Colormap colormap)
          Set the colormap to be used for the filter.
 void setDistancePower(float distancePower)
           
 void setF1(float v)
           
 void setF2(float v)
           
 void setF3(float v)
           
 void setF4(float v)
           
 void setGradientCoefficient(float gradientCoefficient)
           
 void setGridType(String gridType)
          the grid type to set, one of the following: - RANDOM - SQUARE - HEXAGONAL - OCTAGONAL - TRIANGULAR
 void setRandomness(float randomness)
           
 void setScale(float scale)
          Specifies the scale of the texture.
 void setStretch(float stretch)
          Specifies the stretch factor of the texture.
 void setTurbulence(float turbulence)
          Specifies the turbulence of the texture.
 String toString()
           
 float turbulence2(float x, float y, float freq)
           
 
Methods inherited from class railo.runtime.img.filter.WholeImageFilter
filter
 
Methods inherited from class railo.runtime.img.filter.AbstractBufferedImageOp
createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

amount

public float amount

turbulence

public float turbulence

gain

public float gain

bias

public float bias

distancePower

public float distancePower

useColor

public boolean useColor

RANDOM

public static final int RANDOM
See Also:
Constant Field Values

SQUARE

public static final int SQUARE
See Also:
Constant Field Values

HEXAGONAL

public static final int HEXAGONAL
See Also:
Constant Field Values

OCTAGONAL

public static final int OCTAGONAL
See Also:
Constant Field Values

TRIANGULAR

public static final int TRIANGULAR
See Also:
Constant Field Values
Constructor Detail

CellularFilter

public CellularFilter()
Method Detail

setScale

public void setScale(float scale)
Specifies the scale of the texture.

Parameters:
scale - the scale of the texture.
See Also:
getScale()

getScale

public float getScale()
Returns the scale of the texture.

Returns:
the scale of the texture.
See Also:
setScale(float)

setStretch

public void setStretch(float stretch)
Specifies the stretch factor of the texture.

Parameters:
stretch - the stretch factor of the texture.
See Also:
getStretch()

getStretch

public float getStretch()
Returns the stretch factor of the texture.

Returns:
the stretch factor of the texture.
See Also:
setStretch(float)

setAngle

public void setAngle(float angle)
Specifies the angle of the texture.

Parameters:
angle - the angle of the texture.
See Also:
getAngle()

getAngle

public float getAngle()
Returns the angle of the texture.

Returns:
the angle of the texture.
See Also:
setAngle(float)

setCoefficient

public void setCoefficient(int i,
                           float v)

getCoefficient

public float getCoefficient(int i)

setAngleCoefficient

public void setAngleCoefficient(float angleCoefficient)

getAngleCoefficient

public float getAngleCoefficient()

setGradientCoefficient

public void setGradientCoefficient(float gradientCoefficient)

getGradientCoefficient

public float getGradientCoefficient()

setF1

public void setF1(float v)

getF1

public float getF1()

setF2

public void setF2(float v)

getF2

public float getF2()

setF3

public void setF3(float v)

getF3

public float getF3()

setF4

public void setF4(float v)

getF4

public float getF4()

setColormap

public void setColormap(Colormap colormap)
Set the colormap to be used for the filter.

Parameters:
colormap - the colormap
See Also:
getColormap()

getColormap

public Colormap getColormap()
Get the colormap to be used for the filter.

Returns:
the colormap
See Also:
setColormap(railo.runtime.img.filter.Colormap)

setRandomness

public void setRandomness(float randomness)

getRandomness

public float getRandomness()

setGridType

public void setGridType(String gridType)
                 throws ExpressionException
the grid type to set, one of the following: - RANDOM - SQUARE - HEXAGONAL - OCTAGONAL - TRIANGULAR

Throws:
ExpressionException

getGridType

public int getGridType()

setDistancePower

public void setDistancePower(float distancePower)

getDistancePower

public float getDistancePower()

setTurbulence

public void setTurbulence(float turbulence)
Specifies the turbulence of the texture.

Parameters:
turbulence - the turbulence of the texture.
See Also:
getTurbulence()

getTurbulence

public float getTurbulence()
Returns the turbulence of the effect.

Returns:
the turbulence of the effect.
See Also:
setTurbulence(float)

setAmount

public void setAmount(float amount)
Set the amount of effect.

Parameters:
amount - the amount
See Also:
getAmount()

getAmount

public float getAmount()
Get the amount of texture.

Returns:
the amount
See Also:
setAmount(float)

evaluate

public float evaluate(float x,
                      float y)
Specified by:
evaluate in interface Function2D

turbulence2

public float turbulence2(float x,
                         float y,
                         float freq)

getPixel

public int getPixel(int x,
                    int y,
                    int[] inPixels,
                    int width,
                    int height)

clone

public Object clone()
Overrides:
clone in class AbstractBufferedImageOp

toString

public String toString()
Overrides:
toString in class Object

filter

public BufferedImage filter(BufferedImage src,
                            Struct parameters)
                     throws PageException
Specified by:
filter in interface DynFiltering
Overrides:
filter in class WholeImageFilter
Throws:
PageException


Copyright © 2012 Railo