code: public static int crossShape (IShape s, float x, float y) {
          if (!s.bounds().contains(x, y)) {
              return 0;
          }
          return crossPath(s.pathIterator(null), x, y);
      }
docs: Returns how many times a ray from point (x,y) crosses a shape.