Class DiffuseLightingRable8Bit
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.DiffuseLightingRable8Bit
- All Implemented Interfaces:
RenderableImage,DiffuseLightingRable,Filter,FilterColorInterpolation
public class DiffuseLightingRable8Bit
extends AbstractColorInterpolationRable
implements DiffuseLightingRable
Implementation of the DiffuseLightRable interface.
-
Field Summary
Fields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
csLinearFields inherited from class org.apache.batik.ext.awt.image.renderable.AbstractRable
props, srcs, stampFields inherited from interface java.awt.image.renderable.RenderableImage
HINTS_OBSERVED -
Constructor Summary
ConstructorsConstructorDescriptionDiffuseLightingRable8Bit(Filter src, Rectangle2D litRegion, Light light, double kd, double surfaceScale, double[] kernelUnitLength) -
Method Summary
Modifier and TypeMethodDescriptionReturns this filter's boundsdoublegetKd()double[]Returns the min [dx,dy] distance in user space for evalutation of the sobel gradient.getLight()Returns this filter's litRegionReturns the source to be filtereddoublevoidsetKd(double kd) Sets the diffuse constant, or kdvoidsetKernelUnitLength(double[] kernelUnitLength) Sets the min [dx,dy] distance in user space for evaluation of the sobel gradient.voidvoidsetLitRegion(Rectangle2D litRegion) Set this filter's litRegionvoidSets the source to be filteredvoidsetSurfaceScale(double surfaceScale) Sets the surface scaleMethods inherited from class org.apache.batik.ext.awt.image.renderable.AbstractColorInterpolationRable
convertSourceCS, convertSourceCS, getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinearMethods 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, touchMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.batik.ext.awt.image.renderable.Filter
getDependencyRegion, getDirtyRegion, getTimeStampMethods inherited from interface org.apache.batik.ext.awt.image.renderable.FilterColorInterpolation
getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinearMethods inherited from interface java.awt.image.renderable.RenderableImage
createDefaultRendering, createScaledRendering, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getWidth, isDynamic
-
Constructor Details
-
DiffuseLightingRable8Bit
public DiffuseLightingRable8Bit(Filter src, Rectangle2D litRegion, Light light, double kd, double surfaceScale, double[] kernelUnitLength)
-
-
Method Details
-
getSource
Returns the source to be filtered- Specified by:
getSourcein interfaceDiffuseLightingRable
-
setSource
Sets the source to be filtered- Specified by:
setSourcein interfaceDiffuseLightingRable
-
getBounds2D
Returns this filter's bounds- Specified by:
getBounds2Din interfaceFilter- Overrides:
getBounds2Din classAbstractRable
-
getLitRegion
Returns this filter's litRegion- Specified by:
getLitRegionin interfaceDiffuseLightingRable- Returns:
- the litRegion for this filter
-
setLitRegion
Set this filter's litRegion- Specified by:
setLitRegionin interfaceDiffuseLightingRable
-
getLight
- Specified by:
getLightin interfaceDiffuseLightingRable- Returns:
- Light object used for the diffuse lighting
-
setLight
- Specified by:
setLightin interfaceDiffuseLightingRable- Parameters:
light- New Light object
-
getSurfaceScale
public double getSurfaceScale()- Specified by:
getSurfaceScalein interfaceDiffuseLightingRable- Returns:
- surfaceScale
-
setSurfaceScale
public void setSurfaceScale(double surfaceScale) Sets the surface scale- Specified by:
setSurfaceScalein interfaceDiffuseLightingRable
-
getKd
public double getKd()- Specified by:
getKdin interfaceDiffuseLightingRable- Returns:
- diffuse constant, or kd.
-
setKd
public void setKd(double kd) Sets the diffuse constant, or kd- Specified by:
setKdin interfaceDiffuseLightingRable
-
getKernelUnitLength
public double[] getKernelUnitLength()Returns the min [dx,dy] distance in user space for evalutation of the sobel gradient.- Specified by:
getKernelUnitLengthin interfaceDiffuseLightingRable
-
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.- Specified by:
setKernelUnitLengthin interfaceDiffuseLightingRable
-
createRendering
- Specified by:
createRenderingin interfaceRenderableImage
-