src/main/java/chalmers/pimp/model/pixeldata/RasterDataImpl.java
private List<List<IPixel>> createPixelDataMatrix(int width, int height, IColor color) {
    var result = new ArrayList<List<IPixel>>(height);

    for (int row = 0; row < height; row++) {
      var pixelRow = new ArrayList<IPixel>(width);

      for (int col = 0; col < width; col++) {
        pixelRow.add(new PixelImpl(col, row, color));
      }
      result.add(pixelRow);
    }

    return result;
  }
/**
   * Returns a matrix with the desired width, height and color pixels. Returns a matrix (a list of
   * rows).
   *
   * @param width  the amount of pixels in width.
   * @param height the amount of pixels in height.
   * @param color  the color of all the pixels.
   * @return a matrix of colors.
   */
Returns a matrix with the desired width, height and color pixels. Returns a matrix (a list of
rows).

@param width  the amount of pixels in width.
@param height the amount of pixels in height.
@param color  the color of all the pixels.
@return a matrix of colors.
Returns a matrix with the desired width height and color pixels . Returns a matrix ( a list of rows ) . @param width the amount of pixels in width . @param height the amount of pixels in height . @param color the color of all the pixels . @return a matrix of colors .
private List<List<IPixel>> createPixelDataMatrix(int width, int height, IColor color) {
    var result = new ArrayList<List<IPixel>>(height);
    for (int row = 0; row < height; row++) {
      var pixelRow = new ArrayList<IPixel>(width);
      for (int col = 0; col < width; col++) {
        pixelRow.add(new PixelImpl(col, row, color));
      }
      result.add(pixelRow);
    }
    return result;
  }
private List < List < IPixel > > createPixelDataMatrix ( int width , int height , IColor color ) { var result = new ArrayList < List < IPixel > > ( height ) ; for ( int row = 0 ; row < height ; row ++ ) { var pixelRow = new ArrayList < IPixel > ( width ) ; for ( int col = 0 ; col < width ; col ++ ) { pixelRow . add ( new PixelImpl ( col , row , color ) ) ; } result . add ( pixelRow ) ; } return result ; }
Returns a matrix with the desired width, height and color pixels.
Returns a matrix with the desired width height and color pixels .