@SuppressWarnings("UnnecessaryLocalVariable")
  @NotNull
  private static BufferedImage createImage(@NotNull Graphics2D g, @NotNull Color color, boolean isHovered, int step, int height) {
    Object[] key = new Object[]{color.getRGB(), JBUIScale.sysScale(g), isHovered, step, height};
    if (Arrays.equals(ourCachedImageKey, key) && outCachedImage != null) return outCachedImage;

    int extraGap = getAAGap();
    int imageWidth = step * 4;
    int imageHeight = height * 2 + extraGap * 2;
    BufferedImage image = ImageUtil.createImage(g, imageWidth, imageHeight, BufferedImage.TYPE_INT_ARGB);

    Graphics2D gg = image.createGraphics();

    double upper = extraGap;
    double center = height + extraGap;
    double lower = height * 2 + extraGap;
    double dx = (double)step / 2;

    Path2D path = new Path2D.Double();
    path.moveTo(0, upper);
    path.quadTo(step * 1.0 - dx, upper,
                step * 1.0, center);
    path.quadTo(step * 2.0 - dx, lower,
                step * 2.0, lower);
    path.quadTo(step * 3.0 - dx, lower,
                step * 3.0, center);
    path.quadTo(step * 4.0 - dx, upper,
                step * 4.0, upper);

    GraphicsUtil.setupAAPainting(gg);
    gg.setStroke(getStroke(isHovered));
    gg.setColor(color);
    gg.draw(path);

    outCachedImage = image;
    ourCachedImageKey = key;

    return image;
  }
@SuppressWarnings("UnnecessaryLocalVariable")
  @NotNull
  private static BufferedImage createImage(@NotNull Graphics2D g, @NotNull Color color, boolean isHovered, int step, int height)