## proc drawcommands

Welcome Gallery Handbook

Manual page for proc_drawcommands(PL)

drawcom

## DESCRIPTION

proc drawcommands may be used to perform basic drawing operations such as lines, polygons, and text, in either absolute space or scaled space.

This may be a flexible way to add annotation, or to add graphics that the other plotting procedures cannot produce.``

The commands are interpreted, and should be given one per line.``

## EXAMPLE

An example of draw commands:

     #proc drawcommands
    commands:
      color blue
      linetype 0 2 1
      mov 1 1
      lin 1 2
      lin 2 2
      lin 1 1

A Gallery example where proc drawcommands is used is drawcom

## PREREQUISITES

None. If draw commands involving scaled space are used, proc areadef must have been executed to set up a plotting area.``

## MANDATORY ATTRIBUTES

Either `commands` or `file` containing commands (see below).``

## ATTRIBUTES

commands multiline-text

  A list of one or more draw commands. One command per line.`` Ends with a blank line.``

file filename

  A file containing draw commands.``

## THE DRAW COMMAND SET

Here is a summary of the draw command set.`` For an explanation of absolute units and scaled units, see scaleunits .``

  mov x y = move to (x,y) in absolute units

  lin x y = line to (x,y) in absolute units

  path x y = extend current polygon fill path to (x,y) in absolute units (see also `fill` below).``

  movs, lins, paths = same as above but for scaled units (assumes proc areadef has already been used to set up a scaled space).``

  movp, linp, pathp = same as above but operands may be in either absolute space or scaled space. If an operand ends with `(s)` it is assumed to be in scaled space; otherwise it is assumed to be in absolute space.``

  text s = display text string s left adjusted at current location

  centext s = display text string s centered around current location

  rightjust s = display text string s right-aligned to current location

  cblock x1 y1 x2 y2 color outline = 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.``

  fill = close and fill the polygon path with the current color.``

  mark x y sym r = produce a symbol at (x,y).`` sym is a graphcore data point symbol code as described in symboldetails . r is the radius in absolute units.``

  color c = set the current color to c

  textsize p = set the current text size to p points

  linetype style width dashscale = set the current line details.`` (See linedetails attribute type).``

  clr = clear the display

  backcolor c = set the current background color to c
  data display engine
  Copyright Steve Grubb

Markup created by unroff 1.0, `` `` June 18, 2001.