Module io.sf.carte.echosvg.awt
Class SpecularLightingRable8Bit
java.lang.Object
io.sf.carte.echosvg.ext.awt.image.renderable.AbstractRable
io.sf.carte.echosvg.ext.awt.image.renderable.AbstractColorInterpolationRable
io.sf.carte.echosvg.ext.awt.image.renderable.SpecularLightingRable8Bit
- All Implemented Interfaces:
Filter
,FilterColorInterpolation
,SpecularLightingRable
,RenderableImage
public class SpecularLightingRable8Bit
extends AbstractColorInterpolationRable
implements SpecularLightingRable
Implementation of the SpecularLightRable interface.
-
Field Summary
Fields inherited from class io.sf.carte.echosvg.ext.awt.image.renderable.AbstractColorInterpolationRable
csLinear
Fields inherited from interface java.awt.image.renderable.RenderableImage
HINTS_OBSERVED
-
Constructor Summary
ConstructorDescriptionSpecularLightingRable8Bit
(Filter src, Rectangle2D litRegion, Light light, double ks, double specularExponent, double surfaceScale, double[] kernelUnitLength) -
Method Summary
Modifier and TypeMethodDescriptionReturns this filter's boundsdouble[]
Returns the min [dx,dy] distance in user space for evalutation of the sobel gradient.double
getKs()
getLight()
Returns this filter's litRegionReturns the source to be filtereddouble
double
void
setKernelUnitLength
(double[] kernelUnitLength) Sets the min [dx,dy] distance in user space for evaluation of the sobel gradient.void
setKs
(double ks) Sets the specular constant, or ksvoid
void
setLitRegion
(Rectangle2D litRegion) Set this filter's litRegionvoid
Sets the source to be filteredvoid
setSpecularExponent
(double specularExponent) Sets the specular exponentvoid
setSurfaceScale
(double surfaceScale) Sets the surface scaleMethods inherited from class io.sf.carte.echosvg.ext.awt.image.renderable.AbstractColorInterpolationRable
convertSourceCS, convertSourceCS, getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinear
Methods inherited from class io.sf.carte.echosvg.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 io.sf.carte.echosvg.ext.awt.image.renderable.Filter
getDependencyRegion, getDirtyRegion, getTimeStamp
Methods inherited from interface io.sf.carte.echosvg.ext.awt.image.renderable.FilterColorInterpolation
getOperationColorSpace, isColorSpaceLinear, setColorSpaceLinear
Methods inherited from interface java.awt.image.renderable.RenderableImage
createDefaultRendering, createScaledRendering, getHeight, getMinX, getMinY, getProperty, getPropertyNames, getSources, getWidth, isDynamic
-
Constructor Details
-
SpecularLightingRable8Bit
public SpecularLightingRable8Bit(Filter src, Rectangle2D litRegion, Light light, double ks, double specularExponent, double surfaceScale, double[] kernelUnitLength)
-
-
Method Details
-
getSource
Returns the source to be filtered- Specified by:
getSource
in interfaceSpecularLightingRable
-
setSource
Sets the source to be filtered- Specified by:
setSource
in interfaceSpecularLightingRable
-
getBounds2D
Returns this filter's bounds- Specified by:
getBounds2D
in interfaceFilter
- Overrides:
getBounds2D
in classAbstractRable
-
getLitRegion
Returns this filter's litRegion- Specified by:
getLitRegion
in interfaceSpecularLightingRable
- Returns:
- the litRegion for this filter
-
setLitRegion
Set this filter's litRegion- Specified by:
setLitRegion
in interfaceSpecularLightingRable
-
getLight
- Specified by:
getLight
in interfaceSpecularLightingRable
- Returns:
- Light object used for the specular lighting
-
setLight
- Specified by:
setLight
in interfaceSpecularLightingRable
- Parameters:
light
- New Light object
-
getSurfaceScale
public double getSurfaceScale()- Specified by:
getSurfaceScale
in interfaceSpecularLightingRable
- Returns:
- surfaceScale
-
setSurfaceScale
public void setSurfaceScale(double surfaceScale) Sets the surface scale- Specified by:
setSurfaceScale
in interfaceSpecularLightingRable
-
getKs
public double getKs()- Specified by:
getKs
in interfaceSpecularLightingRable
- Returns:
- specular constant, or ks.
-
setKs
public void setKs(double ks) Sets the specular constant, or ks- Specified by:
setKs
in interfaceSpecularLightingRable
-
getSpecularExponent
public double getSpecularExponent()- Specified by:
getSpecularExponent
in interfaceSpecularLightingRable
- Returns:
- specular exponent
-
setSpecularExponent
public void setSpecularExponent(double specularExponent) Sets the specular exponent- Specified by:
setSpecularExponent
in interfaceSpecularLightingRable
-
getKernelUnitLength
public double[] getKernelUnitLength()Returns the min [dx,dy] distance in user space for evalutation of the sobel gradient.- Specified by:
getKernelUnitLength
in interfaceSpecularLightingRable
-
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:
setKernelUnitLength
in interfaceSpecularLightingRable
-
createRendering
- Specified by:
createRendering
in interfaceRenderableImage
-