private static Inlay<?> findInlay(List<? extends Inlay<?>> inlays, int x, int startX) {
    for (Inlay inlay : inlays) {
      int endX = startX + inlay.getWidthInPixels();
      if (x >= startX && x < endX) return inlay;
      startX = endX;
    }
    return null;
  }
private static Inlay<?> findInlay(List<? extends Inlay<?>> inlays, int x, int startX)