示例#1
0
do_movie_com(int c)

{



/*  XDestroyWindow(display,temp); 
  draw_help();
  XFlush(display); */ 
 switch(c){

	     case 0: if(film_clip()==0)
	 respond_box("Okay","Out of film!");
			break;
	      case 1: reset_film();
	                break;
	      case 2: play_back();
		        break;
	      case 3: auto_play();
			 break;
              case 4: save_kine();
		        break;
              case 5: make_anigif();
		        break;
	    }
      
  }
示例#2
0
文件: pp_shoot.c 项目: tommie/xppaut
void do_sh_range(double *ystart, double *yend) {
  double parlo, parhi, dpar, temp;
  int npar, i, j, ierr;
  int side, cycle, icol, color;
  char bob[50];

  if (set_up_sh_range() == 0)
    return;
  swap_color(&color, 0);
  parhi = shoot_range.phigh;
  parlo = shoot_range.plow;
  npar = shoot_range.steps;
  dpar = (parhi - parlo) / (double)npar;
  side = shoot_range.side;
  cycle = shoot_range.cycle;
  storind = 0;
  icol = 0;
  if (shoot_range.movie == 1)
    reset_film();
  for (i = 0; i <= npar; i++) {
    temp = parlo + dpar * (double)i;
    set_val(shoot_range.item, temp);
    sprintf(bob, "%s=%.16g", shoot_range.item, temp);
    x11_status_bar_set_text(main_status_bar, bob);
    if (shoot_range.movie == 1)
      clr_scrn();

    bvshoot(ystart, yend, BVP_TOL, BVP_EPS, BVP_MAXIT, &ierr, NODE, 0, 0, 0, 0,
            0.0);
    if (ierr == ABORT)
      continue;
    if (ierr < 0) {
      bad_shoot(ierr);

      set_browser_data(storage, storind, NEQ + 1);
      swap_color(&color, 1);
      return;
    }
    storage[0][storind] = temp;
    if (side == 0)
      for (j = 0; j < NODE; j++)
        storage[j + 1][storind] = ystart[j];
    else
      for (j = 0; j < NODE; j++)
        storage[j + 1][storind] = yend[j];
    storind++;
    set_cycle(cycle, &icol);
    get_ic(0, ystart);
    last_shot(0);
    if (shoot_range.movie == 1)
      film_clip();
    ping();
  }
  set_browser_data(storage, storind, NEQ + 1);
  auto_freeze_it();
  swap_color(&color, 1);
}