public static @NotNull Graphics2D getOriginalGraphics(@NotNull Graphics g) {
    return g instanceof MyGraphics? ((MyGraphics)g).getDelegate() : (Graphics2D)g;
  }
public static @NotNull Graphics2D getOriginalGraphics(@NotNull Graphics g)