package com.inspect.infrared.selectArea.immp;

import com.inspect.infrared.selectArea.SelectArea;

public class RectangleSelectArea extends SelectArea {
    private int x1;
    private int y1;
    private int x2;
    private int y2;
    private int x3;
    private int y3;
    private int x4;
    private int y4;

    public RectangleSelectArea(int... coordinates) {
        super(coordinates);
    }

    public boolean isIn(int x, int y) {
        return x >= this.x1 && y >= this.y1 && x <= this.x2 && y >= this.y2 && x <= this.x3 && y <= this.y3 && x >= this.x4 && y <= this.y4;
    }
}
