.ig >>
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
-->
</STYLE>
<title>ploticus: proc drawcommands</title>
<body bgcolor=D0D0EE vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
<td>
  <table cellpadding=2 width=550><tr>
  <td><br><h2>proc drawcommands</h2></td>
  <td align=right>
  <small>
  <a href="../doc/Welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
  <a href="../doc/Welcome.html">Welcome</a> &nbsp; &nbsp;
  <a href="../gallery/index.html">Gallery</a> &nbsp; &nbsp;
  <a href="../doc/Contents.html">Handbook</a> 
  <td></tr></table>
</td></tr>
<td>
<br>
<br>
.>>

.TH proc_drawcommands PL "11-JAN-2002   PL ploticus.sourceforge.net"

.LP
.ig >>
<center><a href="../gallery/drawcom.htm">drawcom<br><img src="../gallery/drawcom.gif"></a></center>
.>>

.SH DESCRIPTION
\fBproc drawcommands\fR may be used to perform basic drawing operations
such as lines, polygons, and text, in either absolute space
or scaled space.  
.LP
This may be a flexible way to add annotation, 
or to add graphics that the other plotting procedures cannot produce.
.LP
The commands are interpreted, and should be given one per line.

.SH EXAMPLE
An example of draw commands:
.nf
.ft C
\0#proc drawcommands
commands:
  color blue
  linetype 0 2 1
  mov 1 1
  lin 1 2
  lin 2 2
  lin 1 1
.ft R
.fi
.LP
A Gallery example where \fBproc drawcommands\fR is used is
.ig >>
<a href="../gallery/drawcom.htm">
.>>
 drawcom 
.ig >>
</a>
.>>

.SH PREREQUISITES
None.  If draw commands involving scaled space are used,
\fBproc areadef\fR must have been executed to set up a plotting area.


.SH MANDATORY ATTRIBUTES
Either \fCcommands\fR or \fCfile\fR containing commands (see below).


.SH ATTRIBUTES
.LP
\fBcommands\fR 
.ig >>
<a href="attributetypes.html#text">
.>>
\fI multiline-text \fR
.ig >>
</a>
.>>
.IP
A list of one or more draw commands.  One command per line.
Ends with a blank line.

.LP
\fBfile\fR \fIfilename\fR
.IP
A file containing draw commands.  May be \fCstdin\fR to
read draw commands from standard input.

.ig >>
<a name=commandset></a>
.>>

.ig >>
<br><br><br>
.>>

.SH THE DRAW COMMAND SET
Here is a summary of the draw command set.
For an explanation of absolute units and scaled units, see
.ig >>
<a href="scaleunits.html">
.>>
scaleunits
.ig >>
</a>
.>>
 .
.IP
mov \fIx y\fR = move to (x,y) in absolute units
.IP
lin \fIx y\fR = line to (x,y) in absolute units
.IP
path \fIx y\fR = extend current polygon fill path to (x,y) in absolute units
(see also \fCfill\fR below).
.IP
movs, lins, paths = same as above but for scaled units (assumes \fBproc areadef\fR
has already been used to set up a scaled space).
.IP
movp, linp, pathp = same as above but operands 
may be in either
absolute space or scaled space.  If an operand ends with \fC(s)\fR
it is assumed to be in scaled space; otherwise it is assumed to
be in absolute space.
.IP
text \fIs\fR = display text string s left adjusted at current location
.IP
centext \fIs\fR = display text string s centered around current location
.IP
rightjust \fIs\fR = display text string s right-aligned to current location
.IP
cblock \fIx1 y1 x2 y2 color outline\fR = display a colored rectangle.  The
lower left is at (x1,y1) in absolute units; upper right is at (x2,y2) 
in absolute units; color is
the color; outline is 1 to produce an outline, 0 not.
.IP
fill = close and fill the polygon path with the current color.
.IP
mark 
.ig >>
<a href="attributetypes.html#xy">
.>>
\fI x y 
.ig >>
</a>
.>>
sym r\fR = produce a symbol at (x,y).
sym is a graphcore data point symbol code as described
in 
.ig >>
<a href="symboldetails.html">
.>>
 symboldetails 
.ig >>
</a>
.>>
  .  r is the radius in absolute units.
.IP
color \fIc\fR = set the current color to c
.IP
textsize \fIp\fR = set the current text size to p points
.IP
linetype style width dashscale = set the current line details.
(See \fIlinedetails\fR attribute type).
.IP
clr = clear the display
.IP
backcolor \fIc\fR = set the current background color to c

.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="Welcome.html">
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine &nbsp; <br>
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
<br>
<br>
<center>
<img src="../gallery/all.gif">
</center>
</td></tr>
</table>
.>>
