KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > ext > awt > image > renderable > DiffuseLightingRable


1 /*
2
3    Copyright 2001 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.ext.awt.image.renderable;
19
20 import java.awt.geom.Rectangle2D JavaDoc;
21
22 import org.apache.batik.ext.awt.image.Light;
23
24 /**
25  * This filter primitive lights an image using the alpha channel as a bump map.
26  * The resulting image is an RGBA opaque image based on the light color
27  * with alpha = 1.0 everywhere. The lighting calculation follows the standard diffuse
28  * component of the Phong lighting model. The resulting image depends on the light color,
29  * light position and surface geometry of the input bump map.
30  *
31  * This filter follows the specification of the feDiffuseLighting filter in
32  * the SVG 1.0 specification.
33  *
34  * @author <a HREF="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
35  * @version $Id: DiffuseLightingRable.java,v 1.7 2005/03/27 08:58:33 cam Exp $
36  */

37 public interface DiffuseLightingRable extends FilterColorInterpolation {
38     /**
39      * Returns the source to be filtered
40      */

41     public Filter getSource();
42
43     /**
44      * Sets the source to be filtered
45      */

46     public void setSource(Filter src);
47
48     /**
49      * @return Light object used for the diffuse lighting
50      */

51     public Light getLight();
52
53     /**
54      * @param light New Light object
55      */

56     public void setLight(Light light);
57
58     /**
59      * @return surfaceScale
60      */

61     public double getSurfaceScale();
62
63     /**
64      * Sets the surface scale
65      */

66     public void setSurfaceScale(double surfaceScale);
67
68     /**
69      * @return diffuse constant, or kd.
70      */

71     public double getKd();
72
73     /**
74      * Sets the diffuse constant, or kd
75      */

76     public void setKd(double kd);
77
78     /**
79      * @return the litRegion for this filter
80      */

81     public Rectangle2D JavaDoc getLitRegion();
82
83     /**
84      * Sets the litRegion for this filter
85      */

86     public void setLitRegion(Rectangle2D JavaDoc litRegion);
87
88     /**
89      * Returns the min [dx,dy] distance in user space for evalutation of
90      * the sobel gradient.
91      */

92     public double [] getKernelUnitLength();
93
94     /**
95      * Sets the min [dx,dy] distance in user space for evaluation of the
96      * sobel gradient. If set to zero or null then device space will be used.
97      */

98     public void setKernelUnitLength(double [] kernelUnitLength);
99 }
100
101
Popular Tags