Class ImageOverlay

    • Field Summary

      Fields 
      Modifier and Type Field Description
      ImageProvider image
      the image resource to use as overlay
      private double offsetBottom
      offset of the image from bottom border, values between 0 and 1
      private double offsetLeft
      offset of the image from left border, values between 0 and 1
      private double offsetRight
      offset of the image from top border, values between 0 and 1
      private double offsetTop
      offset of the image from right border, values between 0 and 1
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageOverlay​(ImageProvider image)
      Create an overlay in southeast corner.
      ImageOverlay​(ImageProvider image, double offsetLeft, double offsetTop, double offsetRight, double offsetBottom)
      Create an overlay info.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.image.BufferedImage process​(java.awt.image.BufferedImage ground)
      Handle overlay.
      (package private) java.awt.image.BufferedImage process​(java.awt.image.BufferedImage ground, boolean highResolution)
      Handle overlay.
      • Methods inherited from class java.lang.Object

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

      • offsetLeft

        private final double offsetLeft
        offset of the image from left border, values between 0 and 1
      • offsetRight

        private final double offsetRight
        offset of the image from top border, values between 0 and 1
      • offsetTop

        private final double offsetTop
        offset of the image from right border, values between 0 and 1
      • offsetBottom

        private final double offsetBottom
        offset of the image from bottom border, values between 0 and 1
    • Constructor Detail

      • ImageOverlay

        public ImageOverlay​(ImageProvider image,
                            double offsetLeft,
                            double offsetTop,
                            double offsetRight,
                            double offsetBottom)
        Create an overlay info. All values are relative sizes between 0 and 1. Size of the image is the result of the difference between left/right and top/bottom.
        Parameters:
        image - image provider for the overlay icon
        offsetLeft - offset of the image from left border, values between 0 and 1, -1 for auto-calculation
        offsetTop - offset of the image from top border, values between 0 and 1, -1 for auto-calculation
        offsetRight - offset of the image from right border, values between 0 and 1, -1 for auto-calculation
        offsetBottom - offset of the image from bottom border, values between 0 and 1, -1 for auto-calculation
        Since:
        8095
    • Method Detail

      • process

        public java.awt.image.BufferedImage process​(java.awt.image.BufferedImage ground)
        Handle overlay. The image passed as argument is modified!
        Specified by:
        process in interface ImageProcessor
        Parameters:
        ground - the base image for the overlay (gets modified!)
        Returns:
        the modified image (same as argument)
        Since:
        8095
      • process

        java.awt.image.BufferedImage process​(java.awt.image.BufferedImage ground,
                                             boolean highResolution)
        Handle overlay. The image passed as argument is modified!
        Parameters:
        ground - the base image for the overlay (gets modified!)
        highResolution - whether the high resolution variant should be used to overlay
        Returns:
        the modified image (same as argument)