code: public static int intersectShape (IShape s, float x, float y, float w, float h) {
          if (!s.bounds().intersects(x, y, w, h)) {
              return 0;
          }
          return intersectPath(s.pathIterator(null), x, y, w, h);
      }
docs: Returns how many times rectangle stripe cross shape or the are intersect