The coordinates are interpreted as absolute if the command is not preceded
by a PR command.
PE (polyline encoded) ([flag, value or coordinate pair, . . ..flag. value or
coordinate pair])
flag: character
value: character encoded
coordinates: character encoded
With this command, there should be no separators between parameters, and
the command terminator <;> must be used.
The meanings of and relation between parameters are as given in the
following table:
flag (hex ASCII) next parameter
3AorBA : select pen pen number, encoded as base 64 or
32
3CorBC < pen UP coordinates of point to move to,
encoded as base 64 or 32
3EorBE > fraction number of fraction bits contained
in coordinate, encoded as base 64
or 32
3DorBD = start PA coordinates
37 or B7 7 start base 32 encoding
Pen number specifies the pen to be used: 0 - 8 (see SP)
Number of fraction bits: from -26 to +26
When there am no parameters, this command ‘updates’ the carriage-return
point.
When there are parameters, it draws lines by sending a shorter string of data
than other commands, since all parameters other than flags am encoded. In
the polygon mode, the coordinates are stored in the polygon buffer.
The encoding uses base 64 if not otherwise specified by flag = 7. The
algorithm for encoding number x is as follows:
1. let d be the number of decimal places in x, and set
n= round (3.33 * d)
x= round (x * 2%)
2. ifx>=O,setx=2*x
otherwisesetx=2*-X+1
3. transform x to base 64[32]: let al, a2, a3, . . ..an be the ‘digits’, with al the
most significant.
107