use of com.xenoage.utils.math.geom.Shape in project Zong by Xenoage.
the class StaffStampingTest method containsPoint.
@Test
public void containsPoint() {
StaffStamping staff = new StaffStamping(null, 0, new Point2f(40, 80), 160, 5, 1);
Shape shape = staff.getBoundingShape();
// don't hit it
assertFalse(shape.contains(new Point2f(39, 81)));
assertFalse(shape.contains(new Point2f(42, 79)));
assertFalse(shape.contains(new Point2f(201, 81)));
assertFalse(shape.contains(new Point2f(100, 85)));
// hit it
assertTrue(shape.contains(new Point2f(40, 81)));
assertTrue(shape.contains(new Point2f(41, 80)));
assertTrue(shape.contains(new Point2f(200, 81)));
assertTrue(shape.contains(new Point2f(100, 84)));
}