version 1.28, 2014/05/13 16:28:08 |
version 1.33, 2015/08/06 10:01:53 |
|
|
* 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.27 2014/05/12 16:54:41 saito Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/plot/if.c,v 1.32 2014/08/20 16:51:34 ohara Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
|
|
static struct oEGT ltime; |
static struct oEGT ltime; |
static double r0; |
static double r0; |
double get_rtime(); |
double get_rtime(); |
|
void MSGdraw(char *); |
|
char msg[128]; |
#if defined(ITV_TIME_CHECK) |
#if defined(ITV_TIME_CHECK) |
void tstart() |
void tstart() |
{ |
{ |
Line 118 int open_canvas(NODE arg){ |
|
Line 120 int open_canvas(NODE arg){ |
|
return id; |
return id; |
} |
} |
|
|
int plot(NODE arg,char *fn){ |
int plot(NODE arg,int fn){ |
int id; |
int id; |
NODE n; |
NODE n; |
struct canvas *can; |
struct canvas *can; |
Line 144 int plot(NODE arg,char *fn){ |
|
Line 146 int plot(NODE arg,char *fn){ |
|
can->qymin=(Q)BDY(n);n=NEXT(n);can->qymax=(Q)BDY(n); |
can->qymin=(Q)BDY(n);n=NEXT(n);can->qymax=(Q)BDY(n); |
can->ymin=ToReal(can->qymin);can->ymax=ToReal(can->qymax); |
can->ymin=ToReal(can->qymin);can->ymax=ToReal(can->qymax); |
} |
} |
can->mode=modeNO(fn); |
can->mode=fn; |
if(zrange){ |
if(zrange){ |
n=BDY(zrange); can->zmin=ToReal(BDY(n)); |
n=NEXT(BDY(zrange)); |
|
can->zmin=ToReal(BDY(n)); |
n=NEXT(n);can->zmax=ToReal(BDY(n)); |
n=NEXT(n);can->zmax=ToReal(BDY(n)); |
n=NEXT(n); |
n=NEXT(n); |
if(can->mode==modeNO(CONPLOT))can->nzstep=QTOS((Q)BDY(n)); |
if(can->mode==modeNO(CONPLOT))can->nzstep=n?QTOS((Q)BDY(n)):MAXGC; |
else { |
else { |
can->vx=VR((P)BDY(BDY(zrange))); |
can->vx=VR((P)BDY(BDY(zrange))); |
can->nzstep=QTOS((Q)BDY(n)); |
can->nzstep=n?QTOS((Q)BDY(n)):DEFAULTPOLARSTEP; |
} |
} |
} |
} |
if(!wsize){ |
if(!wsize){ |
Line 162 int plot(NODE arg,char *fn){ |
|
Line 165 int plot(NODE arg,char *fn){ |
|
can->width=QTOS((Q)BDY(BDY(wsize))); |
can->width=QTOS((Q)BDY(BDY(wsize))); |
can->height=QTOS((Q)BDY(NEXT(BDY(wsize)))); |
can->height=QTOS((Q)BDY(NEXT(BDY(wsize)))); |
} |
} |
if(wname) can->wname = BDY(wname); |
if(wname) can->wname=BDY(wname); |
else can->wname=""; |
else can->wname=""; |
can->formula=formula; |
can->formula=formula; |
if(can->mode==modeNO(PLOT)){ |
if(can->mode==modeNO(PLOT)){ |
Line 170 int plot(NODE arg,char *fn){ |
|
Line 173 int plot(NODE arg,char *fn){ |
|
plotcalc(can); |
plotcalc(can); |
create_canvas(can); |
create_canvas(can); |
plot_print(display,can); |
plot_print(display,can); |
|
} else if(can->mode==modeNO(POLARPLOT)){ |
|
polarcalc(can); |
|
create_canvas(can); |
|
plot_print(display,can); |
} else { |
} else { |
//ifplot,conplot |
|
create_canvas(can); |
create_canvas(can); |
ifplotmainOld(can); |
ifplotmain(can); |
} |
} |
copy_to_canvas(can); |
copy_to_canvas(can); |
return id; |
return id; |
} |
} |
|
|
void ifplotmainOld(struct canvas *can){ |
void ifplotmain(struct canvas *can){ |
int i,width,height; |
int i,width,height; |
double ** tabe; |
double ** tabe; |
|
|
Line 189 void ifplotmainOld(struct canvas *can){ |
|
Line 195 void ifplotmainOld(struct canvas *can){ |
|
define_cursor(can->window,runningcur); |
define_cursor(can->window,runningcur); |
set_busy(can); set_selection(); |
set_busy(can); set_selection(); |
calc(tabe,can,0); |
calc(tabe,can,0); |
if_printOld(display,tabe,can); |
if_print(display,tabe,can); |
reset_selection(); reset_busy(can); |
reset_selection(); reset_busy(can); |
define_cursor(can->window,normalcur); |
define_cursor(can->window,normalcur); |
} |
} |
Line 261 int memory_plot(NODE arg,LIST *bytes){ |
|
Line 267 int memory_plot(NODE arg,LIST *bytes){ |
|
} |
} |
|
|
int plotover(NODE arg){ |
int plotover(NODE arg){ |
int id,orgcolor,color; |
int id; |
|
unsigned int orgcolor; |
P formula; |
P formula; |
struct canvas *can; |
struct canvas *can; |
VL vl,vl0; |
VL vl,vl0; |
Line 276 int plotover(NODE arg){ |
|
Line 283 int plotover(NODE arg){ |
|
for(vl0=vl;vl0;vl0=NEXT(vl0)) |
for(vl0=vl;vl0;vl0=NEXT(vl0)) |
if(vl0->v->attr==(pointer)V_IND) |
if(vl0->v->attr==(pointer)V_IND) |
if(vl->v!=can->vx && vl->v!=can->vy)return -1; |
if(vl->v!=can->vx && vl->v!=can->vy)return -1; |
if(argc(arg)==3) can->color=QTOS((Q)ARG2(arg)); |
#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) |
else can->color=0; |
|
#if !defined(VISUAL) |
|
set_drawcolor(can->color); |
set_drawcolor(can->color); |
#endif |
#endif |
current_can=can; |
current_can=can; |
Line 286 int plotover(NODE arg){ |
|
Line 291 int plotover(NODE arg){ |
|
if(can->mode==modeNO(PLOT)){ |
if(can->mode==modeNO(PLOT)){ |
plotcalc(can); |
plotcalc(can); |
plot_print(display,can); |
plot_print(display,can); |
} else ifplotmainOld(can); |
} else ifplotmain(can); |
copy_to_canvas(can); |
copy_to_canvas(can); |
can->color=color; |
can->color=orgcolor; |
#if !defined(VISUAL) |
#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) |
set_drawcolor(can->color); |
set_drawcolor(can->color); |
#endif |
#endif |
return id; |
return id; |
} |
} |
|
|
int drawcircle(NODE arg){ |
int drawcircle(NODE arg){ |
#if !defined(VISUAL) |
#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) |
int id,index,wx,wy,wr,c; |
int id,index,wx,wy,wr; |
|
unsigned int c; |
pointer ptr; |
pointer ptr; |
Q ret; |
Q ret; |
LIST xyr; |
LIST xyr; |
Line 325 int drawcircle(NODE arg){ |
|
Line 331 int drawcircle(NODE arg){ |
|
} |
} |
|
|
int draw_obj(NODE arg){ |
int draw_obj(NODE arg){ |
int index,color,x,y,u,v,len,r; |
int index,x,y,u,v,len,r; |
|
unsigned int color; |
NODE obj,n; |
NODE obj,n; |
RealVect *vect; |
RealVect *vect; |
struct canvas *can; |
struct canvas *can; |
Line 370 int draw_obj(NODE arg){ |
|
Line 377 int draw_obj(NODE arg){ |
|
set_lasterror("draw_obj : invalid request"); |
set_lasterror("draw_obj : invalid request"); |
return -1; |
return -1; |
} |
} |
#if !defined(VISUAL) |
#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) |
set_drawcolor(can->color); |
set_drawcolor(can->color); |
#endif |
#endif |
return 0; |
return 0; |
} |
} |
|
|
int draw_string(NODE arg){ |
int draw_string(NODE arg){ |
int index,x,y,color; |
int index,x,y; |
|
unsigned int color; |
char *str; |
char *str; |
NODE pos; |
NODE pos; |
struct canvas *can; |
struct canvas *can; |
Line 402 int draw_string(NODE arg){ |
|
Line 410 int draw_string(NODE arg){ |
|
x=(int)ToReal((Q)ARG0(pos)); |
x=(int)ToReal((Q)ARG0(pos)); |
y=(int)ToReal((Q)ARG1(pos)); |
y=(int)ToReal((Q)ARG1(pos)); |
draw_character_string(display,can,x,y,str,color); |
draw_character_string(display,can,x,y,str,color); |
#if !defined(VISUAL) |
#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) |
set_drawcolor(can->color); |
set_drawcolor(can->color); |
#endif |
#endif |
return 0; |
return 0; |
Line 485 int arrayplot(NODE arg){ |
|
Line 493 int arrayplot(NODE arg){ |
|
copy_to_canvas(can); |
copy_to_canvas(can); |
return id; |
return id; |
} |
} |
|
/* |
void ifplot_resize(struct canvas *can,POINT spos,POINT epos){ |
void ifplot_resize(struct canvas *can,POINT spos,POINT epos){ |
struct canvas *ncan; |
struct canvas *ncan; |
struct canvas fakecan; |
struct canvas fakecan; |
Line 494 void ifplot_resize(struct canvas *can,POINT spos,POINT |
|
Line 502 void ifplot_resize(struct canvas *can,POINT spos,POINT |
|
Q s,t; |
Q s,t; |
int new; |
int new; |
int w,h,m; |
int w,h,m; |
|
|
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){ |
fakecan=*can; |
fakecan=*can; |
Line 558 void ifplot_resize(struct canvas *can,POINT spos,POINT |
|
Line 565 void ifplot_resize(struct canvas *can,POINT spos,POINT |
|
if(can->precise && !can->wide){ |
if(can->precise && !can->wide){ |
current_can=can; |
current_can=can; |
alloc_pixmap(ncan); |
alloc_pixmap(ncan); |
#if defined(VISUAL) |
#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) |
ncan->real_can=can; |
ncan->real_can=can; |
#endif |
#endif |
qifplotmain(ncan); |
qifplotmain(ncan); |
Line 572 void ifplot_resize(struct canvas *can,POINT spos,POINT |
|
Line 579 void ifplot_resize(struct canvas *can,POINT spos,POINT |
|
} |
} |
} |
} |
} |
} |
|
*/ |
|
|
void plot_resize(struct canvas *can,POINT spos,POINT epos){ |
void plot_resize(struct canvas *can,POINT spos,POINT epos){ |
struct canvas *ncan; |
struct canvas *ncan; |
Q dx,dx2,xmin,xmax,xmid; |
Q dx,dx2,xmin,xmax,xmid,sx,ex,cw,ten,two,s,t; |
double dy,ymin,ymax,ymid; |
double dy,ymin,ymax,ymid; |
Q sx,ex,cw,ten,two; |
int new,w,h,m; |
Q s,t; |
|
int new; |
|
int w,h,m; |
|
|
|
if( XC(spos)<XC(epos) && YC(spos)<YC(epos) ){ |
if( XC(spos)<XC(epos) && YC(spos)<YC(epos) ){ |
new=search_canvas(); ncan=canvas[new]; |
new=search_canvas(); ncan=canvas[new]; |
Line 590 void plot_resize(struct canvas *can,POINT spos,POINT e |
|
Line 595 void plot_resize(struct canvas *can,POINT spos,POINT e |
|
ncan->wname=can->wname; |
ncan->wname=can->wname; |
ncan->vx=can->vx; ncan->vy=can->vy; |
ncan->vx=can->vx; ncan->vy=can->vy; |
ncan->formula=can->formula; |
ncan->formula=can->formula; |
|
ncan->color=can->color; |
w=XC(epos)-XC(spos); |
w=XC(epos)-XC(spos); |
h=YC(epos)-YC(spos); |
h=YC(epos)-YC(spos); |
m=MAX(can->width,can->height); |
m=MAX(can->width,can->height); |
if( w>h ){ |
if( w>h ){ |
ncan->width=m; ncan->height=m * h/w; |
ncan->width=m; |
|
ncan->height=m * h/w; |
} else { |
} else { |
ncan->width=m * w/h; ncan->height=m; |
ncan->width=m * w/h; |
|
ncan->height=m; |
} |
} |
if( can->wide ){ |
if( can->wide ){ |
STOQ(10,ten); STOQ(2,two); |
STOQ(10,ten); STOQ(2,two); |
subq(can->qxmax,can->qxmin,&t); mulq(t,ten,&dx); |
subq(can->qxmax,can->qxmin,&t); mulq(t,ten,&dx); |
addq(can->qxmax,can->qxmin,&t); divq(t,two,&xmid); |
addq(can->qxmax,can->qxmin,&t); divq(t,two,&xmid); |
divq(dx,two,&dx2); subq(xmid,dx2,&xmin); addq(xmid,dx2,&xmax); |
divq(dx,two,&dx2); subq(xmid,dx2,&xmin); addq(xmid,dx2,&xmax); |
|
|
dy=(can->ymax-can->ymin)*10; |
dy=(can->ymax-can->ymin)*10; |
ymid=(can->ymax+can->ymin)/2; |
ymid=(can->ymax+can->ymin)/2; |
ymin=ymid-dy/2; ymax=ymid+dy/2; |
ymin=ymid-dy/2; ymax=ymid+dy/2; |
} else { |
} else { |
subq(can->qxmax,can->qxmin,&dx); |
subq(can->qxmax,can->qxmin,&dx); |
xmin=can->qxmin; xmax=can->qxmax; |
xmin=can->qxmin; |
|
xmax=can->qxmax; |
dy=can->ymax-can->ymin; |
dy=can->ymax-can->ymin; |
ymin=can->ymin; ymax=can->ymax; |
ymin=can->ymin; |
|
ymax=can->ymax; |
} |
} |
STOQ(XC(spos),sx); STOQ(XC(epos),ex); STOQ(can->width,cw); |
STOQ(XC(spos),sx); STOQ(XC(epos),ex); STOQ(can->width,cw); |
mulq(sx,dx,&t); divq(t,cw,&s); addq(xmin,s,&ncan->qxmin); |
mulq(sx,dx,&t); divq(t,cw,&s); addq(xmin,s,&ncan->qxmin); |
mulq(ex,dx,&t); divq(t,cw,&s); addq(xmin,s,&ncan->qxmax); |
mulq(ex,dx,&t); divq(t,cw,&s); addq(xmin,s,&ncan->qxmax); |
ncan->xmin=ToReal(ncan->qxmin); ncan->xmax=ToReal(ncan->qxmax); |
ncan->xmin=ToReal(ncan->qxmin); ncan->xmax=ToReal(ncan->qxmax); |
|
|
ncan->ymin=ymax-YC(epos)*dy/can->height; |
ncan->ymin=ymax-YC(epos)*dy/can->height; |
ncan->ymax=ymax-YC(spos)*dy/can->height; |
ncan->ymax=ymax-YC(spos)*dy/can->height; |
|
|
create_canvas(ncan); |
create_canvas(ncan); |
plotcalc(ncan); |
|
plot_print(display,ncan); |
switch (ncan->mode){ |
|
case 0://IFPLOT |
|
case 1://CONPLOT |
|
ifplotmain(ncan); |
|
break; |
|
case 2://PLOT |
|
plotcalc(ncan); |
|
plot_print(display,ncan); |
|
break; |
|
case 4://POLARPLOT |
|
polarcalc(ncan); |
|
plot_print(display,ncan); |
|
break; |
|
case 30://MEMORY_PLOT |
|
break; |
|
case 31://ARRAYPLOT |
|
break; |
|
case 33://DRAWCIRCLE |
|
break; |
|
case 34://DRAW_OBJ |
|
break; |
|
case 35://DRAW_STRING |
|
break; |
|
case 36://OBJ_CP |
|
break; |
|
case 6://IFPLOTD |
|
case 7://IFPLOTQ |
|
case 8://IFPLOTB |
|
case 9://INEQND |
|
case 10://INEQNQ |
|
case 11://INEQNB |
|
case 21://CONPLOTD |
|
case 22://CONPLOTQ |
|
case 23://CONPLOTB |
|
case 24://ITVIFPLOT |
|
//ifplotNG |
|
ifplotmainNG(ncan); |
|
break; |
|
case 12://INEQNDAND |
|
case 13://INEQNQAND |
|
case 14://INEQNBAND |
|
case 15://INEQNDOR |
|
case 16://INEQNQOR |
|
case 17://INEQNBOR |
|
case 18://INEQNDXOR |
|
case 19://INEQNQXOR |
|
case 20://INEQNBXOR |
|
case 25://PLOTOVERD |
|
case 26://PLOTOVERQ |
|
case 27://PLOTOVERB |
|
//ifplotOP |
|
ifplotmainNG(ncan); |
|
break; |
|
case 38://POLARPLOTD |
|
//polarplotNG |
|
polarcalcNG(ncan); |
|
polar_print(display,ncan); |
|
break; |
|
} |
copy_to_canvas(ncan); |
copy_to_canvas(ncan); |
} |
} |
} |
} |
Line 649 void qifplotmain(struct canvas *can) |
|
Line 713 void qifplotmain(struct canvas *can) |
|
|
|
//*******************ifplotNG |
//*******************ifplotNG |
int ifplotNG(NODE arg,int func){ |
int ifplotNG(NODE arg,int func){ |
int id,orgcolor,color,op_code; |
int id,op_code; |
|
unsigned int color; |
NODE n; |
NODE n; |
struct canvas *can; |
struct canvas *can; |
P formula; |
P formula; |
LIST xrange,yrange,zrange,wsize; |
LIST xrange,yrange,zrange,wsize; |
STRING wname; |
STRING wname; |
|
|
|
can=canvas[id=search_canvas()]; |
formula=(P)ARG0(arg); |
formula=(P)ARG0(arg); |
color=QTOS((Q)ARG1(arg)); |
can->color=QTOS((Q)ARG1(arg)); |
xrange=(LIST)ARG2(arg); |
xrange=(LIST)ARG2(arg); |
yrange=(LIST)ARG3(arg); |
yrange=(LIST)ARG3(arg); |
zrange=(LIST)ARG4(arg); |
zrange=(LIST)ARG4(arg); |
wsize=(LIST)ARG5(arg); |
wsize=(LIST)ARG5(arg); |
wname=(STRING)ARG6(arg); |
wname=(STRING)ARG6(arg); |
|
|
can=canvas[id=search_canvas()]; |
|
orgcolor=can->color; |
|
can->color=color; |
|
can->division=0; |
can->division=0; |
// set canvas data |
// set canvas data |
if(xrange){ |
if(xrange){ |
Line 694 int ifplotNG(NODE arg,int func){ |
|
Line 756 int ifplotNG(NODE arg,int func){ |
|
if(wname) can->wname=BDY(wname); |
if(wname) can->wname=BDY(wname); |
else can->wname=""; |
else can->wname=""; |
can->formula=formula; |
can->formula=formula; |
set_drawcolor(color); |
set_drawcolor(can->color); |
can->mode=func; |
can->mode=func; |
create_canvas(can); |
create_canvas(can); |
ifplotmain(can); |
ifplotmainNG(can); |
set_drawcolor(orgcolor); |
|
copy_to_canvas(can); |
copy_to_canvas(can); |
can->color=orgcolor; |
|
return id; |
return id; |
} |
} |
|
|
int ifplotOP(NODE arg,int func){ |
int ifplotOP(NODE arg,int func){ |
//ineqnor[D,Q,B],ineqnand[D,Q,B],ineqnxor[D,Q,b],plotover[D,Q,B] |
//ineqnor[D,Q,B],ineqnand[D,Q,B],ineqnxor[D,Q,b],plotover[D,Q,B] |
int index,orgcolor,color,op_code; |
int index,op_code; |
|
unsigned int orgcolor,color; |
P formula; |
P formula; |
struct canvas *can; |
struct canvas *can; |
VL vl,vl0; |
VL vl,vl0; |
Line 725 int ifplotOP(NODE arg,int func){ |
|
Line 786 int ifplotOP(NODE arg,int func){ |
|
for(vl0=vl;vl0;vl0=NEXT(vl0)) |
for(vl0=vl;vl0;vl0=NEXT(vl0)) |
if(vl0->v->attr==(pointer)V_IND) |
if(vl0->v->attr==(pointer)V_IND) |
if(vl->v!=can->vx && vl->v!=can->vy)return -1; |
if(vl->v!=can->vx && vl->v!=can->vy)return -1; |
#if !defined(VISUAL) |
#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) |
set_drawcolor(can->color); |
set_drawcolor(can->color); |
#endif |
#endif |
can->mode=func; |
can->mode=func; |
set_drawcolor(color); |
set_drawcolor(color); |
ifplotmain(can); |
ifplotmainNG(can); |
set_drawcolor(orgcolor); |
set_drawcolor(orgcolor); |
copy_to_canvas(can); |
copy_to_canvas(can); |
can->color=orgcolor; |
can->color=orgcolor; |
#if !defined(VISUAL) |
#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) |
set_drawcolor(can->color); |
set_drawcolor(can->color); |
#endif |
#endif |
return index; |
return index; |
} |
} |
|
|
void ifplotmain(struct canvas *can){ |
void ifplotmainNG(struct canvas *can){ |
int width,height,i,j,ix,iy,**mask; |
int width,height,i,j,ix,iy,**mask; |
double **tabe; |
double **tabe; |
|
|
Line 753 void ifplotmain(struct canvas *can){ |
|
Line 814 void ifplotmain(struct canvas *can){ |
|
switch(can->mode){ |
switch(can->mode){ |
case 6://IFPLOTD |
case 6://IFPLOTD |
calc(tabe,can,0); |
calc(tabe,can,0); |
if_print(display,tabe,can,1); |
if_printNG(display,tabe,can,1); |
break; |
break; |
case 7://IFPLOTQ |
case 7://IFPLOTQ |
calcq(tabe,can,0); |
calcq(tabe,can,0); |
if_print(display,tabe,can,1); |
if_printNG(display,tabe,can,1); |
break; |
break; |
case 8://IFPLOTB |
case 8://IFPLOTB |
calcb(tabe,can,0); |
calcb(tabe,can,0); |
if_print(display,tabe,can,0); |
if_printNG(display,tabe,can,0); |
break; |
break; |
#if defined(INTERVAL) |
|
case 9://INEQND |
case 9://INEQND |
calc(tabe,can,0); |
calc(tabe,can,0); |
area_print(display,tabe,can,0); |
area_print(display,tabe,can,0); |
Line 824 void ifplotmain(struct canvas *can){ |
|
Line 884 void ifplotmain(struct canvas *can){ |
|
calcb(tabe,can,0); |
calcb(tabe,can,0); |
con_print(display,tabe,can); |
con_print(display,tabe,can); |
break; |
break; |
|
#if defined(INTERVAL) |
case 24://ITVIFPLOT: |
case 24://ITVIFPLOT: |
itvcalc(tabe,can,1); |
itvcalc(tabe,can,1); |
if_print(display,tabe,can,1); |
if_printNG(display,tabe,can,1); |
break; |
break; |
|
#endif |
case 25://PLOTOVERD |
case 25://PLOTOVERD |
calc(tabe,can,0); |
calc(tabe,can,0); |
over_print(display,tabe,can,0); |
over_print(display,tabe,can,0); |
Line 840 void ifplotmain(struct canvas *can){ |
|
Line 902 void ifplotmain(struct canvas *can){ |
|
calcb(tabe,can,0); |
calcb(tabe,can,0); |
over_print(display,tabe,can,0); |
over_print(display,tabe,can,0); |
break; |
break; |
#endif |
|
} |
} |
set_drawcolor(can->color); |
set_drawcolor(can->color); |
reset_selection(); reset_busy(can); |
reset_selection(); reset_busy(can); |
define_cursor(can->window,normalcur); |
define_cursor(can->window,normalcur); |
} |
} |
|
|
#if defined(INTERVAL) |
#if !defined(VISUAL) && !defined(__MINGW32__) && !defined(__MINGW64__) |
int objcp(NODE arg){ |
int objcp(NODE arg){ |
int idsrc, idtrg, op_code; |
int idsrc, idtrg, op_code; |
struct canvas *cansrc, *cantrg; |
struct canvas *cansrc, *cantrg; |
Line 946 void obj_op(struct canvas *cansrc, struct canvas *cant |
|
Line 1007 void obj_op(struct canvas *cansrc, struct canvas *cant |
|
flush(); |
flush(); |
} |
} |
#endif |
#endif |
|
|
int polarplotNG(NODE arg){ |
int polarplotNG(NODE arg){ |
int i,id,color,orgcolor,width,height; |
int i,id,width,height; |
NODE n; |
NODE n; |
struct canvas *can; |
struct canvas *can; |
P formula; |
|
LIST range,geom; |
LIST range,geom; |
STRING wname; |
STRING wname; |
V v; |
V v; |
|
|
formula=(P)ARG0(arg); |
id=search_canvas(); |
color=QTOS((Q)ARG1(arg)); |
can=canvas[id]; |
|
can->mode=modeNO(POLARPLOTD); |
|
can->formula=(P)ARG0(arg); |
|
can->color=QTOS((Q)ARG1(arg)); |
range=(LIST)ARG2(arg); |
range=(LIST)ARG2(arg); |
geom=(LIST)ARG3(arg); |
geom=(LIST)ARG3(arg); |
wname=(STRING)ARG4(arg); |
wname=(STRING)ARG4(arg); |
|
|
id=search_canvas(); |
|
can=canvas[id]; |
|
can->mode=modeNO(POLARPLOT); |
|
if(range){ |
if(range){ |
n=NEXT(BDY(range)); |
n=NEXT(BDY(range)); |
can->zmin=ToReal(BDY(n)); |
can->zmin=ToReal(BDY(n)); |
Line 978 int polarplotNG(NODE arg){ |
|
Line 1039 int polarplotNG(NODE arg){ |
|
} |
} |
if(wname)can->wname=BDY(wname); |
if(wname)can->wname=BDY(wname); |
else can->wname=""; |
else can->wname=""; |
can->formula=formula; |
polarcalcNG(can); |
orgcolor=can->color; |
|
can->color=color; |
|
polarcalc(can); |
|
create_canvas(can); |
create_canvas(can); |
set_drawcolor(color); |
set_drawcolor(can->color); |
polar_print(display,can); |
polar_print(display,can); |
can->color=orgcolor; |
reset_selection(); |
set_drawcolor(orgcolor); |
reset_busy(can); |
reset_selection(); reset_busy(can); |
|
define_cursor(can->window,normalcur); |
define_cursor(can->window,normalcur); |
return id; |
return id; |
} |
} |
|
|
|
void MSGdraw(char *str){ |
|
int id,x,y; |
|
struct canvas *can; |
|
|
|
id=search_canvas(); |
|
can=canvas[id]; |
|
can->mode=modeNO(INTERACTIVE); |
|
can->width=300; |
|
can->height=300; |
|
can->wname="MSG"; |
|
x=100; |
|
y=100; |
|
create_canvas(can); |
|
draw_character_string(display,can,x,y,str,0xff0000); |
|
} |
|
|