src/main/java/chalmers/pimp/model/Stroke.java
public void updatePixels(ICanvas canvas, IPixel pixel) {
    Objects.requireNonNull(canvas);
    Objects.requireNonNull(pixel);
    Objects.requireNonNull(color);

    IRasterData pixels = RasterDataFactory.createRasterData(diameter, diameter, color);

    int radius = (int) (diameter / 2.0);
    canvas.setActiveLayerPixels(pixel.getX() - radius, pixel.getY() - radius, pixels);
  }
/**
   * Updates the state of the pixels in the model.
   *
   * @param canvas the associated model instance.
   * @param pixel  the pixel affected by the stroke.
   * @throws NullPointerException if any references are {@code null}.
   */
Updates the state of the pixels in the model.
@param canvas the associated model instance.
@param pixel  the pixel affected by the stroke.
@throws NullPointerException if any references are  null.
Updates the state of the pixels in the model . @param canvas the associated model instance . @param pixel the pixel affected by the stroke . @throws NullPointerException if any references are null .
public void updatePixels(ICanvas canvas, IPixel pixel) {
    Objects.requireNonNull(canvas);
    Objects.requireNonNull(pixel);
    Objects.requireNonNull(color);
    IRasterData pixels = RasterDataFactory.createRasterData(diameter, diameter, color);
    int radius = (int) (diameter / 2.0);
    canvas.setActiveLayerPixels(pixel.getX() - radius, pixel.getY() - radius, pixels);
  }
public void updatePixels ( ICanvas canvas , IPixel pixel ) { Objects . requireNonNull ( canvas ) ; Objects . requireNonNull ( pixel ) ; Objects . requireNonNull ( color ) ; IRasterData pixels = RasterDataFactory . createRasterData ( diameter , diameter , color ) ; int radius = ( int ) ( diameter / 2.0 ) ; canvas . setActiveLayerPixels ( pixel . getX ( ) - radius , pixel . getY ( ) - radius , pixels ) ; }
Updates the state of the pixels in the model.
Updates the state of the pixels in the model .