|
|
|
@ -64,7 +64,9 @@ public abstract class Reader{ |
|
|
|
|
int X = i%width; |
|
|
|
|
for (int x=-1;x<=1;x++) { |
|
|
|
|
for (int y=-1;y<=1;y++) { |
|
|
|
|
if (x>=0&&y>=0&&x<=width&&y<=arr.length/width) { |
|
|
|
|
int newX=(i+x+y*width)%width; |
|
|
|
|
int newY=(i+x+y*width)/width; |
|
|
|
|
if (newX>=0&&newY>=0&&newX<=width&&newY<=arr.length/width) { |
|
|
|
|
Color col = new Color(arr[i+x+y*width]); |
|
|
|
|
if (!col.equals(Color.MAGENTA)&&SEEKCOLOR.colorInRange(col)) { |
|
|
|
|
farthestRight=seek(arr,i+x+y*width,SEEKCOLOR,FINALCOLOR,width,farthestRight); |
|
|
|
@ -83,7 +85,9 @@ public abstract class Reader{ |
|
|
|
|
int X = i%width; |
|
|
|
|
for (int x=-1;x<=1;x++) { |
|
|
|
|
for (int y=-1;y<=1;y++) { |
|
|
|
|
if (x>=0&&y>=0&&x<=width&&y<=arr.length/width) { |
|
|
|
|
int newX=(i+x+y*width)%width; |
|
|
|
|
int newY=(i+x+y*width)/width; |
|
|
|
|
if (newX>=0&&newY>=0&&newX<=width&&newY<=arr.length/width) { |
|
|
|
|
Color col = new Color(arr[i+x+y*width]); |
|
|
|
|
if (!col.equals(Color.MAGENTA)&&colorIsBright(col, threshold)) { |
|
|
|
|
farthestRight=seekThreshold(arr,i+x+y*width,threshold,FINALCOLOR,width,farthestRight); |
|
|
|
|