Update of /cvsroot/easycalc/easycalc
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv3410
Modified Files:
grtaps.c
Log Message:
Improve parametric tracking when tracking parametric graphs of lists (x=list
index, y=list value). Now works correctly when tracking with the stylus and
when tracking with hardware buttons.
Index: grtaps.c
===================================================================
RCS file: /cvsroot/easycalc/easycalc/grtaps.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** grtaps.c 13 Sep 2006 13:17:57 -0000 1.25
--- grtaps.c 29 Sep 2006 01:56:41 -0000 1.26
***************
*** 537,561 ****
if (action != track_redraw)
grtaps_cross(crossX,crossY,&bounds);
! if (graph_get_vals(trackSelected,lastParam,&realx,&realy)) {
! crossX = graph_xgr2scr(realx);
! crossY = graph_ygr2scr(realy);
! if (crossX < bounds.topLeft.x
! || crossX > bounds.topLeft.x + bounds.extent.x)
! crossX = -1;
! if (crossY < bounds.topLeft.y
! || crossY > bounds.topLeft.y + bounds.extent.y)
! crossY = -1;
! grtaps_cross(crossX,crossY,&bounds);
! grtaps_print_coords(realx,realy,&bounds);
! if (graphPrefs.functype == graph_param)
! grtaps_print_param(lastParam,&bounds);
! else if (graphPrefs.functype == graph_polar) {
! func_get_value(graphCurves[trackSelected].stack1,
! lastParam,&r,NULL);
! grtaps_print_pol(r,lastParam,&bounds);
! }
}
- else
- crossX = crossY = -1;
}
}
--- 537,559 ----
if (action != track_redraw)
grtaps_cross(crossX,crossY,&bounds);
!
! graph_get_vals(trackSelected,lastParam,&realx,&realy);
! crossX = finite(realx) ? graph_xgr2scr(realx) : -1;
! crossY = finite(realy) ? graph_ygr2scr(realy) : -1;
! if (crossX < bounds.topLeft.x
! || crossX > bounds.topLeft.x + bounds.extent.x)
! crossX = -1;
! if (crossY < bounds.topLeft.y
! || crossY > bounds.topLeft.y + bounds.extent.y)
! crossY = -1;
! grtaps_cross(crossX,crossY,&bounds);
! grtaps_print_coords(realx,realy,&bounds);
! if (graphPrefs.functype == graph_param)
! grtaps_print_param(lastParam,&bounds);
! else if (graphPrefs.functype == graph_polar) {
! func_get_value(graphCurves[trackSelected].stack1,
! lastParam,&r,NULL);
! grtaps_print_pol(r,lastParam,&bounds);
}
}
}
***************
*** 692,696 ****
}
if (oldx != x && RctPtInRectangle(x, y, bounds)) {
! param = graphPrefs.tmin + (double)(x - bounds->topLeft.x) * x2param;
if (finite(param)) {
func_get_value(stack1, param, &realx, NULL);
--- 690,696 ----
}
if (oldx != x && RctPtInRectangle(x, y, bounds)) {
! param = (double)(x - bounds->topLeft.x) * x2param;
! param = graphPrefs.tmin
! + round(param / graphPrefs.tstep) * graphPrefs.tstep;
if (finite(param)) {
func_get_value(stack1, param, &realx, NULL);
|