@Test public void testIntersectsRectangleReturnsTrueForRectangleThatEntersBoundingBox() { PathDetail pathDetail = new PathDetail(Coord2D.ORIGIN, Colour.BLACK); pathDetail.lineTo(new Coord2D(1.5, 1.5)); Assert.assertTrue( pathDetail.intersectsRectangle(new Coord2D(1, 1), new Coord2D(2, 2))); }
public void lineTo(Coord2D point) { path.add(point); updateBoundingBox(point); }
PathDetail extends SketchDetail { public void lineTo(Coord2D point) { path.add(point); updateBoundingBox(point); } }
PathDetail extends SketchDetail { public void lineTo(Coord2D point) { path.add(point); updateBoundingBox(point); } PathDetail(Coord2D start, Colour colour);  PathDetail(List<Coord2D> paths, Colour colour); }
PathDetail extends SketchDetail { public void lineTo(Coord2D point) { path.add(point); updateBoundingBox(point); } PathDetail(Coord2D start, Colour colour);  PathDetail(List<Coord2D> paths, Colour colour); void lineTo(Coord2D point); List<Coord2D> getPath(); @Override double getDistanceFrom(Coord2D point); @Override PathDetail translate(Coord2D point); List<SketchDetail> getPathFragmentsOutsideRadius(Coord2D targetPoint, double radius); }
PathDetail extends SketchDetail { public void lineTo(Coord2D point) { path.add(point); updateBoundingBox(point); } PathDetail(Coord2D start, Colour colour);  PathDetail(List<Coord2D> paths, Colour colour); void lineTo(Coord2D point); List<Coord2D> getPath(); @Override double getDistanceFrom(Coord2D point); @Override PathDetail translate(Coord2D point); List<SketchDetail> getPathFragmentsOutsideRadius(Coord2D targetPoint, double radius);  }