KickJava   Java API By Example, From Geeks To Geeks.

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


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.Shape JavaDoc;
21 import java.awt.geom.Rectangle2D JavaDoc;
22 import java.awt.image.renderable.RenderableImage JavaDoc;
23
24 /**
25  * This is an extension of RenderableImage that adds some needed
26  * functionality for tracking dirty regions and determining image
27  * dependancies.
28  *
29  * @author <a HREF="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
30  * @version $Id: Filter.java,v 1.4 2004/08/18 07:13:59 vhardy Exp $
31  */

32 public interface Filter extends RenderableImage JavaDoc {
33
34     /**
35      * Returns the bounds of the current image.
36      * This should be 'in sync' with getMinX, getMinY, getWidth, getHeight
37      */

38     public Rectangle2D JavaDoc getBounds2D();
39
40     /**
41      * Returns the current modification timestamp on this Renderable
42      * node. This value will change whenever cached output data becomes
43      * invalid.
44      * @return Current modification timestamp value.
45      */

46     public long getTimeStamp();
47
48     /**
49      * Returns the region of input data is is required to generate
50      * outputRgn.
51      * @param srcIndex The source to do the dependency calculation for.
52      * @param outputRgn The region of output you are interested in
53      * generating dependencies for. The is given in the user coordiate
54      * system for this node.
55      * @return The region of input required. This is in the user
56      * coordinate system for the source indicated by srcIndex.
57      */

58     public Shape JavaDoc getDependencyRegion(int srcIndex, Rectangle2D JavaDoc outputRgn);
59
60     /**
61      * This calculates the region of output that is affected by a change
62      * in a region of input.
63      * @param srcIndex The input that inputRgn reflects changes in.
64      * @param inputRgn the region of input that has changed, used to
65      * calculate the returned shape. This is given in the user
66      * coordinate system of the source indicated by srcIndex.
67      * @return The region of output that would be invalid given
68      * a change to inputRgn of the source selected by srcIndex.
69      * this is in the user coordinate system of this node.
70      */

71     public Shape JavaDoc getDirtyRegion(int srcIndex, Rectangle2D JavaDoc inputRgn);
72 }
73
74
Popular Tags