home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 11 / 11.iso / m / m242 / 1.ddi / HFILES.ZIP / BAR3D.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-16  |  3.6 KB  |  109 lines

  1. /* structure for 3D coordinate                                                 */
  2. typedef struct coord_3d {        
  3.     double x;
  4.     double y;
  5.     double z;
  6.     } coord3d;
  7.  
  8. /* structure for screen coordinate in doubleing point                     */
  9. typedef struct coord_2d {        
  10.     double x;
  11.     double y;
  12.     } coord2d;
  13.  
  14. /* structure for screen coordinate in doubleing point or int         */
  15. typedef struct coord_i2d {    
  16.     EG_TYPE x;
  17.     EG_TYPE y;
  18.     } coordi2d;
  19.  
  20. /* structure for line coordinate                                             */
  21. typedef struct line_coord {
  22.     coord2d p1;
  23.     coord2d p2;
  24.     } linecoord;
  25.  
  26. /* data for each single bar                                                     */
  27. typedef struct bar_item {        
  28.     double    *val;        /* value of each bar (also for stacked bar)         */
  29.     int topc;        /* color of top side                                     */
  30.     int leftc;        /* color of left side                                     */
  31.     int rightc;        /* color of right side                                     */
  32.     int boundc;        /* color of boundary                                     */
  33. } baritem;
  34.  
  35. /* relation between eye and object                                            */
  36. typedef struct coordsphericaleq {
  37.     long rho;        /* distance between eye and object                     */
  38.     long sd;            /* distance between eye and screen                     */
  39.     long theta;        /* in degree, the degree from object and x-axis */
  40.     long phi;        /* in degree, the degree from object and z-axis */
  41.     } sphr_crd;
  42.  
  43. /* hidden line removal                                                             */
  44. typedef struct polygon_6 {
  45.     coord2d     poly[6];
  46.     double    top;        /* top point of the polygon                             */
  47.     double    bottom;    /* bottom point of the polygon                         */
  48.     double    left;        /* left point of the polygon                             */
  49.     double    right;    /* the most right point of the polygon             */
  50.     } polygon6;
  51.  
  52. /* labels along 3D bar frame                                                       */
  53. typedef struct td_lab {
  54.     struct vfont *fk;    /* vector font to use                                 */
  55.     char **l;            /* labels to print                                     */
  56.     int c;                /* color for the labels                                 */
  57.     int nlab;            /* how many labels along this frame                */
  58.     } tdlabels;
  59.  
  60. /* stacked bars colors                                                             */
  61. typedef struct elemsta {
  62.     int leftc;             /* left side's color of stack bar                 */
  63.     int rightc;         /* right side's color of stack bar                 */
  64.     } stack_cr; 
  65.  
  66. /* for legend                                                                         */
  67. typedef struct eleleng {
  68.     int style;            /* style for that lengend small box filling     */
  69.     char *msg;            /* string od the legend                             */
  70.     } tdlegend;
  71.  
  72. /* 3D pie each slice data                                                         */
  73. typedef struct elelpie {
  74.     int color;            /* color for the side shading                     */
  75.     int style;            /* style for the slice                                 */
  76.     coordi2d org;        /* original point of this slice                     */
  77.     coord2d start;        /* start angle coordinate at the slice         */
  78.     coord2d end;        /* end angle coordinate at the slice             */
  79.     int sa;                /* starting angle                                     */
  80.     int ea;                /* ending angle                                         */
  81.     int ma;                /* middle angle */
  82.     int mq;                /* middle angle in which quadrant                 
  83.                                  flag for the position of the label            */
  84.                             /* 1st- 1 to 90                                         */
  85.                             /* 2nd- 91 to 180                                     */
  86.                             /* 3rd- 181 to 270                                     */
  87.                             /* 4th- 271 to 360                                     */
  88.                             /* 5- fit in the slice                                 */
  89.                             /* 6- print this slice label in pieslice(), 
  90.                                 not in td_htpie()                                 */
  91.     coordi2d map;        /* intersection point of middle angle line
  92.                                 and arc                                                 */
  93.     int eflag;            /* exploded flag; 1- exploded                     */
  94.     char *l;                /* string of label for this slice                 */
  95.     int w;                /* width of the whole label string                */
  96.     coordi2d ll;        /* coordinate of left lower corner for the 
  97.                                 label, same as inside the slice                 */
  98.     coordi2d ru;        /* coordinate of right upper corner for the 
  99.                                 label                                                 */
  100.     } td_htpie;
  101.  
  102. /* for intersection point between line and circle                         */
  103. typedef struct tdlineeq_struct {
  104.     double x0;
  105.     double y0;
  106.     double dx;
  107.     double dy;
  108.     } tdlineeq;
  109.