Lines Matching refs:Rectangle
18 import org.eclipse.swt.graphics.Rectangle;
31 checkSubtract(new Rectangle(0, 0, 100, 80), Collections.<Rectangle> emptyList());
33 checkSubtract(new Rectangle(0, 0, 100, 80), Arrays.asList(new Rectangle(50, 50, 20, 20)));
35 checkSubtract(new Rectangle(0, 0, 100, 80), Arrays.asList(new Rectangle(50, 50, 20, 20),
36 new Rectangle(90, 90, 10, 10)));
38 checkSubtract(new Rectangle(0, 0, 100, 80), Arrays.asList(new Rectangle(50, 50, 20, 20),
39 new Rectangle(90, 90, 10, 10), new Rectangle(0, 0, 10, 10)));
43 private void checkSubtract(Rectangle rectangle, List<Rectangle> holes) {
44 Collection<Rectangle> result = IncludeOverlay.subtractRectangles(rectangle, holes);
50 int x = random.nextInt(rectangle.width);
51 int y = random.nextInt(rectangle.height);
54 for (Rectangle hole : holes) {
61 for (Rectangle r : result) {
69 fail("Wrong result at (" + x + "," + y + ") for rectangle=" + rectangle