Annotation of OpenXM_contrib2/asir2000/plot/plotf.c, Revision 1.11
1.4 noro 1: /*
2: * Copyright (c) 1994-2000 FUJITSU LABORATORIES LIMITED
3: * All rights reserved.
4: *
5: * FUJITSU LABORATORIES LIMITED ("FLL") hereby grants you a limited,
6: * non-exclusive and royalty-free license to use, copy, modify and
7: * redistribute, solely for non-commercial and non-profit purposes, the
8: * computer program, "Risa/Asir" ("SOFTWARE"), subject to the terms and
9: * conditions of this Agreement. For the avoidance of doubt, you acquire
10: * only a limited right to use the SOFTWARE hereunder, and FLL or any
11: * third party developer retains all rights, including but not limited to
12: * copyrights, in and to the SOFTWARE.
13: *
14: * (1) FLL does not grant you a license in any way for commercial
15: * purposes. You may use the SOFTWARE only for non-commercial and
16: * non-profit purposes only, such as academic, research and internal
17: * business use.
18: * (2) The SOFTWARE is protected by the Copyright Law of Japan and
19: * international copyright treaties. If you make copies of the SOFTWARE,
20: * with or without modification, as permitted hereunder, you shall affix
21: * to all such copies of the SOFTWARE the above copyright notice.
22: * (3) An explicit reference to this SOFTWARE and its copyright owner
23: * shall be made on your publication or presentation in any form of the
24: * results obtained by use of the SOFTWARE.
25: * (4) In the event that you modify the SOFTWARE, you shall notify FLL by
1.5 noro 26: * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification
1.4 noro 27: * for such modification or the source code of the modified part of the
28: * SOFTWARE.
29: *
30: * THE SOFTWARE IS PROVIDED AS IS WITHOUT ANY WARRANTY OF ANY KIND. FLL
31: * MAKES ABSOLUTELY NO WARRANTIES, EXPRESSED, IMPLIED OR STATUTORY, AND
32: * EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
33: * FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT OF THIRD PARTIES'
34: * RIGHTS. NO FLL DEALER, AGENT, EMPLOYEES IS AUTHORIZED TO MAKE ANY
35: * MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS WARRANTY.
36: * UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT,
37: * OR OTHERWISE, SHALL FLL BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY
38: * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
39: * DAMAGES OF ANY CHARACTER, INCLUDING, WITHOUT LIMITATION, DAMAGES
40: * ARISING OUT OF OR RELATING TO THE SOFTWARE OR THIS AGREEMENT, DAMAGES
41: * FOR LOSS OF GOODWILL, WORK STOPPAGE, OR LOSS OF DATA, OR FOR ANY
42: * DAMAGES, EVEN IF FLL SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF
43: * SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. EVEN IF A PART
44: * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY
45: * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
46: * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
47: *
1.11 ! noro 48: * $OpenXM: OpenXM_contrib2/asir2000/plot/plotf.c,v 1.10 2001/08/22 09:19:21 noro Exp $
1.4 noro 49: */
1.1 noro 50: #include "ca.h"
51: #include "parse.h"
52: #include "ox.h"
53: #include "ifplot.h"
54:
55: void Pifplot(), Pconplot(), Pplotover(), Pplot(), Parrayplot(), Pdrawcircle();
1.10 noro 56: void Pmemory_ifplot();
1.6 noro 57: void Popen_canvas(), Pclear_canvas(), Pdraw_obj();
1.11 ! noro 58: void Pox_rpc();
! 59: void Pox_cmo_rpc();
1.1 noro 60:
61: struct ftab plot_tab[] = {
62: {"ifplot",Pifplot,-7},
1.10 noro 63: {"memory_ifplot",Pmemory_ifplot,-7},
1.1 noro 64: {"conplot",Pconplot,-8},
65: {"plot",Pplot,-6},
66: {"plotover",Pplotover,3},
67: {"drawcircle",Pdrawcircle,5},
1.6 noro 68: {"open_canvas",Popen_canvas,-3},
69: {"clear_canvas",Pclear_canvas,2},
1.7 noro 70: {"draw_obj",Pdraw_obj,-4},
1.1 noro 71: /*
72: {"arrayplot",Parrayplot,2},
73: */
74: {0,0,0},
75: };
76:
77: int current_s;
78:
1.11 ! noro 79: void Popen_canvas(NODE arg,Obj *rp)
1.6 noro 80: {
1.9 noro 81: Q w300,s_id;
1.6 noro 82: LIST geom;
1.11 ! noro 83: int stream;
1.6 noro 84: NODE n,n0;
85: STRING fname,wname;
86:
87: geom = 0; wname = 0; stream = -1;
88: for ( ; arg; arg = NEXT(arg) )
89: if ( !BDY(arg) )
90: stream = 0;
91: else
92: switch ( OID(BDY(arg)) ) {
93: case O_LIST:
94: geom = (LIST)BDY(arg);
95: break;
96: case O_N:
97: stream = QTOS((Q)BDY(arg)); break;
98: case O_STR:
99: wname = (STRING)BDY(arg); break;
100: default:
101: error("open_canvas : invalid argument"); break;
102: }
103: /* open_canvas in ox_plot requires
1.9 noro 104: [s_id (Q),
1.6 noro 105: geom=[xsize,ysize] (LIST),
106: wname=name (STRING)]
107: */
108:
109: if ( stream < 0 )
110: stream = current_s;
111: else
112: current_s = stream;
1.9 noro 113: STOQ(stream,s_id);
1.6 noro 114: if ( !geom ) {
115: STOQ(300,w300);
116: MKNODE(n0,w300,0); MKNODE(n,w300,n0); MKLIST(geom,n);
117: }
118: MKSTR(fname,"open_canvas");
1.9 noro 119: arg = mknode(4,s_id,fname,geom,wname);
1.6 noro 120: Pox_cmo_rpc(arg,rp);
121: }
122:
1.11 ! noro 123: void Pifplot(NODE arg,Obj *rp)
1.1 noro 124: {
1.9 noro 125: Q m2,p2,w300,s_id;
1.1 noro 126: NODE defrange;
127: LIST xrange,yrange,range[2],list,geom;
128: VL vl,vl0;
129: V v[2],av[2];
1.11 ! noro 130: int stream,ri,i;
1.1 noro 131: P poly;
132: P var;
133: NODE n,n0;
134: STRING fname,wname;
135:
136: STOQ(-2,m2); STOQ(2,p2);
137: MKNODE(n,p2,0); MKNODE(defrange,m2,n);
138: poly = 0; vl = 0; geom = 0; wname = 0; stream = -1; ri = 0;
139: for ( ; arg; arg = NEXT(arg) )
140: if ( !BDY(arg) )
141: stream = 0;
142: else
143: switch ( OID(BDY(arg)) ) {
144: case O_P:
145: poly = (P)BDY(arg);
1.11 ! noro 146: get_vars_recursive((Obj)poly,&vl);
1.1 noro 147: for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) )
1.11 ! noro 148: if ( vl0->v->attr == (pointer)V_IND )
1.1 noro 149: if ( i >= 2 )
150: error("ifplot : invalid argument");
151: else
152: v[i++] = vl0->v;
153: break;
154: case O_LIST:
155: list = (LIST)BDY(arg);
156: if ( OID(BDY(BDY(list))) == O_P )
157: if ( ri > 1 )
158: error("ifplot : invalid argument");
159: else
160: range[ri++] = list;
161: else
162: geom = list;
163: break;
164: case O_N:
165: stream = QTOS((Q)BDY(arg)); break;
166: case O_STR:
167: wname = (STRING)BDY(arg); break;
168: default:
169: error("ifplot : invalid argument"); break;
170: }
171: if ( !poly )
172: error("ifplot : invalid argument");
173: switch ( ri ) {
174: case 0:
175: if ( !v[1] )
176: error("ifplot : please specify all variables");
177: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
178: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
179: break;
180: case 1:
181: if ( !v[1] )
182: error("ifplot : please specify all variables");
183: av[0] = VR((P)BDY(BDY(range[0])));
184: if ( v[0] == av[0] ) {
185: xrange = range[0];
186: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
187: } else if ( v[1] == av[0] ) {
188: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
189: yrange = range[0];
190: } else
191: error("ifplot : invalid argument");
192: break;
193: case 2:
194: av[0] = VR((P)BDY(BDY(range[0])));
195: av[1] = VR((P)BDY(BDY(range[1])));
196: if ( ((v[0] == av[0]) && (!v[1] || v[1] == av[1])) ||
197: ((v[0] == av[1]) && (!v[1] || v[1] == av[0])) ) {
198: xrange = range[0]; yrange = range[1];
199: } else
200: error("ifplot : invalid argument");
201: break;
202: default:
203: error("ifplot : cannot happen"); break;
204: }
205: /* ifplot in ox_plot requires
1.9 noro 206: [s_id (Q),
1.1 noro 207: formula (Obj),
208: xrange=[x,xmin,xmax] (LIST),
209: yrange=[y,ymin,ymax] (LIST),
210: zrange=0,
211: geom=[xsize,ysize] (LIST),
212: wname=name (STRING)]
213: */
214:
215: if ( stream < 0 )
216: stream = current_s;
217: else
218: current_s = stream;
1.9 noro 219: STOQ(stream,s_id);
1.1 noro 220: if ( !geom ) {
221: STOQ(300,w300);
222: MKNODE(n0,w300,0); MKNODE(n,w300,n0); MKLIST(geom,n);
223: }
224: MKSTR(fname,"plot");
1.9 noro 225: arg = mknode(8,s_id,fname,poly,xrange,yrange,0,geom,wname);
1.10 noro 226: Pox_rpc(arg,rp);
227: }
228:
1.11 ! noro 229: void Pmemory_ifplot(NODE arg,Obj *rp)
1.10 noro 230: {
231: Q m2,p2,w300,s_id;
232: NODE defrange;
233: LIST xrange,yrange,range[2],list,geom;
234: VL vl,vl0;
235: V v[2],av[2];
1.11 ! noro 236: int stream,ri,i;
1.10 noro 237: P poly;
238: P var;
239: NODE n,n0;
1.11 ! noro 240: STRING fname;
1.10 noro 241:
242: STOQ(-2,m2); STOQ(2,p2);
243: MKNODE(n,p2,0); MKNODE(defrange,m2,n);
244: poly = 0; vl = 0; geom = 0; stream = -1; ri = 0;
245: for ( ; arg; arg = NEXT(arg) )
246: if ( !BDY(arg) )
247: stream = 0;
248: else
249: switch ( OID(BDY(arg)) ) {
250: case O_P:
251: poly = (P)BDY(arg);
1.11 ! noro 252: get_vars_recursive((Obj)poly,&vl);
1.10 noro 253: for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) )
1.11 ! noro 254: if ( vl0->v->attr == (pointer)V_IND )
1.10 noro 255: if ( i >= 2 )
256: error("ifplot : invalid argument");
257: else
258: v[i++] = vl0->v;
259: break;
260: case O_LIST:
261: list = (LIST)BDY(arg);
262: if ( OID(BDY(BDY(list))) == O_P )
263: if ( ri > 1 )
264: error("ifplot : invalid argument");
265: else
266: range[ri++] = list;
267: else
268: geom = list;
269: break;
270: case O_N:
271: stream = QTOS((Q)BDY(arg)); break;
272: default:
273: error("memory_ifplot : invalid argument"); break;
274: }
275: if ( !poly )
276: error("memory_ifplot : invalid argument");
277: switch ( ri ) {
278: case 0:
279: if ( !v[1] )
280: error("memory_ifplot : please specify all variables");
281: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
282: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
283: break;
284: case 1:
285: if ( !v[1] )
286: error("memory_ifplot : please specify all variables");
287: av[0] = VR((P)BDY(BDY(range[0])));
288: if ( v[0] == av[0] ) {
289: xrange = range[0];
290: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
291: } else if ( v[1] == av[0] ) {
292: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
293: yrange = range[0];
294: } else
295: error("memory_ifplot : invalid argument");
296: break;
297: case 2:
298: av[0] = VR((P)BDY(BDY(range[0])));
299: av[1] = VR((P)BDY(BDY(range[1])));
300: if ( ((v[0] == av[0]) && (!v[1] || v[1] == av[1])) ||
301: ((v[0] == av[1]) && (!v[1] || v[1] == av[0])) ) {
302: xrange = range[0]; yrange = range[1];
303: } else
304: error("memory_ifplot : invalid argument");
305: break;
306: default:
307: error("memory_ifplot : cannot happen"); break;
308: }
309: /* memory_ifplot in ox_plot requires
310: [s_id (Q),
311: formula (Obj),
312: xrange=[x,xmin,xmax] (LIST),
313: yrange=[y,ymin,ymax] (LIST),
314: zrange=0,
315: geom=[xsize,ysize] (LIST)]
316: */
317:
318: if ( stream < 0 )
319: stream = current_s;
320: else
321: current_s = stream;
322: STOQ(stream,s_id);
323: if ( !geom ) {
324: STOQ(300,w300);
325: MKNODE(n0,w300,0); MKNODE(n,w300,n0); MKLIST(geom,n);
326: }
327: MKSTR(fname,"memory_plot");
328: arg = mknode(7,s_id,fname,poly,xrange,yrange,0,geom);
1.3 noro 329: Pox_rpc(arg,rp);
1.1 noro 330: }
331:
1.11 ! noro 332: void Pconplot(NODE arg,Obj *rp)
1.1 noro 333: {
1.9 noro 334: Q m2,p2,w300,s_id;
1.1 noro 335: NODE defrange;
336: LIST xrange,yrange,zrange,range[3],list,geom;
337: VL vl,vl0;
338: V v[2],av[2];
1.11 ! noro 339: int stream,ri,i;
1.1 noro 340: P poly;
341: P var;
342: NODE n,n0;
343: STRING fname,wname;
344:
345: STOQ(-2,m2); STOQ(2,p2);
346: MKNODE(n,p2,0); MKNODE(defrange,m2,n);
347: poly = 0; vl = 0; geom = 0; wname = 0; stream = -1; ri = 0;
348: for ( ; arg; arg = NEXT(arg) )
349: if ( !BDY(arg) )
350: stream = 0;
351: else
352: switch ( OID(BDY(arg)) ) {
353: case O_P:
354: poly = (P)BDY(arg);
1.11 ! noro 355: get_vars_recursive((Obj)poly,&vl);
1.1 noro 356: for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) )
1.11 ! noro 357: if ( vl0->v->attr == (pointer)V_IND )
1.1 noro 358: if ( i >= 2 )
359: error("ifplot : invalid argument");
360: else
361: v[i++] = vl0->v;
362: break;
363: case O_LIST:
364: list = (LIST)BDY(arg);
365: if ( OID(BDY(BDY(list))) == O_P )
366: if ( ri > 2 )
367: error("ifplot : invalid argument");
368: else
369: range[ri++] = list;
370: else
371: geom = list;
372: break;
373: case O_N:
374: stream = QTOS((Q)BDY(arg)); break;
375: case O_STR:
376: wname = (STRING)BDY(arg); break;
377: default:
378: error("ifplot : invalid argument"); break;
379: }
380: if ( !poly )
381: error("ifplot : invalid argument");
382: switch ( ri ) {
383: case 0:
384: if ( !v[1] )
385: error("ifplot : please specify all variables");
386: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
387: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
388: MKNODE(n,0,defrange); MKLIST(zrange,n);
389: break;
390: case 1:
391: if ( !v[1] )
392: error("ifplot : please specify all variables");
393: av[0] = VR((P)BDY(BDY(range[0])));
394: if ( v[0] == av[0] ) {
395: xrange = range[0];
396: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
397: MKNODE(n,0,defrange); MKLIST(zrange,n);
398: } else if ( v[1] == av[0] ) {
399: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
400: yrange = range[0];
401: MKNODE(n,0,defrange); MKLIST(zrange,n);
402: } else {
403: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
404: MKV(v[1],var); MKNODE(n,var,defrange); MKLIST(yrange,n);
405: zrange = range[0];
406: }
407: break;
408: case 2: case 3:
409: av[0] = VR((P)BDY(BDY(range[0])));
410: av[1] = VR((P)BDY(BDY(range[1])));
411: if ( ((v[0] == av[0]) && (!v[1] || v[1] == av[1])) ||
412: ((v[0] == av[1]) && (!v[1] || v[1] == av[0])) ) {
413: xrange = range[0]; yrange = range[1];
414: if ( ri == 3 )
415: zrange = range[2];
416: else {
417: MKNODE(n,0,defrange); MKLIST(zrange,n);
418: }
419: } else
420: error("ifplot : invalid argument");
421: break;
422: default:
423: error("ifplot : cannot happen"); break;
424: }
425: if ( stream < 0 )
426: stream = current_s;
427: else
428: current_s = stream;
429:
430: /* conplot in ox_plot requires
1.9 noro 431: [s_id (Q),
1.1 noro 432: formula (Obj),
433: xrange=[x,xmin,xmax] (LIST),
434: yrange=[y,ymin,ymax] (LIST),
435: zrange=[z,zmin,zmax] (LIST),
436: geom=[xsize,ysize] (LIST),
437: wname=name (STRING)]
438: */
439:
440: if ( stream < 0 )
441: stream = current_s;
442: else
443: current_s = stream;
1.9 noro 444: STOQ(stream,s_id);
1.1 noro 445: if ( !geom ) {
446: STOQ(300,w300);
447: MKNODE(n0,w300,0); MKNODE(n,w300,n0); MKLIST(geom,n);
448: }
449: MKSTR(fname,"plot");
1.9 noro 450: arg = mknode(8,s_id,fname,poly,xrange,yrange,zrange,geom,wname);
1.3 noro 451: Pox_rpc(arg,rp);
1.1 noro 452: }
453:
1.11 ! noro 454: void Pplot(NODE arg,Obj *rp)
1.1 noro 455: {
1.9 noro 456: Q m2,p2,w300,s_id;
1.1 noro 457: NODE defrange;
458: LIST xrange,range[1],list,geom;
459: VL vl,vl0;
460: V v[1],av[1];
1.11 ! noro 461: int stream,ri,i;
1.1 noro 462: P poly;
463: P var;
464: NODE n,n0;
465: STRING fname,wname;
466:
467: STOQ(-2,m2); STOQ(2,p2);
468: MKNODE(n,p2,0); MKNODE(defrange,m2,n);
469: poly = 0; vl = 0; geom = 0; wname = 0; stream = -1; ri = 0;
470: for ( ; arg; arg = NEXT(arg) )
471: if ( !BDY(arg) )
472: stream = 0;
473: else
474: switch ( OID(BDY(arg)) ) {
475: case O_P: case O_R:
476: poly = (P)BDY(arg);
1.11 ! noro 477: get_vars_recursive((Obj)poly,&vl);
1.1 noro 478: for ( vl0 = vl, i = 0; vl0; vl0 = NEXT(vl0) )
1.11 ! noro 479: if ( vl0->v->attr == (pointer)V_IND )
1.1 noro 480: if ( i >= 1 )
481: error("ifplot : invalid argument");
482: else
483: v[i++] = vl0->v;
1.8 noro 484: if ( i != 1 )
485: error("ifplot : invalid argument");
1.1 noro 486: break;
487: case O_LIST:
488: list = (LIST)BDY(arg);
489: if ( OID(BDY(BDY(list))) == O_P )
490: if ( ri > 0 )
491: error("plot : invalid argument");
492: else
493: range[ri++] = list;
494: else
495: geom = list;
496: break;
497: case O_N:
498: stream = QTOS((Q)BDY(arg)); break;
499: case O_STR:
500: wname = (STRING)BDY(arg); break;
501: default:
502: error("plot : invalid argument"); break;
503: }
504: if ( !poly )
505: error("plot : invalid argument");
506: switch ( ri ) {
507: case 0:
508: MKV(v[0],var); MKNODE(n,var,defrange); MKLIST(xrange,n);
509: break;
510: case 1:
511: av[0] = VR((P)BDY(BDY(range[0])));
512: if ( v[0] == av[0] )
513: xrange = range[0];
514: else
515: error("plot : invalid argument");
516: break;
517: default:
518: error("plot : cannot happen"); break;
519: }
520: /* conplot in ox_plot requires
1.9 noro 521: [s_id (Q),
1.1 noro 522: formula (Obj),
523: xrange=[x,xmin,xmax] (LIST),
524: yrange=0,
525: zrange=0,
526: geom=[xsize,ysize] (LIST),
527: wname=name (STRING)]
528: */
529: if ( stream < 0 )
530: stream = current_s;
531: else
532: current_s = stream;
1.9 noro 533: STOQ(stream,s_id);
1.1 noro 534: if ( !geom ) {
535: STOQ(300,w300);
536: MKNODE(n0,w300,0); MKNODE(n,w300,n0); MKLIST(geom,n);
537: }
538: MKSTR(fname,"plot");
1.9 noro 539: arg = mknode(8,s_id,fname,poly,xrange,0,0,geom,wname);
1.3 noro 540: Pox_rpc(arg,rp);
1.1 noro 541: }
542:
1.11 ! noro 543: void Pplotover(NODE arg,Obj *rp)
1.1 noro 544: {
1.9 noro 545: Q s_id,index;
1.1 noro 546: P poly;
547: STRING fname;
548:
549: poly = (P)ARG0(arg);
1.9 noro 550: s_id = (Q)ARG1(arg);
1.1 noro 551: index = (Q)ARG2(arg);
552: MKSTR(fname,"plotover");
1.9 noro 553: arg = mknode(4,s_id,fname,index,poly);
1.3 noro 554: Pox_rpc(arg,rp);
1.1 noro 555: }
556:
1.9 noro 557: /* arg = [x,y,r,s_id,index] */
1.1 noro 558:
1.11 ! noro 559: void Pdrawcircle(NODE arg,Obj *rp)
1.1 noro 560: {
1.9 noro 561: Q s_id,index;
1.1 noro 562: Obj x,y,r;
563: STRING fname;
564: NODE n;
565: LIST pos;
566:
567: x = (Obj)ARG0(arg);
568: y = (Obj)ARG1(arg);
569: r = (Obj)ARG2(arg);
1.9 noro 570: s_id = (Q)ARG3(arg);
1.1 noro 571: index = (Q)ARG4(arg);
572: MKSTR(fname,"drawcircle");
573: n = mknode(3,x,y,r); MKLIST(pos,n);
1.9 noro 574: arg = mknode(4,s_id,fname,index,pos);
1.3 noro 575: Pox_rpc(arg,rp);
1.6 noro 576: }
577:
1.9 noro 578: /* draw_obj(s_id,cindex,point|line); point = [x,y], line = [xa,ya,xb,yb] */
1.11 ! noro 579: void Pdraw_obj(NODE arg,Obj *rp)
1.6 noro 580: {
581: static STRING fname;
1.9 noro 582: Q s_id,index;
1.6 noro 583: LIST obj;
584:
585: if ( !fname ) {
586: MKSTR(fname,"draw_obj");
587: }
1.9 noro 588: s_id = (Q)ARG0(arg);
1.6 noro 589: index = (Q)ARG1(arg);
590: obj = (LIST)ARG2(arg);
1.7 noro 591: /* ARG3(arg) = color */
592: if ( argc(arg) == 4 )
1.9 noro 593: arg = mknode(5,s_id,fname,index,obj,ARG3(arg));
1.7 noro 594: else
1.9 noro 595: arg = mknode(4,s_id,fname,index,obj);
1.6 noro 596: Pox_cmo_rpc(arg,rp);
597: }
598:
1.11 ! noro 599: void Pclear_canvas(NODE arg,Obj *rp)
1.6 noro 600: {
601: static STRING fname;
1.9 noro 602: Q s_id,index;
1.6 noro 603:
604: if ( !fname ) {
605: MKSTR(fname,"clear_canvas");
606: }
1.9 noro 607: s_id = (Q)ARG0(arg);
1.6 noro 608: index = (Q)ARG1(arg);
1.9 noro 609: arg = mknode(3,s_id,fname,index);
1.6 noro 610: Pox_cmo_rpc(arg,rp);
1.1 noro 611: }
612:
613: #if 0
1.11 ! noro 614: void Parrayplot(NODE arg,Obj *rp)
1.1 noro 615: {
616: int s;
617: int id;
618:
619: if ( ID((Obj)ARG0(arg)) == O_VECT && ID((Obj)ARG1(arg)) == O_LIST ) {
620: s = current_s;
621: gensend(s,C_APLOT,0);
622: gensend(s,C_OBJ,ARG0(arg)); gensend(s,C_OBJ,ARG1(arg)); genflush(s);
623: }
624: genrecv(s,&id,rp);
625: }
626: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>