Class ImageOverlay

    • 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 BufferedImage process​(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

        BufferedImage process​(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)