protected Point[] getPointsArray(int x0, int y0, int x1, int y1){
        Point[] ret=new Point[(x1-x0+1)*(y1-y0+1)];
        int counter=0;
        for(int p=x0; p<=x1; p++){
            for(int s=y0; s<=y1; s++){
                ret[counter]=new Point(p,s);
                counter++;
            }
        }
        return ret;
    }