org.apache.batik.bridge.svg12

Class SVGMultiImageElementBridge

public class SVGMultiImageElementBridge extends SVGImageElementBridge

Bridge class for the <multiImage> element. The 'multiImage' element is similar to the 'image' element (supports all the same attributes and properties) except.
  1. It can only be used to reference raster content (this is an implementation thing really)
  2. It has two addtional attributes: 'pixel-width' and 'pixel-height' which are the maximum width and height of the image referenced by the xlink:href attribute.
  3. It can contain a child element 'subImage' which has only three attributes, pixel-width, pixel-height and xlink:href. The image displayed is the smallest image such that pixel-width and pixel-height are greater than or equal to the required image size for display.
Nested Class Summary
static classSVGMultiImageElementBridge.MultiImageElementViewport
A viewport defined an <svg> element.
Constructor Summary
SVGMultiImageElementBridge()
Method Summary
protected voidaddInfo(Element e, Collection elems, Collection minDim, Collection maxDim, Rectangle2D bounds)
protected voidaddRefInfo(Element e, Collection elems, Collection minDim, Collection maxDim, Rectangle2D bounds)
voidbuildGraphicsNode(BridgeContext ctx, Element e, GraphicsNode node)
GraphicsNodecreateGraphicsNode(BridgeContext ctx, Element e)
Creates a graphics node using the specified BridgeContext and for the specified element.
voiddispose()
Disposes this BridgeUpdateHandler and releases all resources.
protected DimensiongetElementMaxPixel(Element e, Rectangle2D bounds)
protected DimensiongetElementMinPixel(Element e, Rectangle2D bounds)
protected DimensiongetElementPixelSize(Element e, String attr, Rectangle2D bounds)
protected static Rectangle2DgetImageBounds(BridgeContext ctx, Element element)
Returns the bounds of the specified image element.
BridgegetInstance()
Returns a new instance of this bridge.
StringgetLocalName()
Returns 'multiImage'.
StringgetNamespaceURI()
Returns the Batik Extension namespace URI.
protected voidinitializeDynamicSupport(BridgeContext ctx, Element e, GraphicsNode node)
This method is invoked during the build phase if the document is dynamic.
booleanisComposite()
Returns false as shapes are not a container.

Constructor Detail

SVGMultiImageElementBridge

public SVGMultiImageElementBridge()

Method Detail

addInfo

protected void addInfo(Element e, Collection elems, Collection minDim, Collection maxDim, Rectangle2D bounds)

addRefInfo

protected void addRefInfo(Element e, Collection elems, Collection minDim, Collection maxDim, Rectangle2D bounds)

buildGraphicsNode

public void buildGraphicsNode(BridgeContext ctx, Element e, GraphicsNode node)

createGraphicsNode

public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e)
Creates a graphics node using the specified BridgeContext and for the specified element.

Parameters: ctx the bridge context to use e the element that describes the graphics node to build

Returns: a graphics node that represents the specified element

dispose

public void dispose()
Disposes this BridgeUpdateHandler and releases all resources.

getElementMaxPixel

protected Dimension getElementMaxPixel(Element e, Rectangle2D bounds)

getElementMinPixel

protected Dimension getElementMinPixel(Element e, Rectangle2D bounds)

getElementPixelSize

protected Dimension getElementPixelSize(Element e, String attr, Rectangle2D bounds)

getImageBounds

protected static Rectangle2D getImageBounds(BridgeContext ctx, Element element)
Returns the bounds of the specified image element.

Parameters: ctx the bridge context element the image element

getInstance

public Bridge getInstance()
Returns a new instance of this bridge.

getLocalName

public String getLocalName()
Returns 'multiImage'.

getNamespaceURI

public String getNamespaceURI()
Returns the Batik Extension namespace URI.

initializeDynamicSupport

protected void initializeDynamicSupport(BridgeContext ctx, Element e, GraphicsNode node)
This method is invoked during the build phase if the document is dynamic. The responsability of this method is to ensure that any dynamic modifications of the element this bridge is dedicated to, happen on its associated GVT product.

isComposite

public boolean isComposite()
Returns false as shapes are not a container.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.