01: /*
02:
03: Licensed to the Apache Software Foundation (ASF) under one or more
04: contributor license agreements. See the NOTICE file distributed with
05: this work for additional information regarding copyright ownership.
06: The ASF licenses this file to You under the Apache License, Version 2.0
07: (the "License"); you may not use this file except in compliance with
08: the License. You may obtain a copy of the License at
09:
10: http://www.apache.org/licenses/LICENSE-2.0
11:
12: Unless required by applicable law or agreed to in writing, software
13: distributed under the License is distributed on an "AS IS" BASIS,
14: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: See the License for the specific language governing permissions and
16: limitations under the License.
17:
18: */
19: package org.apache.batik.gvt.filter;
20:
21: import org.apache.batik.ext.awt.image.renderable.Filter;
22: import org.apache.batik.gvt.GraphicsNode;
23:
24: /**
25: * This interface allows <tt>GraphicsNode</tt> to be seen as
26: * <tt>RenderableImages</tt>, which can be used for operations such as
27: * filtering, masking or compositing.
28: * Given a <tt>GraphicsNode</tt>, a <tt>GraphicsNodeRable</tt> can be
29: * created through a <tt>GraphicsNodeRableFactory</tt>.
30: *
31: * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
32: * @version $Id: GraphicsNodeRable.java 478188 2006-11-22 15:19:17Z dvholten $
33: */
34: public interface GraphicsNodeRable extends Filter {
35: /**
36: * Returns the <tt>GraphicsNode</tt> for which a rendering can be obtained
37: * @return the <tt>GraphicsNode</tt> associated with this image.
38: */
39: GraphicsNode getGraphicsNode();
40:
41: /**
42: * Sets the <tt>GraphicsNode</tt> associated with this image.
43: */
44: void setGraphicsNode(GraphicsNode node);
45:
46: /**
47: * Returns true if this Rable get's it's contents by calling
48: * primitivePaint on the associated <tt>GraphicsNode</tt> or
49: * false if it uses paint.
50: */
51: boolean getUsePrimitivePaint();
52:
53: /**
54: * Set to true if this Rable should get it's contents by calling
55: * primitivePaint on the associated <tt>GraphicsNode</tt> or false
56: * if it should use paint.
57: */
58: void setUsePrimitivePaint(boolean usePrimitivePaint);
59: }
|