version 1.17, 2005/05/18 03:27:00 |
version 1.20, 2006/11/09 03:41:47 |
|
|
* 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.16 2004/03/26 08:25:37 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/plot/if.c,v 1.19 2005/12/21 23:18:16 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 173 int memory_plot(NODE arg,LIST *bytes) |
|
Line 173 int memory_plot(NODE arg,LIST *bytes) |
|
zrange = (LIST)ARG3(arg); |
zrange = (LIST)ARG3(arg); |
wsize = (LIST)ARG4(arg); |
wsize = (LIST)ARG4(arg); |
|
|
|
bzero((char *)&tmp_can,sizeof(tmp_can)); |
can = &tmp_can; |
can = &tmp_can; |
n = BDY(xrange); can->vx = VR((P)BDY(n)); n = NEXT(n); |
n = BDY(xrange); can->vx = VR((P)BDY(n)); n = NEXT(n); |
can->qxmin = (Q)BDY(n); n = NEXT(n); can->qxmax = (Q)BDY(n); |
can->qxmin = (Q)BDY(n); n = NEXT(n); can->qxmax = (Q)BDY(n); |
Line 201 int memory_plot(NODE arg,LIST *bytes) |
|
Line 202 int memory_plot(NODE arg,LIST *bytes) |
|
} |
} |
can->wname = ""; |
can->wname = ""; |
can->formula = formula; |
can->formula = formula; |
if ( can->mode == MODE_PLOT ) |
if ( can->mode == MODE_PLOT ) { |
plotcalc(can); |
plotcalc(can); |
else { |
memory_print(can,&barray); |
|
STOQ(can->width,qw); STOQ(can->height,qh); |
|
n = mknode(3,qw,qh,barray); |
|
MKLIST(*bytes,n); |
|
} else { |
width = can->width; height = can->height; |
width = can->width; height = can->height; |
tabe = (double **)ALLOCA(width*sizeof(double *)); |
tabe = (double **)ALLOCA(width*sizeof(double *)); |
for ( i = 0; i < width; i++ ) |
for ( i = 0; i < width; i++ ) |
Line 218 int memory_plot(NODE arg,LIST *bytes) |
|
Line 223 int memory_plot(NODE arg,LIST *bytes) |
|
|
|
int plotover(NODE arg) |
int plotover(NODE arg) |
{ |
{ |
int index; |
int index, org_color; |
P formula; |
P formula; |
struct canvas *can; |
struct canvas *can; |
struct canvas fakecan; |
struct canvas fakecan; |
Line 227 int plotover(NODE arg) |
|
Line 232 int plotover(NODE arg) |
|
index = QTOS((Q)ARG0(arg)); |
index = QTOS((Q)ARG0(arg)); |
formula = (P)ARG1(arg); |
formula = (P)ARG1(arg); |
can = canvas[index]; |
can = canvas[index]; |
|
org_color = can->color; |
if ( !can->window ) |
if ( !can->window ) |
return -1; |
return -1; |
get_vars_recursive((Obj)formula,&vl); |
get_vars_recursive((Obj)formula,&vl); |
Line 238 int plotover(NODE arg) |
|
Line 244 int plotover(NODE arg) |
|
can->color = QTOS((Q)ARG2(arg)); |
can->color = QTOS((Q)ARG2(arg)); |
else |
else |
can->color = 0; |
can->color = 0; |
|
#if !defined(VISUAL) |
set_drawcolor(can->color); |
set_drawcolor(can->color); |
|
#endif |
current_can = can; |
current_can = can; |
fakecan = *can; fakecan.formula = formula; |
fakecan = *can; fakecan.formula = formula; |
if ( can->mode == MODE_PLOT ) { |
if ( can->mode == MODE_PLOT ) { |
Line 247 int plotover(NODE arg) |
|
Line 255 int plotover(NODE arg) |
|
} else |
} else |
ifplotmain(&fakecan); |
ifplotmain(&fakecan); |
copy_to_canvas(&fakecan); |
copy_to_canvas(&fakecan); |
|
can->color = org_color; |
return index; |
return index; |
} |
} |
|
|