KickJava   Java API By Example, From Geeks To Geeks.

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


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.util.List JavaDoc;
21
22 import org.apache.batik.ext.awt.image.ARGBChannel;
23
24 /**
25  * Implements a DisplacementMap operation, which takes pixel values from
26  * another image to spatially displace the input image
27  *
28  * @author <a HREF="mailto:sheng.pei@eng.sun.com">Sheng Pei</a>
29  * @version $Id: DisplacementMapRable.java,v 1.7 2005/03/27 08:58:33 cam Exp $
30  */

31 public interface DisplacementMapRable extends FilterColorInterpolation {
32
33     public static final int CHANNEL_R = 1;
34     public static final int CHANNEL_G = 2;
35     public static final int CHANNEL_B = 3;
36     public static final int CHANNEL_A = 4;
37
38     /**
39      * The sources to be used in the displacement operation
40      * The source at index 0 is displacement by the channels
41      * in source at index 1 defined by the xChannelSelector
42      * and the yChannelSelector. The displacement amount is
43      * defined by the scale attribute.
44      *
45      * @param srcs The list of images used in the operation.
46      */

47     public void setSources(List JavaDoc srcs);
48
49     /**
50      * The displacement scale factor
51      * @param scale can be any number.
52      */

53     public void setScale(double scale);
54
55     /**
56      * Returns the displacement scale factor
57      */

58     public double getScale();
59
60     /**
61      * Select which component values will be used
62      * for displacement along the X axis
63      * @param xChannelSelector value is among R,
64      * G, B and A.
65      */

66     public void setXChannelSelector(ARGBChannel xChannelSelector);
67
68     /**
69      * Returns the xChannelSelector
70      */

71     public ARGBChannel getXChannelSelector();
72
73     /**
74      * Select which component values will be used
75      * for displacement along the Y axis
76      * @param yChannelSelector value is among R,
77      * G, B and A.
78      */

79     public void setYChannelSelector(ARGBChannel yChannelSelector);
80
81     /**
82      * Returns the yChannelSelector
83      */

84     public ARGBChannel getYChannelSelector();
85
86 }
87
Popular Tags