package pl.vgtworld.imagedraw.filters.gaussianblur;

import pl.vgtworld.imagedraw.ImageDrawEntity;
import pl.vgtworld.imagedraw.filters.ImageDrawFilter;
import pl.vgtworld.imagedraw.filters.matrix.MatrixFilter;

public class GaussianBlurFilter implements ImageDrawFilter {
	
	private MatrixGenerator matrixGenerator = new MatrixGenerator();
	
	private int radius;
	
	private double standardDeviation;
	
	public GaussianBlurFilter(int radius) {
		this.radius = radius;
		standardDeviation = radius / 2.0f;
	}
	
	public GaussianBlurFilter(int radius, double standardDeviation) {
		this.radius = radius;
		this.standardDeviation = standardDeviation;
	}
	
	@Override
	public void doFilter(ImageDrawEntity image, int x, int y, int width, int height) {
		float[][] matrix = matrixGenerator.createMatrix(radius, standardDeviation);
		MatrixFilter matrixFilter = new MatrixFilter(matrix);
		matrixFilter.doFilter(image, x, y, width, height);
	}
	
}

@@ -205,16 +205,67 @@
 ilter;%0A%0A
+/**%0A * Filter applying gaussian blur to image.%0A */%0A
 public c
@@ -452,113 +452,449 @@
 %0A%09%0A%09
-public GaussianBlurFilter(int radius) %7B%0A%09%09this.radius = radius;%0A%09%09standardDeviation = radius / 2.0f;%0A%09%7D%0A%09
+/**%0A%09 * Creates filter with custom configuration.%0A%09 * %0A%09 * %3Cp%3E%0A%09 * Standard deviation is set to half of provided radius.%0A%09 * %0A%09 * @param radius Gaussian blur radius.%0A%09 */%0A%09public GaussianBlurFilter(int radius) %7B%0A%09%09this.radius = radius;%0A%09%09standardDeviation = radius / 2.0f;%0A%09%7D%0A%09%0A%09/**%0A%09 * Creates filter with custom configuration.%0A%09 * %0A%09 * @param radius Gaussian blur radius.%0A%09 * @param standardDeviation Gaussian blur standard deviation.%0A%09 */
 %0A%09pu

Add documentation.