Download S4500THS Developers Manual (RevE)

Transcript
Graphic String
Component
Function of the component
An eight bit value representing the number of dot-lines contained in the following
data set
WIDTH
An eight bit value representing the number of bytes to be contained in each dot-line
(# of bytes in each line) of the following data set
An Eight bit value which describes how the following data will be processed
{127 ≥ Counter ≥ 0 } Process the next (Counter + 1 ) bytes of data as 8 bit graphics.
For Signed Values
{0 > Counter ≥ -128} Repeat the next single byte of data (( -Counter) + 1) times.
COUNTER
HEIGHT(# of lines)
{ 127 ≥ Counter ≥ 0} Process the next (Counter+1) bytes of data as 8 bit graphics
For Unsigned Values
{128 ≥ Counter ≤ 255} Repeat the next Singe byte of data, (( 256 – Counter)+1) times
Table 3.2 - Components of the compressed graphics command string
COMPRESSED GRAPHICS EXAMPLE:
The following graphics data is to be printed:
This data may be represented in hexadecimal:
0x55
0x55
0x55
0x00
0x00
0x55
0x00
0x55
0xAA
0x55
0x11
0x55
The RLE compressed graphics command:
ESC ‘v’ height width counterdata…
DEC 27 118 2
6
255
85
255 0
3
170 17 85 0
253 85
HEX 0x1B 0x76 0x02 0x06 0xFF 0x55 0xFF0x000x030xAA0x110x55 0x000xFD 0x55
14 of 57
4500T_Developers_Manual(RevE).doc - 1/4/2008