home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_01_02
/
1n02022a
< prev
next >
Wrap
Text File
|
1990-07-09
|
1KB
|
36 lines
#include <stdio.h>
/******************************************************************
* lj_raster - Output one line of raster (bit) data
*
* Parameters:
* x (in) - starting x position in dots
* y (in) - starting y position in dots
* length (in) - length of data to output in bytes
* data (in) - character array of data
*
* Notes:
* 1. Bit 7 of each byte is left most bit on display.
*
* 2. In landscape mode, line will be output vertically (top to
* bottom).
*
* Copyright:
* Original code by William H. Roetzheim (619) 669-6970
**********************************************************************/
void lj_raster (int x, int y, int length, char *data)
{
int i;
fprintf (stdprn, "\033*p%dx%dY", x, y); /* cursor to x,y posit */
fprintf (stdprn, "\033*r1A"); /* start raster graphics */
fprintf (stdprn, "\033*b%dW", length); /* set length of data */
for (i = 0; i < length; i++)
{
putc (data[i], stdprn);
}
fprintf(stdprn, "\033*rB"); /* end raster graphics */
}