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.svggen;
20:
21: import java.awt.Image;
22: import java.awt.image.RenderedImage;
23: import java.awt.image.renderable.RenderableImage;
24:
25: import org.w3c.dom.Element;
26:
27: /**
28: * This interface allows the user of the Graphics2D SVG generator
29: * to decide how to handle images that it renders. For example,
30: * an implementation could decide to embed JPEG/PNG encoded images
31: * into SVG source document using the data protocol (RFC 1521, paragraph 5.2)
32: * Another option is to save images into JPEG/PNG files and store URI
33: * in SVG source. <br>
34: *
35: * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
36: * @version $Id: ImageHandler.java 478176 2006-11-22 14:50:50Z dvholten $
37: * @see org.apache.batik.svggen.SVGGraphics2D
38: */
39: public interface ImageHandler extends SVGSyntax {
40: /**
41: * The handler should set the xlink:href tag and the width and
42: * height attributes.
43: */
44: void handleImage(Image image, Element imageElement,
45: SVGGeneratorContext generatorContext);
46:
47: /**
48: * The handler should set the xlink:href tag and the width and
49: * height attributes.
50: */
51: void handleImage(RenderedImage image, Element imageElement,
52: SVGGeneratorContext generatorContext);
53:
54: /**
55: * The handler should set the xlink:href tag and the width and
56: * height attributes.
57: */
58: void handleImage(RenderableImage image, Element imageElement,
59: SVGGeneratorContext generatorContext);
60: }
|