September, 99
TTPM2 Installation and Programming Manual
29
5.3.3 Graphics
printing
!F G
Format graphics for printing
TTPM2 can print bit map graphics. Graphic images are stored in the fixed memory area
and will therefore be repeated on every ticket until the next !C command is received.
Remember, when creating graphics for the TTPM2 printer, that the pixels are not square
but have a height/width ratio of 1.32:1.
Syntax for defining and downloading graphics data is as follows:
!F G <orientation> <xpos> <ypos> 1 <height> <width> 1_<Graphic_data>
!F
Command to load print parameter information.
G
Indicates graphics mode.
<orientation>
Print orientation. This is ignored in graphics mode. Orientation is al-
ways North (N). The printer requires the N to be inserted.
xpos
Horisontal starting position in pixels for the upper left-hand corner of
the graphics block. Position will automatically be rounded off to be di-
visible by 8 as a graphic block has to start at the first bit in a byte.
ypos
Vertical starting position in pixels for the upper left corner of the
graphics block.
1
Not used for graphics printing. Must be set to 1.
height
Height in pixel lines of the graphic block. The length of the ticket de-
termines maximum height. For an 86 mm ticket the maximum height is
approximately 500 pixel-lines.
width
Width
in bytes
of the graphic block. Maximum width is 48
bytes
.
1
Not used for graphics printing. Must be set to 1.
space
A space has to follow after the font selection before the graphics data.
Graphic_data
This is a block of bit mapped graphics data. The block is stored in the
printer starting at <xpos>, <ypos>. The numbers of bytes specified by
<width> are stored in one pixel line. The <ypos> is then incremented
and the next line is stored. This is repeated <height> number of times.
It is up to the user to send the correct number of bytes to the printer,
that is, <height> × <width>, as the printer will scan the input character
stream for the correct number of bytes.