@Test public void clippingWorksMultipleTimes() { Clipper clipper = new Clipper(clippingRect); assertThat(clipper.clip(Arrays.asList(pointA, pointB, pointJ), true)) .containsExactly(pointK, pointA, pointC); clipper.setClippingBounds(clippingRect); assertThat(clipper.clip(Arrays.asList(pointA, pointB, pointN), true)) .containsExactly(pointQ, pointA, pointC, pointO, pointP); }
@Test public void testIntersectVerticalFirstLine() { XY intersection = testedClipper.intersection(pointF, pointB, pointA, pointE); checkPoint(intersection, pointG); }
@Test public void testIntersect() { XY intersection = testedClipper.intersection(pointB, pointH, pointA, pointE); checkPoint(intersection, pointI); }