protected void handle_keyboard (int key, int state, int x, int y) {
    switch (key) {
    case 'p':                   // fall through
    case 'P': stippling = !stippling; break;
    case 's':                   // fall through
    case 'S': smoothing = !smoothing; break;
    case Misc.UP: draw_size++; break;

    case Misc.DOWN: 
      draw_size--;
      if (draw_size < 1) draw_size = 1;
      break;
      
    default: return;
    }

    mark_window_dirty ();
  }