aBlackPointFoundOnBorder = true;
}
}
+
+ if (right >= width) {
+ sizeExceeded = true;
+ break;
+ }
// .....
// . .
aBlackPointFoundOnBorder = true;
}
}
+
+ if (down >= height) {
+ sizeExceeded = true;
+ break;
+ }
// .....
// | .
aBlackPointFoundOnBorder = true;
}
}
+
+ if (left < 0) {
+ sizeExceeded = true;
+ break;
+ }
// .___.
// . .
}
}
- if (right >= width || down >= height || up < 0 || left < 0) {
+ if (up < 0) {
sizeExceeded = true;
break;
}
private boolean containsBlackPoint(int a, int b, int fixed, boolean horizontal) {
if (horizontal) {
- for (int x = a; x < b; x++) {
+ for (int x = a; x <= b; x++) {
if (image.get(x, fixed)) {
return true;
}
}
} else {
- for (int y = a; y < b; y++) {
+ for (int y = a; y <= b; y++) {
if (image.get(fixed, y)) {
return true;
}
- }
}
-
- return false;
}
+ return false;
+ }
+
}
\ No newline at end of file