Exemplo n.º 1
0
void
*user_objs(void)	/* return ptr. to object list which then will get */
/* converted to an obj. prc. object list. 	  */
{

    BITMOBJ	*line1;
    BRAOBJ	*tree;
    short	i, y1, y2;
    short	c;


    line1 = c_line(42, SCRNTOP + 28, 0);	/* build first line */
    tree = bt((BRAOBJ *) NULL, SCRNTOP + 28, 16, line1);

    /*
     * build the other 24 lines
     */
    for (i = 0, c = 40, y1 = 16, y2 = 192; i < 24; i++, y1 += 16, y2 +=16) {
        line1 = c_line(42, SCRNTOP + 28 + y1, c);
        tree = bt((BRAOBJ *) tree, SCRNTOP + 28 + y1, 16, line1);

        c += 40;
        c = (c > 128) ? 0 : c;
    }

    return (void *) tree;
}
Exemplo n.º 2
0
	void
*user_objs(void)
{

	BITMOBJ	*line1, *line2;
	BRAOBJ	*tree;
	short	i, y1, y2;
	short	c;

#if 0
	tchar1 = (char *) PHalloc(128L, 16L);
	bldchr(65, tchar1, 0xffff);
	chr_obj.data = (unsigned long) tchar1;

	return &bra1_obj;
#endif
#if 0
  	scrn_obj.data = (unsigned long) v_bas_ad;
	bird1_obj.data = (unsigned long) bird1;
	lotus_obj.data = (unsigned long) LOTUS;

	lotus_obj.link = (unsigned long) c_bras(SCRNTOP + 28);
#endif

/*
	return (void *) c_bras(SCRNTOP + 28);
*/
	line1 = c_line(42, SCRNTOP + 28, 0);
	tree = bt((BRAOBJ *) NULL, SCRNTOP + 28, 16, line1);

	for (i = 0, c = 40, y1 = 16, y2 = 192; i < 25; i++, y1 += 16, y2 +=16) {
		line1 = c_line(42, SCRNTOP + 28 + y1, c);
		tree = bt((BRAOBJ *) tree, SCRNTOP + 28 + y1, 16, line1);
/*
		line2 = c_line(42, SCRNTOP+ 28 + y2, c);
		tree = bt((BRAOBJ *) tree, SCRNTOP + 28 + y2, 16, line2);
*/
		c += 40;
		c = (c > 128) ? 0 : c;
	}
	
	return (void *) tree;


#if 0
	line1 = c_line(42, SCRNTOP + 28, 1);
	line2 = c_line(42, SCRNTOP + 28 + 12, 41);

	bra_obj.next = (unsigned long) line1;
	bra_obj.link = (unsigned long) line2;
#endif

#if 0	
	return &scrn_obj;
#endif
}
Exemplo n.º 3
0
/*
 *  Draw a background.
 */
void c_bkgft1(float ypos, char *label, float yb, float yt) {

  c_set(0.,1.,0.,1.,0.,1.,0.,1.,1);

/*
 *   Plot the curve label using font 21 (Helvetica).
 */
  c_pcseti("fn",21);
  c_plchhq(0.17,ypos-0.2,label,0.03,0.,-1.0);

/*
 *  Draw a horizontal line at Y=0. using color index 2.
 */
  c_set(0.13,0.93,ypos-0.28,ypos,0.0,1., yb, yt, 1);
  gset_line_colr_ind(2);
  c_line(0.,0.,1.,0.); 
  c_sflush();
  gset_line_colr_ind(1);

/*
 *  Set Gridal parameters.
 *
 *
 *   Set lty to indicate that the Plotchar routine PLCHHQ should be used.
 */
  c_gaseti("lty",1);
  c_pcseti("fn",21);

/*
 *   Size and format for X axis labels.
 */
  c_gasetr("xls",0.02);
  c_gasetc("xlf","(f3.1)");

/*
 *   Size and format for X axis labels.
 */
  c_gasetr("yls",0.02);
  c_gasetc("ylf","(f5.1)");

/*
 *  Length of major tick marks for the X and Y axes.
 */
  c_gasetr("xmj",0.02);
  c_gasetr("ymj",0.02);
}
Exemplo n.º 4
0
void c_bkgft4(float xleft, float xright, float ybot, float ytop,
              float ypos_bot, float ypos_top, char *label, float lab_size,
              float lab_posx, float lab_posy, int zero_line) {
  c_set(0.,1.,0.,1.,0.,1.,0.,1.,1);
  c_pcseti("fn",21);
  c_plchhq(lab_posx,lab_posy,label,lab_size,0.,0.0);
  c_set(0.17,0.87,ypos_bot,ypos_top,xleft,xright, ybot, ytop, 1);
  if (zero_line != 0) {
     gset_line_colr_ind(2);
     c_line(xleft, 0., xright, 0.);
     c_sflush();
     gset_line_colr_ind(1);
  }
  c_gaseti("lty",1);
  c_pcseti("fn",21);
  c_gasetr("xls",0.02);
  c_gasetc("xlf","(f4.1)");
  c_gasetr("yls",0.02);
  c_gasetc("ylf","(f5.1)");
  c_gasetr("xmj",0.02);
  c_gasetr("ymj",0.02);
}