Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.batik.svggen
Interface GenericImageHandler

All Known Subinterfaces:
  CachedImageHandler

All Known Implementing Classes:
  DefaultCachedImageHandler, SimpleImageHandler

public interface GenericImageHandler

Extends the default ImageHandler interface with calls to allow caching of raster images in generated SVG content.

Method Summary
`org.w3c.dom.Element` | `createElement(SVGGeneratorContext generatorContext)` Creates an Element suitable for referring to images.
`java.awt.geom.AffineTransform` | `handleImage(java.awt.Image image, org.w3c.dom.Element imageElement, int x, int y, int width, int height, SVGGeneratorContext generatorContext)` The handler should set the xlink:href and return a transform
`java.awt.geom.AffineTransform` | `handleImage(java.awt.image.renderable.RenderableImage image, org.w3c.dom.Element imageElement, double x, double y, double width, double height, SVGGeneratorContext generatorContext)` The handler should set the xlink:href tag and return a transform
`java.awt.geom.AffineTransform` | `handleImage(java.awt.image.RenderedImage image, org.w3c.dom.Element imageElement, int x, int y, int width, int height, SVGGeneratorContext generatorContext)` The handler should set the xlink:href tag and return a transform
`void` | `setDOMTreeManager(DOMTreeManager domTreeManager)` Sets the DomTreeManager this image handler may need to interact with.

Method Detail

### setDOMTreeManager

    public void setDOMTreeManager(DOMTreeManager domTreeManager)

  Sets the DomTreeManager this image handler may need to interact with.

### createElement

    public org.w3c.dom.Element createElement(SVGGeneratorContext generatorContext)

  Creates an Element suitable for referring to images. Note that no assumptions can be made about the name of this Element.

### handleImage

    public java.awt.geom.AffineTransform handleImage(java.awt.Image image,
                                                     org.w3c.dom.Element imageElement,
                                                     int x,
                                                     int y,
                                                     int width,
                                                     int height,
                                                     SVGGeneratorContext generatorContext)

  The handler should set the xlink:href and return a transform

  Parameters:
    `image` - the image under consideration
    `imageElement` - the DOM Element for this image
    `x` - x coordinate
    `y` - y coordinate
    `width` - width for rendering
    `height` - height for rendering
    `generatorContext` - the SVGGeneratorContext
  Returns:
    transform converting the image dimension to rendered dimension

### handleImage

    public java.awt.geom.AffineTransform handleImage(java.awt.image.RenderedImage image,
                                                     org.w3c.dom.Element imageElement,
                                                     int x,
                                                     int y,
                                                     int width,
                                                     int height,
                                                     SVGGeneratorContext generatorContext)

  The handler should set the xlink:href tag and return a transform

  Parameters:
    `image` - the image under consideration
    `imageElement` - the DOM Element for this image
    `x` - x coordinate
    `y` - y coordinate
    `width` - width for rendering
    `height` - height for rendering
    `generatorContext` - the SVGGeneratorContext
  Returns:
    transform converting the image dimension to rendered dimension

### handleImage

    public java.awt.geom.AffineTransform handleImage(java.awt.image.renderable.RenderableImage image,
                                                     org.w3c.dom.Element imageElement,
                                                     double x,
                                                     double y,
                                                     double width,
                                                     double height,
                                                     SVGGeneratorContext generatorContext)

  The handler should set the xlink:href tag and return a transform

  Parameters:
    `image` - the image under consideration
    `imageElement` - the DOM Element for this image
    `x` - x coordinate
    `y` - y coordinate
    `width` - width for rendering
    `height` - height for rendering
    `generatorContext` - the SVGGeneratorContext
  Returns:
    transform converting the image dimension to rendered dimension

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Apache Software Foundation. All Rights Reserved.