Interface GrayImage

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isBlack​(int x, int y)
      Returns if the pixel specified by the location in the arguments is black.
      boolean isWhite​(int x, int y)
      Returns if the pixel specified by the location in the arguments is white.
      void putBlack​(int x, int y)
      Sets a pixel to black (minimum intensity value).
      void putWhite​(int x, int y)
      Sets a pixel to white (maximum intensity value).
    • Method Detail

      • isBlack

        boolean isBlack​(int x,
                        int y)
        Returns if the pixel specified by the location in the arguments is black.
        Parameters:
        x - the horizontal location of the pixel
        y - the vertical location of the pixel
        Throws:
        IllegalArgumentException - if any of the parameters are invalid
      • isWhite

        boolean isWhite​(int x,
                        int y)
        Returns if the pixel specified by the location in the arguments is white.
        Parameters:
        x - the horizontal location of the pixel
        y - the vertical location of the pixel
        Throws:
        IllegalArgumentException - if any of the parameters are invalid
      • putBlack

        void putBlack​(int x,
                      int y)
        Sets a pixel to black (minimum intensity value).
        Parameters:
        x - horizontal position of the pixel's location
        y - vertical position of the pixel's location
      • putWhite

        void putWhite​(int x,
                      int y)
        Sets a pixel to white (maximum intensity value).
        Parameters:
        x - horizontal position of the pixel's location
        y - vertical position of the pixel's location