KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > svggen > ImageHandler


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.svggen;
19
20 import java.awt.Image JavaDoc;
21 import java.awt.image.RenderedImage JavaDoc;
22 import java.awt.image.renderable.RenderableImage JavaDoc;
23
24 import org.w3c.dom.Element JavaDoc;
25
26 /**
27  * This interface allows the user of the Graphics2D SVG generator
28  * to decide how to handle images that it renders. For example,
29  * an implementation could decide to embed JPEG/PNG encoded images
30  * into SVG source document using the data protocol (RFC 1521, paragraph 5.2)
31  * Another option is to save images into JPEG/PNG files and store URI
32  * in SVG source. <br>
33  *
34  * @author <a HREF="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
35  * @version $Id: ImageHandler.java,v 1.4 2004/08/18 07:14:59 vhardy Exp $
36  * @see org.apache.batik.svggen.SVGGraphics2D
37  */

38 public interface ImageHandler extends SVGSyntax {
39     /**
40      * The handler should set the xlink:href tag and the width and
41      * height attributes.
42      */

43     public void handleImage(Image JavaDoc image, Element JavaDoc imageElement,
44                             SVGGeneratorContext generatorContext);
45
46     /**
47      * The handler should set the xlink:href tag and the width and
48      * height attributes.
49      */

50     public void handleImage(RenderedImage JavaDoc image, Element JavaDoc imageElement,
51                             SVGGeneratorContext generatorContext);
52
53     /**
54      * The handler should set the xlink:href tag and the width and
55      * height attributes.
56      */

57     public void handleImage(RenderableImage JavaDoc image, Element JavaDoc imageElement,
58                             SVGGeneratorContext generatorContext);
59 }
60
Popular Tags