=================================================================== RCS file: /home/cvs/OpenXM/src/asir-doc/parts/process.texi,v retrieving revision 1.2 retrieving revision 1.15 diff -u -p -r1.2 -r1.15 --- OpenXM/src/asir-doc/parts/process.texi 1999/12/21 02:47:31 1.2 +++ OpenXM/src/asir-doc/parts/process.texi 2003/05/16 08:12:58 1.15 @@ -1,4 +1,4 @@ -@comment $OpenXM$ +@comment $OpenXM: OpenXM/src/asir-doc/parts/process.texi,v 1.14 2003/04/20 08:01:26 noro Exp $ \BJP @node $BJ,;67W;;(B,,, Top @chapter $BJ,;67W;;(B @@ -28,16 +28,36 @@ @section OpenXM \BJP -@b{Asir} $B$O(B, $BJ,;67W;;$K$*$1$kDL?.%W%m%H%3%k$H$7$F(B, @b{OpenXM} -(Open message eXchange protocol for Mathematics) $B$r:NMQ$7$F$$$k(B. -@b{OpenXM} $B$O(B, $B +@end ifhtml +@code{http://www.math.sci.kobe-u.ac.jp/OpenXM/} +@ifhtml + +@end ifhtml +$B$r;2>H$7$F$[$7$$(B. + +@b{OpenXM} $B%W%m%H%3%k$O(B, $B +@end ifhtml +@code{http://www.math.sci.kobe-u.ac.jp/OpenXM/} +@ifhtml + +@end ifhtml +for the details of @b{OpenXM}. In @b{OpenXM} a distributed computation is done as follows: \E @@ -115,11 +135,11 @@ are available. @item @code{ox_push_cmo()} \JP $B%G!<%?$r(B server $B$N%9%?%C%/$K@Q$`(B -\EG It requests a server to push an object to the stack of the server. +\EG It requests a server to push an object to the stack of a server. @item @code{ox_pop_cmo()} \JP $B%G!<%?$r(B server $B$N%9%?%C%/$+$il(B -$B9g$K$O5/F0$G$-$J$$(B. $B$3$N>l9g@dBP%Q%9$rM?$($k$+(B, @samp{~/.cshrc} $B$N%5!<(B -$B%A%Q%9$K$=$N%W%m%0%i%`$N$"$k%G%#%l%/%H%j$rDI2C$9$kI,MW$,$"$k(B. $B$=$N:](B, -$BAj$rEPO?$9$k(B. @@ -617,6 +629,18 @@ UNIX $BHG$K$*$$$F$O(B, @code{ox_launch()} $B$O(B, @code{DISPLAY} $B$NCM$rMQ$$$k(B. @item +$B4D6-JQ?t(B @code{ASIR_RSH} $B$,%;%C%H$5$l$F$$$k>l9g(B, $B%5!<%P$NN)$A>e$2%W%m%0%i%`(B +$B$H$7$F(B@samp{rsh} $B$NBe$o$j$K$3$NJQ?t$NCM$,MQ$$$i$l$k(B. $BNc$($P(B, + +@example +% setenv ASIR_RSH "ssh -f -X -A " +@end example + +$B$K$h$j(B, $B%5!<%P$NN)$A>e$2$K(B @samp{ssh} $B$,MQ$$$i$l(B, +X11 $B$NDL?.$,(B forwarding $B$5$l$k(B. $B>\$7$/$O(B @samp{ssh} $B$N%^%K%e%"%k$r(B +$B;2>H(B. + +@item @code{ox_shutdown()} $B$O<1JL;R(B @var{id} $B$KBP1~$9$k1s3V%W%m%;%9(B $B$r=*N;$5$;$k(B. @@ -641,6 +665,7 @@ ox_xterm*saveLines:1000 $B$K$h$j(B, icon $B$G5/F0(B, scrollbar $B$D$-(B, scrollbar $B$G;2>H$G$-$k9T?t(B $B$,:GBg(B 1000 $B9T(B, $B$H$$$&;XDj$,$G$-$k(B. + \E \BEG @@ -653,7 +678,7 @@ is invoked on @var{host}. Then @samp{ox_launch} invoke If @var{host} is equal to 0, all the commands are invoked on the same machine as the @b{Asir} is running. If no arguments are specified, @var{host}, @var{dir} and @var{command} -are regarded as 0, the value of @code{get_rootdir()} and @samp{ox_dir} in +are regarded as 0, the value of @code{get_rootdir()} and @samp{ox_asir} in the same directory respectively. @item @@ -692,21 +717,6 @@ Here, Let @code{A} be the host on which @b{Asir} is ru @enumerate @item -Set the command search path of @code{csh} on the remote host @code{B} -so that your program, say @code{P}, can run on @code{B}. -This is done by putting the directory of @code{P} to the command search -path of @code{csh} on @code{B}. -The program @code{P} is invoked by @code{rsh} or @code{remsh}. -Thus, invocation of -the program @code{P} shall fail unless it is found within the search -path on the host @code{B}. -For such a case, you can run the program @code{P} by either giving -the absolute path or adding the directory of the program @code{P} to -the search path description in your @samp{~/.cshrc}. -Note that the the `directory' means the directory on the remote host -@code{B}. - -@item Register the hostname of the host @code{A} to the @samp{~/.rhosts} of the host @code{B}. That is, you should be allowed to access the host @code{B} from @code{A} @@ -718,6 +728,18 @@ let @code{Xserver} authorize the relevant hosts. Adding the hosts can be done by command @code{xhost}. @item +If an environment variable @code{ASIR_RSH} is set, +the content of this variable is used as a promgram to invoke +remote servers instead of @var{rsh}. For example, + +@example +% setenv ASIR_RSH "ssh -f -X -A " +@end example + +implies that remote servers are invoked by @samp{ssh} and that +X11 forwarding is enabled. See the manual of @samp{ssh} for the detail. + +@item Some @var{command}'s consume much stack space. You are recommended to set the stack size to about 16MB large in @samp{.cshrc} for safe. To specify the size, put @code{limit stacksize 16m} for an example. @@ -777,7 +799,7 @@ ox_xterm*saveLines:1000 \EG @item References @fref{ox_rpc ox_cmo_rpc ox_execute_string}, @fref{ox_pop_cmo ox_pop_local}, -@fref{ifplot conplot plot plotover} +@fref{ifplot conplot plot polarplot plotover} @end table \JP @node ox_launch_generic,,, $BJ,;67W;;$K4X$9$k4X?t(B @@ -798,10 +820,10 @@ ox_xterm*saveLines:1000 @item host \JP $BJ8;zNs$^$?$O(B 0 \EG string or 0 -@item launcher, server +@item launcher server \JP $BJ8;zNs(B \EG string -@item use_unix, use_ssh, use_x, conn_to_serv +@item use_unix use_ssh use_x conn_to_serv \JP $B@0?t(B \EG integer @end table @@ -946,10 +968,10 @@ the client executes @code{connect}. @item host \JP $BJ8;zNs(B \EG string -@item port,control_port,server_port +@item port control_port server_port \JP $B@0?t$^$?$OJ8;zNs(B \EG integer or string -@item socket,control_socket,server_socket +@item socket control_socket server_socket \JP $B@0?t(B \EG integer @end table @@ -1083,7 +1105,8 @@ If X environment is not available or is not necessary, @end example @example -[5] ox_launch_nox("127.0.0.1","/usr/local/lib/asir","/usr/local/lib/asir/ox_asir"); +[5] ox_launch_nox("127.0.0.1","/usr/local/lib/asir", +"/usr/local/lib/asir/ox_asir"); 0 @end example @@ -1091,7 +1114,8 @@ If X environment is not available or is not necessary, [7] RemoteLibDir = "/usr/local/lib/asir/"$ [8] Machines = ["sumire","rokkaku","genkotsu","shinpuku"]; [sumire,rokkaku,genkotsu,shinpuku] -[9] Servers = map(ox_launch,Machines,RemoteLibDir,RemoteLibDir+"ox_asir"); +[9] Servers = map(ox_launch,Machines,RemoteLibDir, +RemoteLibDir+"ox_asir"); [0,1,2,3] @end example @@ -1128,7 +1152,7 @@ If X environment is not available or is not necessary, @item command \JP $BJ8;zNs(B \EG string -@item arg0, arg1, ... +@item arg0 ... \JP $BG$0U(B ($B0z?t(B) \EG arbitrary (arguments) @end table @@ -1203,9 +1227,9 @@ The result is pushed to the stack. @fref{ox_pop_cmo ox_pop_local} @end table -\JP @node ox_reset register_handler,,, $BJ,;67W;;$K4X$9$k4X?t(B -\EG @node ox_reset register_handler,,, Functions for distributed computation -@subsection @code{ox_reset},@code{register_handler} +\JP @node ox_reset ox_intr register_handler,,, $BJ,;67W;;$K4X$9$k4X?t(B +\EG @node ox_reset ox_intr register_handler,,, Functions for distributed computation +@subsection @code{ox_reset},@code{ox_intr},@code{register_handler} @findex ox_reset @findex register_handler @@ -1213,6 +1237,9 @@ The result is pushed to the stack. @item ox_reset(@var{number}) \JP :: $B%W%m%;%9$N%j%;%C%H(B \EG :: Resets an OpenXM server +@item ox_intr(@var{number}) +\JP :: $B%W%m%;%9$N$K(B @code{SIGINT} $BAwIU(B +\EG :: Sends @code{SIGINT} to an OpenXM server @item register_handler(@var{func}) \JP :: $B%W%m%;%9$N%j%;%C%H$N$?$a$N4X?tEPO?(B \EG :: Registers a function callable on a keyboard interrupt. @@ -1247,8 +1274,15 @@ The result is pushed to the stack. $B7W;;ESCf$G$N6/@)CfCG$KMQ$$$k(B. @item +@code{ox_intr()} $B$O(B, $B<1JL;R(B @var{number} $B$N%W%m%;%9$r$KBP$7$F(B +@code{SIGINT} $B$rAwIU$9$k(B. @code{SIGINT} $B$KBP$9$k%W%m%;%9$NF0:n$O(B +$B5,Dj$5$l$F$$$J$$$,(B, @samp{ox_asir} $B$N>l9g(B, $B$?$@$A$K(B debug mode $B$K(B +$BF~$k(B. X $B>e$GF0:n$7$F$$$k>l9g(B, $B%G%P%C%0%3%^%s%IF~NOMQ$N%&%#%s%I%&$,(B +$B%]%C%W%"%C%W$9$k(B. + +@item @code{register_handler()} $B$O(B, @kbd{C-c} $B$J$I$K$h$k3d$j9~$_$N:]$K(B, -@kbd{u} $B$r;XDj$9$k$3$H$G(B, $BL50z?t%f!<%6Dj5A4X?t(B @var{func()} $B$,8F$S=P$5$l$k(B +@kbd{u} $B$r;XDj$9$k$3$H$G(B, $BL50z?t%f!<%6Dj5A4X?t(B @var{func}() $B$,8F$S=P$5$l$k(B $B$h$&$K@_Dj$9$k(B. $B$3$N4X?t$K(B, @code{ox_reset()} $B$r8F$S=P$5$;$k$3$H$G(B, $B3d$j9~$_$N:]$K<+F0E*$K(B @b{OpenXM} server $B$N%j%;%C%H$r9T$&$3$H$,$G$-$k(B. @@ -1273,10 +1307,16 @@ Even if a process is running, the execution is safely It can be also used to interrupt a distributed computation. @item -@code{register_handler()} registers a function @var{func()}. -If @kbd{u} is specified on a keybord interrupt, @var{func()} +@code{ox_intr()} sends @code{SIGINT} to a process whose identifier is +@var{number}. The action of a server against @code{SIGINT} is not +specified in @b{OpenXM}. @samp{ox_asir} immediately enters the debug +mode and pops up an window to input debug commands on X window system. + +@item +@code{register_handler()} registers a function @var{func}(). +If @kbd{u} is specified on a keybord interrupt, @var{func}() is executed before returning the toplevel. -If @code{ox_reset()} calls are included in @var{func()}, +If @code{ox_reset()} calls are included in @var{func}(), one can automatically reset @b{OpenXM} servers on a keyboard interrupt. @item @@ -1426,14 +1466,16 @@ Finally call @code{ox_get} for a ready process. @end itemize @example -[3] ox_rpc(0,"fctr",x^100-y^100); +[341] ox_cmo_rpc(0,"fctr",x^2-1); 0 -[4] ox_push_cmd(0,258); +[342] ox_pop_cmo(0); +[[1,1],[x-1,1],[x+1,1]] +[343] ox_cmo_rpc(0,"newvect",3); 0 -[5] ox_select([0]); -[0] -[6] ox_get(0); -[[1,1],[x^2+y^2,1],[x^4-y*x^3+y^2*x^2-y^3*x+y^4,1],...] +[344] ox_pop_cmo(0); +error([41,cannot convert to CMO object]) +[345] ox_pop_local(0); +[ 0 0 0 ] @end example @table @t @@ -1504,10 +1546,21 @@ Usually @b{OX_SYNC_BALL} will be ignored by the peer. \E @end itemize +@example +[3] ox_rpc(0,"fctr",x^100-y^100); +0 +[4] ox_push_cmd(0,258); +0 +[5] ox_select([0]); +[0] +[6] ox_get(0); +[[1,1],[x^2+y^2,1],[x^4-y*x^3+y^2*x^2-y^3*x+y^4,1],...] +@end example + @table @t \JP @item $B;2>H(B \EG @item References -@fref{ox_rpc ox_cmo_rpc ox_execute_string}, @fref{ox_reset register_handler} +@fref{ox_rpc ox_cmo_rpc ox_execute_string}, @fref{ox_reset ox_intr register_handler} @end table \JP @node ox_get,,, $BJ,;67W;;$K4X$9$k4X?t(B @@ -1576,7 +1629,7 @@ is realized as combinations of @code{ox_push_cmd} and @findex ox_pops @table @t -@item ox_pops(@var{number}[,@var{nitem}) +@item ox_pops(@var{number}[,@var{nitem}]) \JP :: $B%W%m%;%9<1JL;R(B @var{number} $B$N%W%m%;%9$N%9%?%C%/$+$i%G!<%?$re$G$NNmE@$N(B $B%0%i%U$NI=<($r9T$&(B. @code{conplot()} $B$O(B, $BF1MM$N0z?t$KBP$7(B, -$BEy9b@~$NI=<($r9T$&(B. @code{plot()} $B$O(B 1 $BJQ?t4X?t$N(B -$B%0%i%U$NI=<($r9T$&(B. Windows $BHG$O8=>u$G$OL$%5%]!<%H$G$"$k(B. +$BEy9b@~$NI=<($r9T$&(B. +@code{plot()} $B$O(B 1 $BJQ?t4X?t$N%0%i%U$NI=<($r9T$&(B. +@code{polarplot()} $B$O(B $B6K7A<0(B @var{r}=@var{f}(@var{theta}) $B$GI=$5$l$?6J@~$N%0%i%U$NI=<($r9T$&(B. @item -UNIX $BHG$O(B, $B1s3V%W%m%;%9$K$h$je$G$O(B +@samp{ox_plot} $B$,(B, Windows $B>e$G$O(B @samp{engine} $B$,$3$l$i$N5!G=(B +$B$rDs6!$7$F$*$j(B, $B$3$l$i$O(B @b{Asir} $B$NI8=`%i%$%V%i%j%G%#%l%/%H%j$K$"$k(B. +$B%"%/%F%#%V$J(B @samp{ox_plot} $B$N(B id $B$,(B @var{id} $B$H$7$F;XDj$5$l$?>l9g(B, +$B$=$N%5!<%P$,MQ$$$i$l$k(B. id $B$N;XDj$,$J$$>l9g$K$O(B, $B5/F0$5$l$F(B +$B$$$k%5!<%P$N$&$A(B, @samp{ox_plot} $B$,$"$l$P$=$N%5!<%P$,MQ$$$i$l$k(B. +@samp{ox_plot} $B$,5/F0$5$l$F$$$J$$>l9g$K$O(B, +@code{ox_launch_nox()} $B$,<+F0E*$Ke$,$j(B, $B$=$l$,MQ$$$i$l$k(B. @item $B0z?t$NFb(B, @var{func} $B$OI,?\$G$"$k(B. $B$=$NB>$N0z?t$O%*%W%7%g%s$G$"$k(B. @@ -1909,12 +1977,12 @@ UNIX $BHG$O(B, $B1s3V%W%m%;%9$K$h$jl9g(B, @var{func} $B$K4^$^$l$kJQ?t$NFbJQ?t=g=x$N>e$NJQ?t(B $B$,(B @samp{x}, $B2<$NJQ?t$,(B @samp{y} $B$H$7$F07$o$l$k(B. $B$3$l$rHr$1$k$?$a$K$O(B @var{xrange}, @var{yrange} $B$r;XDj$9$k(B. $B$^$?(B, @var{func} $B$,(B 1 $BJQ?t$N(B @@ -1922,9 +1990,9 @@ UNIX $BHG$O(B, $B1s3V%W%m%;%9$K$h$jl9g$N$_;XDj$G$-$k(B. $B7A<0$O(B -@var{[v,vmin,vmax} @code{[},@var{step} @code{]}@var{]} $B$G(B, @var{step} $B$,;XDj$5$l(B -$B$?>l9g$K$O(B, $BEy9b@~$N4V3V$,(B @var{(vmax-vmin)/step} $B$H$J$k(B. -(@var{[z},@code{-2},@code{2},@code{16}@var{]}.) +[@var{v},@var{vmin},@var{vmax} @code{[},@var{step} @code{]}] $B$G(B, @var{step} $B$,;XDj$5$l(B +$B$?>l9g$K$O(B, $BEy9b@~$N4V3V$,(B (@var{vmax}-@var{vmin})/@var{step} $B$H$J$k(B. +([@var{z},@code{-2},@code{2},@code{16}].) @item id $B1s3V%W%m%;%9$NHV9f(B, $B$9$J$o$A(B @code{ox_launch()} $B$,JV$7$?HV9f$r;XDj$9$k(B. @@ -2009,13 +2077,20 @@ Function @code{ifplot()} draws a graph of real zeros o function. Function @code{conplot()} plots the contour lines for a same argument. Function @code{plot()} draws the graph of a uninivariate function. -These functions are available on UNIX version (on @code{X11}). +Function @code{polarplot()} draws the graph of a curve given in polar form +@var{r}=@var{f}(@var{theta}). @item -The plotting functions for UNIX version are realized on remote process -facilities described previously. -The command for this is @samp{ox_plot} in @b{Asir} root directory. -Of course, it must be activated by @code{ox_launch()}. +The plotting functions are realized by an OpenXM server. +On UNIX it is @samp{ox_plot} in @b{Asir} root directory. +On Windows @samp{engine} acts as @samp{ox_plot}. +Of course, it must be activated by @code{ox_launch()} @code{ox_launch_nox()}. +If the identifier of an active @samp{ox_plot} is specified as @var{id}, +the server is used for drawing pictures. +If @var{id} is not specified, an available @samp{ox_plot} server +is used if it exists. If no @samp{ox_plot} server is available, +then @code{ox_launch_nox()} is automatically executed to +invoke @samp{ox_plot}. @item Argument @var{func} is indispensable. Other arguments are optional. @@ -2024,12 +2099,12 @@ are listed below. @table @var @item geometry -Window size is specified by @var{[x,y]} in unit `dot.' -(@var{[}@code{300},@code{300}@var{]} for UNIX version; +Window size is specified by [@var{x},@var{y}] in unit `dot.' +[@code{300},@code{300}] for UNIX version; -@item xrange, yrange -Value ranges of the variables are specified by @var{[v,vmin,vmax]}. -(@var{[v},@code{-2},@code{2}@var{]} for each variable.) +@item xrange yrange +Value ranges of the variables are specified by [@var{v},@var{vmin},@var{vmax}]. +([@var{v},@code{-2},@code{2}] for each variable.) If this specification is omitted, the indeterminate having the higher order in @var{func} is taken for @samp{x} and the one with lower order is taken for @samp{y}. To change this selection, specify explicitly @@ -2038,10 +2113,10 @@ For an uni-variate function, the specification is mand @item zrange This specification applies only to @code{conplot()}. The format is -@var{[v,vmin,vmax} @code{[},@var{step} @code{]}@var{]}. +[@var{v},@var{vmin},@var{vmax} @code{[},@var{step} @code{]}]. If @var{step} is specified, the height difference of contours is set to -@var{(vmax-vmin)/step}. -(@var{[z},@code{-2},@code{2},@code{16}@var{]}.) +(@var{vmax}-@var{vmin})/@var{step}. +([@var{z},@code{-2},@code{2},@code{16}].) @item id This specifies the number of the remote process by which you wish @@ -2095,7 +2170,7 @@ the window. @item Several operations are available on the window: by button operations -for UNIX version, and pull-down menus for Macintosh version. +for UNIX version, and pull-down menus for Windows version. @table @code @item quit @@ -2166,5 +2241,139 @@ plot*form*ydone*background:white @table @t \JP @item $B;2>H(B \EG @item References -@fref{ox_launch ox_launch_nox ox_shutdown}, @fref{ox_reset register_handler} +@fref{ox_launch ox_launch_nox ox_shutdown}, @fref{ox_reset ox_intr register_handler} +@end table + +\JP @node open_canvas clear_canvas draw_obj draw_string,,, $BJ,;67W;;$K4X$9$k4X?t(B +\EG @node open_canvas clear_canvas draw_obj draw_string,,, Functions for distributed computation +@subsection @code{open_canvas}, @code{clear_canvas}, @code{draw_obj}, @code{draw_string} +@findex open_canvas +@findex clear_canvas +@findex draw_obj +@findex draw_string + +@table @t +@item open_canvas(@var{id}[,@var{geometry}]) +\JP :: $BIA2hMQ%&%#%s%I%&(B ($B%-%c%s%P%9(B) $B$r@8@.$9$k(B. +\EG :: Opens a canvas, which is a window for drawing objects. +@item clear_canvas(@var{id},@var{index}) +\JP :: $B%-%c%s%P%9$r%/%j%"$9$k(B. +\EG :: Clears a canvas. +@item draw_obj(@var{id},@var{index},@var{pointorsegment} [,@var{color}]) +\JP :: $B%-%c%s%P%9>e$KE@$^$?$O@~J,$rIA2h$9$k(B. +\EG :: Draws a point or a line segment on a canvas. +@item draw_string(@var{id},@var{index},[@var{x},@var{y}],@var{string} [,@var{color}]) +\JP :: $B%-%c%s%P%9>e$KJ8;zNs$rIA2h$9$k(B. +\EG :: Draws a character string on a canvas. +@end table + +@table @var +@item return +0 +@item id index color x y +\JP $B@0?t(B +\EG integer +@item pointorsegment +\JP $B%j%9%H(B +\EG list +@item string +\JP $BJ8;zNs(B +\EG character string +@end table + +@itemize @bullet +@item +\BJP +$B$3$l$i$O(B OpenXM $B%5!<%P(B @samp{ox_plot} (Windows $B>e$G$O(B @samp{engine}) +$B$K$h$jDs6!$5$l$k(B. +\E +\BEG +These functions are supplied by the OpenXM server @samp{ox_plot} +(@samp{engine} on Windows). +\E +@item +\BJP +@code{open_canvas} $B$O(B, $BIA2hMQ$N%&%#%s%I%&(B($B%-%c%s%P%9(B)$B$r@8@.$9$k(B. +@var{geometry} $B$K$h$j%&%#%s%I%&$N%5%$%:$r(B pixel $BC10L$G(B [@var{x},@var{y}] $B$G;XDj$9$k(B. +default size $B$O(B [@code{300},@code{300}]. +$B%-%c%s%P%9$N<1JL;R$H$7$F(B, $B@0?tCM$r(B OpenXM $B%5!<%P$N%9%?%C%/$K(B push $B$9$k(B. +$B$3$N<1JL;R$O(B @code{draw_obj} $B$N8F$S=P$7$KI,MW$G$"$j(B, @code{ox_pop_cmo} $B$K(B +$B$h$jl9gE@$N:BI8(B, [@var{x},@var{y},@var{u},@var{v}] $B$N>l9g(B [@var{x},@var{y}], +[@var{u},@var{v}] $B$r7k$V@~J,$rI=$9$H8+$J$5$l$k(B. +$B%-%c%s%P%9$N:BI8$O(B, $B:8>e6y$r86E@$H$7$F2#J}8~$K(B +$BBh0l:BI8(B, $B=DJ}8~$KBhFs:BI8$r$H$k(B. $BCM$O(B pixel $BC10L$G;XDj$9$k(B. +@var{color} $B$N;XDj$,$"$k>l9g(B, @var{color/65536} mod 256, +@var{color/256} mod 256, @var{color} mod 256 $B$r$=$l$>$l(B Red, Green, Blue +$B$NCM(B ($B:GBg(B 255) $B$H$_$J$9(B. +\E +\BEG +@code{draw_obj} draws a point or a line segment on +a canvas specified by a server id @var{id} and a canvas id @var{index}. +If @var{pointorsegment} is [@var{x},@var{y}], it is regarded as a point. +If @var{pointorsegment} is [@var{x},@var{y},@var{u},@var{v}], it is regarded +as a line segment which connects [@var{x},@var{y}] and [@var{u},@var{v}]. +If @var{color} is specified, @var{color/65536} mod 256, +@var{color/256} mod 256, @var{color} mod 256 are regarded as the vaules +of Red, Green, Blue (Max. 255) respectively. +\E +@item +\BJP +@code{draw_string} $B$O(B, $B%5!<%P(B id @var{id}, $B%-%c%s%P%9(B id @var{index} +$B$G;XDj$5$l$k%-%c%s%P%9$KJ8;zNs$rIA2h$9$k(B. $B0LCV$O(B [@var{x},@var{y}] $B$K$h$j;XDj$9$k(B. +\E +\BEG +@code{draw_string} draws a character string @var{string} on +a canvas specified by a server id @var{id} and a canvas id @var{index}. +The position of the string is specified by [@var{x},@var{y}]. +\E +@end itemize + +@example +[182] Id=ox_launch_nox(0,"ox_plot"); +0 +[183] open_canvas(Id); +0 +[184] Ind=ox_pop_cmo(Id); +0 +[185] draw_obj(Id,Ind,[100,100]); +0 +[186] draw_obj(Id,Ind,[200,200],0xffff); +0 +[187] draw_obj(Id,Ind,[10,10,50,50],0xff00ff); +0 +[187] draw_string(Id,Ind,[100,50],"hello",0xffff00); +0 +[189] clear_canvas(Id,Ind); +0 +@end example + +@table @t +\JP @item $B;2>H(B +\EG @item References +@fref{ox_launch ox_launch_nox ox_shutdown}, @fref{ox_reset ox_intr register_handler}, @fref{ox_pop_cmo ox_pop_local}. @end table