Creating Graphics

Drawing Graphics Items

The item command, IT, can be used to display line drawings, text, grids, or markers. These tasks are shown in the following table.

 

Item Tasks

 

 

 

Task

 

Command

 

 

 

Draw lines

 

PA, PR

Displa y traces

 

GRAPH

Draw grids

 

GRID

Displa y text

 

TEXT, DSPLY

 

Displa y graphics marker

 

MK

 

 

 

A single item can be assigned to do only one task. For example, a single item cannot draw a box and display text. In this case, two items are required: one for the box, another for the text. Mixing item types generates a display error, indicated by \E" in the display status box.

In previous chapter examples, graphics were positioned with the PA and PR commands and were drawn by placing the pen down with the PD command. The IT mode di￿ers in that each item has its own pen, which is automatically in the down position. Thus, a pen-down command (PD) is not required.

Also, in IT mode, graphics are positioned with the OR command without the use of the PU or PD. Their shape, color, and appearance (or disappearance) is further modi￿ed by a variety of commands. For example, consider the following lines that draw a grid using normal graphics techniques:

100 OUTPUT 723;"PU;PA 500,500;PD;"

110 OUTPUT 723;"GRID 100,125,5,4;"

The same grid can be drawn using IT (OR positions the grid; PD is not needed.)

110 OUTPUT 723;"IT 1;OR 500,500;"

110 OUTPUT 723;"GRID 100,125,5,4;"

The pen starts at the item origin when the item is ￿rst drawn. The origin of the item is 0,0 unless speci￿ed otherwise with the OR command. If the origin is changed, the entire item moves. Notice that when the reference-graphics mode is o￿ (IT 0), graphics are always drawn at the current pen position and can never be moved.

5-12