Class SVGMultiImageElementBridge

  • All Implemented Interfaces:
    SVGAnimationTargetContext, Bridge, BridgeUpdateHandler, ErrorConstants, GraphicsNodeBridge, XMLConstants, SVGContext, CSSConstants, SVGConstants

    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.
    Version:
    $Id: SVGMultiImageElementBridge.java 1805408 2017-08-18 12:21:52Z ssteiner $
    • Constructor Detail

      • SVGMultiImageElementBridge

        public SVGMultiImageElementBridge()
    • Method Detail

      • initializeDynamicSupport

        protected void initializeDynamicSupport​(BridgeContext ctx,
                                                org.w3c.dom.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.
        Overrides:
        initializeDynamicSupport in class SVGImageElementBridge
      • getImageBounds

        protected static java.awt.geom.Rectangle2D getImageBounds​(BridgeContext ctx,
                                                                  org.w3c.dom.Element element)
        Returns the bounds of the specified image element.
        Parameters:
        ctx - the bridge context
        element - the image element
      • addInfo

        protected void addInfo​(org.w3c.dom.Element e,
                               java.util.Collection elems,
                               java.util.Collection minDim,
                               java.util.Collection maxDim,
                               java.awt.geom.Rectangle2D bounds)
      • addRefInfo

        protected void addRefInfo​(org.w3c.dom.Element e,
                                  java.util.Collection elems,
                                  java.util.Collection minDim,
                                  java.util.Collection maxDim,
                                  java.awt.geom.Rectangle2D bounds)
      • getElementMinPixel

        protected java.awt.Dimension getElementMinPixel​(org.w3c.dom.Element e,
                                                        java.awt.geom.Rectangle2D bounds)
      • getElementMaxPixel

        protected java.awt.Dimension getElementMaxPixel​(org.w3c.dom.Element e,
                                                        java.awt.geom.Rectangle2D bounds)
      • getElementPixelSize

        protected java.awt.Dimension getElementPixelSize​(org.w3c.dom.Element e,
                                                         java.lang.String attr,
                                                         java.awt.geom.Rectangle2D bounds)