public void vertical_erase (DisplayHack hack) {
    Window window = hack.window;
    int dx = Math.max (1, window.width / SLICE * hack.eraser_delta);
    int dy = Math.max (1, window.height / DELAY * hack.eraser_delta);

    for (int y=0; y<window.height; y+=dy) {
      for (int x=0; x<window.width; x+=dx) {
        int from_y, to_y, clear_y;

        if ((x/dx) % 2 == 1) {
          from_y = y;
          to_y = y + dy;
          clear_y = y;

        } else {
          from_y = dy;
          to_y = 0;
          clear_y = window.height - y - dy;
        }
          
        window.copy_area (window, hack.eraser_gc, x, from_y,
          dx, window.height-y-dy, x, to_y);
        window.clear_area (x, clear_y, dx, dy, false);
      }

      if (sleep (hack)) return;
    }
  }