src/main/java/chalmers/pimp/model/pixeldata/PixelFactory.java
public static IPixel createPixel(int x, int y, IColor color) {
    Objects.requireNonNull(color);

    IPixel pixel = new PixelImpl(x, y);
    pixel.setRed(color.getRedPercentage());
    pixel.setGreen(color.getGreenPercentage());
    pixel.setBlue(color.getBluePercentage());
    pixel.setAlpha(color.getAlphaPercentage());
    return pixel;
  }
/**
   * Creates and returns a pixel instance.
   *
   * @param x     the x-coordinate of the pixel.
   * @param y     the y-coordinate of the pixel.
   * @param color the color of the pixel.
   * @return a pixel instance.
   * @throws NullPointerException if any arguments are {@code null}.
   */
Creates and returns a pixel instance.
@param x     the x-coordinate of the pixel.
@param y     the y-coordinate of the pixel.
@param color the color of the pixel.
@return a pixel instance.
@throws NullPointerException if any arguments are  null.
Creates and returns a pixel instance . @param x the x - coordinate of the pixel . @param y the y - coordinate of the pixel . @param color the color of the pixel . @return a pixel instance . @throws NullPointerException if any arguments are null .
public static IPixel createPixel(int x, int y, IColor color) {
    Objects.requireNonNull(color);
    IPixel pixel = new PixelImpl(x, y);
    pixel.setRed(color.getRedPercentage());
    pixel.setGreen(color.getGreenPercentage());
    pixel.setBlue(color.getBluePercentage());
    pixel.setAlpha(color.getAlphaPercentage());
    return pixel;
  }
public static IPixel createPixel ( int x , int y , IColor color ) { Objects . requireNonNull ( color ) ; IPixel pixel = new PixelImpl ( x , y ) ; pixel . setRed ( color . getRedPercentage ( ) ) ; pixel . setGreen ( color . getGreenPercentage ( ) ) ; pixel . setBlue ( color . getBluePercentage ( ) ) ; pixel . setAlpha ( color . getAlphaPercentage ( ) ) ; return pixel ; }
Creates and returns a pixel instance.
Creates and returns a pixel instance .