KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2
3    Copyright 2001,2003 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.Point JavaDoc;
21 import java.awt.image.Kernel JavaDoc;
22
23 import org.apache.batik.ext.awt.image.PadMode;
24
25 /**
26  * Convolves an image with a convolution matrix.
27  *
28  * @author <a HREF="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
29  * @version $Id: ConvolveMatrixRable.java,v 1.7 2004/08/18 07:13:59 vhardy Exp $
30  */

31 public interface ConvolveMatrixRable extends FilterColorInterpolation {
32
33     /**
34      * Returns the source to be Convolved
35      */

36     public Filter getSource();
37
38     /**
39      * Sets the source to be Convolved
40      * @param src image to Convolved.
41      */

42     public void setSource(Filter src);
43
44
45     /**
46      * Returns the Convolution Kernel in use
47      */

48     public Kernel JavaDoc getKernel();
49
50     /**
51      * Sets the Convolution Kernel to use.
52      * @param k Kernel to use for convolution.
53      */

54     public void setKernel(Kernel JavaDoc k);
55
56     /**
57      * Returns the target point of the kernel (what pixel under the kernel
58      * should be set to the result of convolution).
59      */

60     public Point JavaDoc getTarget();
61
62     /**
63      * Sets the target point of the kernel (what pixel under the kernel
64      * should be set to the result of the convolution).
65      */

66     public void setTarget(Point JavaDoc pt);
67
68     /**
69      * Returns the shift value to apply to the result of convolution
70      */

71     public double getBias();
72
73     /**
74      * Sets the shift value to apply to the result of convolution
75      */

76     public void setBias(double bias);
77
78     /**
79      * Returns the current edge handling mode.
80      */

81     public PadMode getEdgeMode();
82
83     /**
84      * Sets the current edge handling mode.
85      */

86     public void setEdgeMode(PadMode edgeMode);
87
88     /**
89      * Returns the [x,y] distance in user space between kernel values
90      */

91     public double [] getKernelUnitLength();
92
93     /**
94      * Sets the [x,y] distance in user space between kernel values
95      * If set to zero then one pixel in device space will be used.
96      */

97     public void setKernelUnitLength(double [] kernelUnitLength);
98
99     /**
100      * Returns false if the convolution should affect the Alpha channel
101      */

102     public boolean getPreserveAlpha();
103
104     /**
105      * Sets Alpha channel handling.
106      * A value of False indicates that the convolution should apply to
107      * the Alpha Channel
108      */

109     public void setPreserveAlpha(boolean preserveAlpha);
110 }
111
112
Popular Tags