package pl.vgtworld.imagedraw.filters.edgedetect;

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

public class EdgeDetectFilter implements ImageDrawFilter {
	
	@Override
	public void doFilter(ImageDrawEntity image, int x, int y, int width, int height) {
		float[][] matrix = new float[][] {
				{ 0, 1, 0 },
				{ 1, -4, 1 },
				{ 0, 1, 0 }
		};
		MatrixFilter filter = new MatrixFilter(matrix);
		filter.doFilter(image, x, y, width, height);
	}
	
}

@@ -264,16 +264,234 @@
 ter %7B%0A%09%0A
+%09private static final int DEFAULT_STRENGTH = 1;%0A%09%0A%09private float strength;%0A%09%0A%09public EdgeDetectFilter() %7B%0A%09%09strength = DEFAULT_STRENGTH;%0A%09%7D%0A%09%0A%09public EdgeDetectFilter(float strength) %7B%0A%09%09this.strength = strength;%0A%09%7D%0A%09%0A
 %09@Overri
@@ -493,16 +493,16 @@
 verride%0A
-
 %09public 
@@ -619,25 +619,32 @@
  %7B%0A%09%09%09%09%7B 0, 
-1
+strength
 , 0 %7D,%0A%09%09%09%09%7B
@@ -648,16 +648,41 @@
 %09%09%7B 
-1, -4, 1
+strength, -4 * strength, strength
  %7D,%0A
@@ -690,17 +690,24 @@
 %09%09%09%7B 0, 
-1
+strength
 , 0 %7D%0A%09%09

Add overloaded constructor with configurabe strength.