Example #1
0
int
InitScreen()
{
	char	*sb_dev, *driver;
	
	printnbits();

	sb_dev = getenv("SB_OUTDEV");   
	if(!sb_dev) sb_dev = getenv("OUTDEV");   
	if(!sb_dev) sb_dev = "/dev/crt1";

	driver = getenv("SB_OUTDRIVER");
	if(!driver) driver = getenv("OUTDRIVER");
	if (!driver ) driver = "hp98731";
	
	fildes = gopen(sb_dev,OUTDEV,driver,INIT|INT_XFORM);
	interior_style(fildes,INT_SOLID,FALSE);
	
	intvdc_extent(fildes,0,0,SIZE, SIZE);
	mapping_mode(fildes,FALSE);
	
	drawing_mode(fildes,6);	  /* xor mode */
	
	clear_control(fildes, CLEAR_VIEWPORT);
	fill_color(fildes, 1.0, 1.0, 1.0);
	
	return(fildes);
}
Example #2
0
void plot_pixrows(  //plot for all blobs
                  PIXROW_LIST *pixrow_list,
                  WINDOW win) {
  PIXROW_IT pixrow_it(pixrow_list); 
  INT16 colour = RED;

  for (pixrow_it.mark_cycle_pt ();
  !pixrow_it.cycled_list (); pixrow_it.forward ()) {
    if (colour > RED + 7)
      colour = RED;

    perimeter_color_index (win, (COLOUR) colour);
    interior_style(win, INT_HOLLOW, TRUE); 
    pixrow_it.data ()->plot (win);
    colour++;
  }
}