version 1.6, 2001/08/22 09:19:21 |
version 1.7, 2001/10/09 01:36:27 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/plot/if.c,v 1.5 2000/11/09 01:51:12 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/plot/if.c,v 1.6 2001/08/22 09:19:21 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 139 int plot(NODE arg) |
|
Line 139 int plot(NODE arg) |
|
|
|
int memory_plot(NODE arg,LIST *bytes) |
int memory_plot(NODE arg,LIST *bytes) |
{ |
{ |
int id; |
|
NODE n; |
NODE n; |
struct canvas tmp_can; |
struct canvas tmp_can; |
struct canvas *can; |
struct canvas *can; |
Line 213 int plotover(NODE arg) |
|
Line 212 int plotover(NODE arg) |
|
can = canvas[index]; |
can = canvas[index]; |
if ( !can->window ) |
if ( !can->window ) |
return -1; |
return -1; |
get_vars_recursive(formula,&vl); |
get_vars_recursive((Obj)formula,&vl); |
for ( vl0 = vl; vl0; vl0 = NEXT(vl0) ) |
for ( vl0 = vl; vl0; vl0 = NEXT(vl0) ) |
if ( vl0->v->attr == V_IND ) |
if ( vl0->v->attr == (pointer)V_IND ) |
if ( vl->v != can->vx && vl->v != can->vy ) |
if ( vl->v != can->vx && vl->v != can->vy ) |
return -1; |
return -1; |
current_can = can; |
current_can = can; |
Line 329 int arrayplot(NODE arg) |
|
Line 328 int arrayplot(NODE arg) |
|
LIST xrange,wsize; |
LIST xrange,wsize; |
char *wname; |
char *wname; |
NODE n; |
NODE n; |
Q ret; |
|
double ymax,ymin,dy,xstep; |
double ymax,ymin,dy,xstep; |
Real *tab; |
Real *tab; |
struct canvas *can; |
struct canvas *can; |
Line 381 int arrayplot(NODE arg) |
|
Line 379 int arrayplot(NODE arg) |
|
else if ( t < -MAXSHORT ) |
else if ( t < -MAXSHORT ) |
pa[ix].y = -MAXSHORT; |
pa[ix].y = -MAXSHORT; |
else |
else |
pa[ix].y = t; |
pa[ix].y = (long)t; |
} |
} |
plot_print(display,can); |
plot_print(display,can); |
copy_to_canvas(can); |
copy_to_canvas(can); |
return id; |
return id; |
} |
} |
|
|
ifplot_resize(can,spos,epos) |
void ifplot_resize(struct canvas *can,POINT spos,POINT epos) |
struct canvas *can; |
|
POINT spos,epos; |
|
{ |
{ |
struct canvas *ncan; |
struct canvas *ncan; |
struct canvas fakecan; |
struct canvas fakecan; |
Line 399 POINT spos,epos; |
|
Line 395 POINT spos,epos; |
|
Q s,t; |
Q s,t; |
int new; |
int new; |
int w,h,m; |
int w,h,m; |
Q ret; |
|
|
|
if ( XC(spos) < XC(epos) && YC(spos) < YC(epos) ) { |
if ( XC(spos) < XC(epos) && YC(spos) < YC(epos) ) { |
if ( can->precise && !can->wide ) { |
if ( can->precise && !can->wide ) { |
Line 465 POINT spos,epos; |
|
Line 460 POINT spos,epos; |
|
} |
} |
} |
} |
|
|
plot_resize(can,spos,epos) |
void plot_resize(struct canvas *can,POINT spos,POINT epos) |
struct canvas *can; |
|
POINT spos,epos; |
|
{ |
{ |
struct canvas *ncan; |
struct canvas *ncan; |
Q dx,dx2,xmin,xmax,xmid; |
Q dx,dx2,xmin,xmax,xmid; |
double dy,dy2,ymin,ymax,ymid; |
double dy,ymin,ymax,ymid; |
Q sx,ex,cw,ten,two; |
Q sx,ex,cw,ten,two; |
double sy,ey; |
|
Q s,t; |
Q s,t; |
int new; |
int new; |
int w,h,m; |
int w,h,m; |
Line 525 POINT spos,epos; |
|
Line 517 POINT spos,epos; |
|
} |
} |
} |
} |
|
|
ifplotmain(can) |
void ifplotmain(struct canvas *can) |
struct canvas *can; |
|
{ |
{ |
int width,height; |
int width,height; |
double **tabe,*tabeb; |
double **tabe; |
int i; |
int i; |
|
|
width = can->width; height = can->height; |
width = can->width; height = can->height; |
Line 543 struct canvas *can; |
|
Line 534 struct canvas *can; |
|
define_cursor(can->window,normalcur); |
define_cursor(can->window,normalcur); |
} |
} |
|
|
qifplotmain(can) |
void qifplotmain(struct canvas *can) |
struct canvas *can; |
|
{ |
{ |
int width,height; |
int width,height; |
char **tabe,*tabeb; |
char **tabe,*tabeb; |