[BACK]Return to graph3d.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot

Diff for /OpenXM_contrib/gnuplot/Attic/graph3d.c between version 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2000/01/22 14:15:58 version 1.1.1.3, 2003/09/15 07:09:25
Line 95  static void check_corner_height __PROTO((struct coordi
Line 95  static void check_corner_height __PROTO((struct coordi
                                          double height[2][2], double depth[2][2]));                                           double height[2][2], double depth[2][2]));
 static void draw_bottom_grid __PROTO((struct surface_points * plot,  static void draw_bottom_grid __PROTO((struct surface_points * plot,
                                       int plot_count));                                        int plot_count));
 static void xtick_callback __PROTO((int axis, double place, char *text,  /* HBB 20010118: these should be static, but can't --- HP-UX assembler bug */
                                     struct lp_style_type grid));  void xtick_callback __PROTO((int axis, double place, char *text,
 static void ytick_callback __PROTO((int axis, double place, char *text,                               struct lp_style_type grid));
                                     struct lp_style_type grid));  void ytick_callback __PROTO((int axis, double place, char *text,
 static void ztick_callback __PROTO((int axis, double place, char *text,                               struct lp_style_type grid));
                                     struct lp_style_type grid));  void ztick_callback __PROTO((int axis, double place, char *text,
                                struct lp_style_type grid));
 static void setlinestyle __PROTO((struct lp_style_type style));  static void setlinestyle __PROTO((struct lp_style_type style));
   
 static void boundary3d __PROTO((int scaling, struct surface_points * plots,  static void boundary3d __PROTO((int scaling, struct surface_points * plots,
Line 231  static double back_x, back_y;
Line 232  static double back_x, back_y;
 static double tic_unitx, tic_unity;  static double tic_unitx, tic_unity;
   
 /* (DFK) Watch for cancellation error near zero on axes labels */  /* (DFK) Watch for cancellation error near zero on axes labels */
 #define SIGNIF (0.01)           /* less than one hundredth of a tic mark */  
 #define CheckZero(x,tic) (fabs(x) < ((tic) * SIGNIF) ? 0.0 : (x))  #define CheckZero(x,tic) (fabs(x) < ((tic) * SIGNIF) ? 0.0 : (x))
 #define NearlyEqual(x,y,tic) (fabs((x)-(y)) < ((tic) * SIGNIF))  #define NearlyEqual(x,y,tic) (fabs((x)-(y)) < ((tic) * SIGNIF))
   
Line 417  int count;
Line 417  int count;
   
     /* an absolute 1, with no terminal-dependent scaling ? */      /* an absolute 1, with no terminal-dependent scaling ? */
     ybot = (t->v_char) * 2.5 + 1;      ybot = (t->v_char) * 2.5 + 1;
     if (key_rows && key_vpos == TUNDER)      if (key_rows && key == -1 && key_vpos == TUNDER) /* HBB 20000328 */
         ybot += key_rows * key_entry_height + ktitle_lines * t->v_char;          ybot += key_rows * key_entry_height + ktitle_lines * t->v_char;
   
     if (strlen(title.text)) {      if (strlen(title.text)) {
Line 509  int pcount;   /* count of plots in linked list */
Line 509  int pcount;   /* count of plots in linked list */
     mat_scale(surface_scale / 2.0, surface_scale / 2.0, surface_scale / 2.0, mat);      mat_scale(surface_scale / 2.0, surface_scale / 2.0, surface_scale / 2.0, mat);
     mat_mult(trans_mat, trans_mat, mat);      mat_mult(trans_mat, trans_mat, mat);
   
 #if 0  
     /* HBB 19990609: this is *not* the way to implement 'set view' <z_scale> */  
     /* modify min_z/max_z so it will zscale properly. */  
     ztemp = (z_max3d - z_min3d) / (2.0 * surface_zscale);  
     temp = (z_max3d + z_min3d) / 2.0;  
     z_min3d = temp - ztemp;  
     z_max3d = temp + ztemp;  
 #endif /* 0 */  
   
     /* The extrema need to be set even when a surface is not being      /* The extrema need to be set even when a surface is not being
      * drawn.   Without this, gnuplot used to assume that the X and       * drawn.   Without this, gnuplot used to assume that the X and
      * Y axis started at zero.   -RKC       * Y axis started at zero.   -RKC
Line 835  int pcount;   /* count of plots in linked list */
Line 826  int pcount;   /* count of plots in linked list */
             case FINANCEBARS:              case FINANCEBARS:
             case VECTOR:              case VECTOR:
             case POINTSTYLE:              case POINTSTYLE:
                 if (lkey && !clip_point(xl + key_point_offset, yl)) {                  if (lkey) {
                     key_sample_point(xl, yl, this_plot->lp_properties.p_type);                      key_sample_point(xl, yl, this_plot->lp_properties.p_type);
                 }                  }
                 if (!(hidden3d && draw_surface))                  if (!(hidden3d && draw_surface))
Line 851  int pcount;   /* count of plots in linked list */
Line 842  int pcount;   /* count of plots in linked list */
                     plot3d_lines(this_plot);                      plot3d_lines(this_plot);
   
                 /* put points */                  /* put points */
                 if (lkey && !clip_point(xl + key_point_offset, yl))                  if (lkey)
                     key_sample_point(xl, yl, this_plot->lp_properties.p_type);                      key_sample_point(xl, yl, this_plot->lp_properties.p_type);
   
                 if (!(hidden3d && draw_surface))                  if (!(hidden3d && draw_surface))
Line 1705  else if (height[i][j] != depth[i][j]) \
Line 1696  else if (height[i][j] != depth[i][j]) \
 }  }
   
   
 static void xtick_callback(axis, place, text, grid)  /* HBB 20010118: all the *_callback() functions made non-static. This
    * is necessary to work around a bug in HP's assembler shipped with
    * HP-UX 10 and higher, if GCC tries to use it */
   void xtick_callback(axis, place, text, grid)
 int axis;  int axis;
 double place;  double place;
 char *text;  char *text;
Line 1761  struct lp_style_type grid; /* linetype or -2 for none 
Line 1755  struct lp_style_type grid; /* linetype or -2 for none 
     }      }
 }  }
   
 static void ytick_callback(axis, place, text, grid)  void ytick_callback(axis, place, text, grid)
 int axis;  int axis;
 double place;  double place;
 char *text;  char *text;
Line 1815  struct lp_style_type grid;
Line 1809  struct lp_style_type grid;
     }      }
 }  }
   
 static void ztick_callback(axis, place, text, grid)  void ztick_callback(axis, place, text, grid)
 int axis;  int axis;
 double place;  double place;
 char *text;  char *text;
Line 1911  char *what;
Line 1905  char *what;
         graph_error("Cannot mix screen co-ordinates with other types");          graph_error("Cannot mix screen co-ordinates with other types");
     } {      } {
         register struct termentry *t = term;          register struct termentry *t = term;
         *x = pos->x * (t->xmax) + 0.5;          /* HBB 20000914: off-by-one bug. Maximum allowed output is
         *y = pos->y * (t->ymax) + 0.5;           * t->?max - 1, not t->?max itself! */
           *x = pos->x * (t->xmax -1) + 0.5;
           *y = pos->y * (t->ymax -1) + 0.5;
     }      }
   
     return;      return;
Line 1970  static void key_sample_point(xl, yl, pointtype)
Line 1966  static void key_sample_point(xl, yl, pointtype)
 int xl, yl;  int xl, yl;
 int pointtype;  int pointtype;
 {  {
     if (!clip_point(xl + key_point_offset, yl)) {      /* HBB 20000412: fixed incorrect clipping: the point sample was
         (*term->point) (xl + key_point_offset, yl, pointtype);       * clipped against the graph box, even if in 'below' or 'outside'
     } else {       * position. But the result of that clipping was utterly ignored,
        * because the 'else' part did exactly the same thing as the
        * 'then' one. Some callers of this routine thus did their own
        * clipping, which I removed, along with this change.
        *
        * Now, all 'automatically' placed cases will never be clipped,
        * only user-specified ones. */
       if ((key == -1)             /* ==-1 means auto-placed key */
           || !clip_point(xl + key_point_offset, yl)) {
         (*term->point) (xl + key_point_offset, yl, pointtype);          (*term->point) (xl + key_point_offset, yl, pointtype);
     }      }
 }  }

Legend:
Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>