private static boolean segmentOutsideRectangle(Rectangle aRectangle, Line2D aSegment) {
    return (!isWithin(aRectangle, aSegment.getP1())) && (!isWithin(aRectangle, aSegment.getP2()));
  }
private static boolean segmentOutsideRectangle(Rectangle aRectangle, Line2D aSegment)