Star Micronics NX-10 Printer User Manual


 
So when do you use graphics and when do you use download
characters? Practically anything you can do with graphics you
can do with download characters, and vice versa. A clever pro-
grammer could actually plot a mathematical curve using
download characters or use strings of graphics data as user-
defined characters. But why do it the hard way? There are
several instances when dot graphics is clearly the best way to ap-
proach the problem:
l If the graphics image to be printed is wider than 11 dots or
higher than 8 dots.
@If an image is to be printed just one time, as opposed to a
frequently used “text” character.
*If you want higher resolution (this printer can print as
many as 240 dots per inch in dot graphics mode; text mode,
which includes download characters, prints 60 dots per
inch .)
USING THE DOT GRAPHICS COMMANDS
The command to print normal density (60 dots per inch
horizontal; 72 dots per inch vertical) dot graphics uses this for-
mat:
(ESC,)“*“CHR$(O) nl n2 ml m2 . . .
Just like many of the other codes you have learned, the com-
mand starts with an escape sequence ((ES,>“*” in this case).
This is followed by CHR$(O),
which specifies normal density
(the other densities are described later in this chapter). But
unlike the other codes there can be any number of graphics data
bytes following the command. That’s where nl and n2 come in;
they are used to tell the printer how many bytes of graphics data
to expect.
m Specifying the number of columns of dots
To figure the values of nl and n2, you’ll need to figure out
how wide your graphics image will be (remember that there are
60 columns of dots per inch in normal density). Then comes the
fun part: converting one number (the number of columns of
dots) into two! Why is it necessary to use two numbers to tell the
printer the number of graphics codes to expect? Because the