Class Image

  • All Implemented Interfaces:
    Cloneable

    public class Image
    extends AbstractMarker
    The Image class is a type of marker that can be used to use bitmap images as Markers.
    Since:
    2.1
    • Constructor Detail

      • Image

        public Image​(InputStream image)
              throws IOException
        Create a new image. The InputStream must contain a bitmap image, which is read using the ImageIO.read(InputStream) method. The InputStream is not closed after use.
        Parameters:
        image - the InputStream containing the image
        Throws:
        IOException - if the image cannot be loaded
      • Image

        public Image​(String filename)
        Create a new image from the specified filename.
        Parameters:
        filename - the filename of the image
        Throws:
        IllegalArgumentException - if the image cannot be loaded
      • Image

        public Image​(URL url)
        Create a new image from the specified URL.
        Parameters:
        url - the URL of the image
        Throws:
        IllegalArgumentException - if the image cannot be loaded
    • Method Detail

      • setPaddingLeft

        public void setPaddingLeft​(double padding)
        Set the padding to the left of the text
        Parameters:
        padding - the padding to use, in pixels or whatever units are use by your Output class
        Since:
        2.3
      • setPaddingRight

        public void setPaddingRight​(double padding)
        Set the padding to the right of the image
        Parameters:
        padding - the padding to use, in pixels or whatever units are use by your Output class
        Since:
        2.3
      • setPaddingBottom

        public void setPaddingBottom​(double padding)
        Set the padding to the bottom of the image
        Parameters:
        padding - the padding to use, in pixels or whatever units are use by your Output class
        Since:
        2.3
      • setPaddingTop

        public void setPaddingTop​(double padding)
        Set the padding to the top of the image
        Parameters:
        padding - the padding to use, in pixels or whatever units are use by your Output class
        Since:
        2.3