Class ShuffleOverlay

    • Constructor Summary

      Constructors 
      Constructor Description
      ShuffleOverlay​(java.awt.image.BufferedImage bufferedImage, long seed)
      Creates a ShuffleOverlay that returns Pixels of the underlying BufferedImage in a random order determined by the seed that is given to its constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void createOverlay()
      Creates the overlay as an independent method to address pixels without using BufferedImages coordinates.
      protected void initOverlay()
      Initialization of the overlay.
      protected void shufflePixelOrder()
      Randomization of the already created overlay.
      • Methods inherited from class java.lang.Object

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

      • random

        protected java.util.Random random
    • Constructor Detail

      • ShuffleOverlay

        public ShuffleOverlay​(java.awt.image.BufferedImage bufferedImage,
                              long seed)
                       throws UnsupportedImageTypeException
        Creates a ShuffleOverlay that returns Pixels of the underlying BufferedImage in a random order determined by the seed that is given to its constructor.
        Parameters:
        bufferedImage - BufferedImage to represent the pixels of
        seed - Long to be used to affect the randomization of pixelorder.
        Throws:
        UnsupportedImageTypeException - if the images type is not supported by this overlay
    • Method Detail

      • createOverlay

        protected void createOverlay()

        Creates the overlay as an independent method to address pixels without using BufferedImages coordinates. Uses two protected methods to separate the creation of the overlay from its randomization.

        Subclasses should only overwrite this method to alter this separation.

        Overrides:
        createOverlay in class SequenceOverlay
      • initOverlay

        protected void initOverlay()

        Initialization of the overlay. This process is separate from the randomization of the overlay.

      • shufflePixelOrder

        protected void shufflePixelOrder()

        Randomization of the already created overlay.