Class PreloaderSVG

  • All Implemented Interfaces:
    org.apache.xmlgraphics.image.loader.spi.ImagePreloader

    public class PreloaderSVG
    extends org.apache.xmlgraphics.image.loader.impl.AbstractImagePreloader
    Image preloader for SVG images.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private class  PreloaderSVG.Loader
      This method is put in another class so that the class loader does not attempt to load Batik related classes when constructing the SVGPreloader class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean batikAvailable  
      private static org.apache.commons.logging.Log log
      Logger instance
      • Fields inherited from interface org.apache.xmlgraphics.image.loader.spi.ImagePreloader

        DEFAULT_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      PreloaderSVG()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getParserName()
      Returns the fully qualified classname of an XML parser for Batik classes that apparently need it (error messages, perhaps)
      org.apache.xmlgraphics.image.loader.ImageInfo preloadImage​(java.lang.String uri, javax.xml.transform.Source src, org.apache.xmlgraphics.image.loader.ImageContext context)
      private static double px2mpt​(double px, double resolution)  
      • Methods inherited from class org.apache.xmlgraphics.image.loader.impl.AbstractImagePreloader

        getHeader, getPriority
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        private static org.apache.commons.logging.Log log
        Logger instance
      • batikAvailable

        private boolean batikAvailable
    • Constructor Detail

      • PreloaderSVG

        public PreloaderSVG()
    • Method Detail

      • preloadImage

        public org.apache.xmlgraphics.image.loader.ImageInfo preloadImage​(java.lang.String uri,
                                                                          javax.xml.transform.Source src,
                                                                          org.apache.xmlgraphics.image.loader.ImageContext context)
                                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getParserName

        public static java.lang.String getParserName()
        Returns the fully qualified classname of an XML parser for Batik classes that apparently need it (error messages, perhaps)
        Returns:
        an XML parser classname
      • px2mpt

        private static double px2mpt​(double px,
                                     double resolution)