Where people come together to learn, code, and play. Custom-built HTTP server, site generator, and website from scratch using no external libraries. Goal is to be as minimalistic and fun as possible. http://projectdivar.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
SigPlace/readers/Box.java

26 lines
709 B

package readers;
public class Box{
public int x;
public int y;
public int w;
public int h;
boolean ja_required;
boolean isNumber = false;
final static int BOX_THRESHOLD=8; //How many pixels outside the specified region the score can be.
public Box(int x,int y,int w, int h) {
this.x=x;
this.y=y;
this.w=w;
this.h=h;
}
boolean insideBox(int x,int y) {
return this.x-BOX_THRESHOLD<=x&&this.x+this.w+BOX_THRESHOLD>=x&&this.y-BOX_THRESHOLD<=y&&this.y+this.h+BOX_THRESHOLD>=y;
}
public void setNumber(boolean isNumber) {
this.isNumber = isNumber;
}
public boolean isNumber() {
return isNumber;
}
}