railo.runtime.img.filter
Class SphereFilter

java.lang.Object
  extended by railo.runtime.img.filter.AbstractBufferedImageOp
      extended by railo.runtime.img.filter.TransformFilter
          extended by railo.runtime.img.filter.SphereFilter
All Implemented Interfaces:
BufferedImageOp, Cloneable, DynFiltering

public class SphereFilter
extends TransformFilter
implements DynFiltering

A filter which simulates a lens placed over an image.


Field Summary
 
Fields inherited from class railo.runtime.img.filter.TransformFilter
BILINEAR, NEAREST_NEIGHBOUR
 
Constructor Summary
SphereFilter()
           
 
Method Summary
 BufferedImage filter(BufferedImage src, BufferedImage dst)
           
 BufferedImage filter(BufferedImage src, Struct parameters)
           
 Point2D getCentre()
          Get the centre of the effect as a proportion of the image size.
 float getCentreX()
           
 float getCentreY()
          Get the centre of the effect in the Y direction as a proportion of the image size.
 float getRadius()
          Get the radius of the effect.
 float getRefractionIndex()
          Get the index of refaction.
 void setCentre(Point2D centre)
          Set the centre of the effect as a proportion of the image size.
 void setCentreX(float centreX)
          Set the centre of the effect in the X direction as a proportion of the image size.
 void setCentreY(float centreY)
          Set the centre of the effect in the Y direction as a proportion of the image size.
 void setRadius(float r)
          Set the radius of the effect.
 void setRefractionIndex(float refractionIndex)
          Set the index of refaction.
 String toString()
           
 
Methods inherited from class railo.runtime.img.filter.TransformFilter
getEdgeAction, getInterpolation, setEdgeAction, setInterpolation
 
Methods inherited from class railo.runtime.img.filter.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SphereFilter

public SphereFilter()
Method Detail

setRefractionIndex

public void setRefractionIndex(float refractionIndex)
Set the index of refaction.

Parameters:
refractionIndex - the index of refaction
See Also:
getRefractionIndex()

getRefractionIndex

public float getRefractionIndex()
Get the index of refaction.

Returns:
the index of refaction
See Also:
setRefractionIndex(float)

setRadius

public void setRadius(float r)
Set the radius of the effect.

Parameters:
r - the radius
See Also:
getRadius()

getRadius

public float getRadius()
Get the radius of the effect.

Returns:
the radius
See Also:
setRadius(float)

setCentreX

public void setCentreX(float centreX)
Set the centre of the effect in the X direction as a proportion of the image size.

Parameters:
centreX - the center
See Also:
getCentreX()

getCentreX

public float getCentreX()

setCentreY

public void setCentreY(float centreY)
Set the centre of the effect in the Y direction as a proportion of the image size.

Parameters:
centreY - the center
See Also:
getCentreY()

getCentreY

public float getCentreY()
Get the centre of the effect in the Y direction as a proportion of the image size.

Returns:
the center
See Also:
setCentreY(float)

setCentre

public void setCentre(Point2D centre)
Set the centre of the effect as a proportion of the image size.

Parameters:
centre - the center
See Also:
getCentre()

getCentre

public Point2D getCentre()
Get the centre of the effect as a proportion of the image size.

Returns:
the center
See Also:
setCentre(java.awt.geom.Point2D)

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dst)
Specified by:
filter in interface BufferedImageOp
Overrides:
filter in class TransformFilter

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 TransformFilter
Throws:
PageException


Copyright © 2012 Railo