SigPlace/readers/Box.java
sigonasr2 817f6625ce prep sound voltex renderings
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
2022-08-06 19:15:44 -05:00

16 lines
461 B
Java

package readers;
class Box{
int x,y,w,h;
boolean ja_required;
final static int BOX_THRESHOLD=8; //How many pixels outside the specified region the score can be.
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;
}
}