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

Class DiffuseLightingRable8Bit

public class DiffuseLightingRable8Bit extends AbstractColorInterpolationRable implements DiffuseLightingRable

Implementation of the DiffuseLightRable interface.
Constructor Summary
DiffuseLightingRable8Bit(Filter src, Rectangle2D litRegion, Light light, double kd, double surfaceScale, double[] kernelUnitLength)
Method Summary
RenderedImagecreateRendering(RenderContext rc)
Rectangle2DgetBounds2D()
Returns this filter's bounds
doublegetKd()
double[]getKernelUnitLength()
Returns the min [dx,dy] distance in user space for evalutation of the sobel gradient.
LightgetLight()
Rectangle2DgetLitRegion()
Returns this filter's litRegion
FiltergetSource()
Returns the source to be filtered
doublegetSurfaceScale()
voidsetKd(double kd)
Sets the diffuse constant, or kd
voidsetKernelUnitLength(double[] kernelUnitLength)
Sets the min [dx,dy] distance in user space for evaluation of the sobel gradient.
voidsetLight(Light light)
voidsetLitRegion(Rectangle2D litRegion)
Set this filter's litRegion
voidsetSource(Filter src)
Sets the source to be filtered
voidsetSurfaceScale(double surfaceScale)
Sets the surface scale

Constructor Detail

DiffuseLightingRable8Bit

public DiffuseLightingRable8Bit(Filter src, Rectangle2D litRegion, Light light, double kd, double surfaceScale, double[] kernelUnitLength)

Method Detail

createRendering

public RenderedImage createRendering(RenderContext rc)

getBounds2D

public Rectangle2D getBounds2D()
Returns this filter's bounds

getKd

public double getKd()

Returns: diffuse constant, or kd.

getKernelUnitLength

public double[] getKernelUnitLength()
Returns the min [dx,dy] distance in user space for evalutation of the sobel gradient.

getLight

public Light getLight()

Returns: Light object used for the diffuse lighting

getLitRegion

public Rectangle2D getLitRegion()
Returns this filter's litRegion

getSource

public Filter getSource()
Returns the source to be filtered

getSurfaceScale

public double getSurfaceScale()

Returns: surfaceScale

setKd

public void setKd(double kd)
Sets the diffuse constant, or kd

setKernelUnitLength

public void setKernelUnitLength(double[] kernelUnitLength)
Sets the min [dx,dy] distance in user space for evaluation of the sobel gradient. If set to zero or null then device space will be used.

setLight

public void setLight(Light light)

Parameters: light New Light object

setLitRegion

public void setLitRegion(Rectangle2D litRegion)
Set this filter's litRegion

setSource

public void setSource(Filter src)
Sets the source to be filtered

setSurfaceScale

public void setSurfaceScale(double surfaceScale)
Sets the surface scale
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.