home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
GLEN
/
L3SAMP.ZIP
/
REVERSE.C
< prev
next >
Wrap
Text File
|
1989-09-28
|
2KB
|
101 lines
/****************************************************************/
/* reverse.c */
/* */
/* patterned fonts on a black rule background using print model */
/* (CG times shadowed vertically in landscape mode) */
/* */
/* Date : 9-27-89 */
/****************************************************************/
#include <stdio.h>
#include <fcntl.h>
int description();
FILE *prn;
main()
{ /* beginning of main program */
/* initialization section */
int point_size=200, i,
shading, count=1, xoffset, yoffset;
prn = fopen("lpt1","wb"); /* open lpt1 for writing */
/* printer initialization */
fprintf(prn,"\33E"); /* send an esc E to reset printer */
fprintf(prn,"\33&l1O"); /* enable landscape mode */
fprintf(prn,"\33&a10L"); /* set left margin */
fprintf(prn,"\33*p250x225Y"); /* set cursor position */
fprintf(prn,"\33*c3000a1200B"); /* set rule size in dots */
fprintf(prn,"\33*c0P"); /* print rule */
/* landscape printout */
fprintf(prn,"\33*p350x1200Y"); /* set cursor position */
fprintf(prn,"\33*v0n1O"); /* source = transp, pattern = opaque */
fprintf(prn,"\33(s1p%dv1s3b5T"
,point_size); /* font select by attribute */
fprintf(prn,"Reverse");
for (i=0;i<100;i=i+5)
{
/* shaded print */
fprintf(prn,"\33*p350x1200Y"); /* set cursor position */
count++;
xoffset=count*15;
yoffset=count*10;
shading=100-i;
fprintf(prn,"\33*p-%dY",yoffset); /* set cursor position */
fprintf(prn,"\33*c%dG",shading); /* select % shading */
fprintf(prn,"\33*v2T"); /* select HP shading pattern */
fprintf(prn,"\33(s1p%dv1s3b5T"
,point_size); /* font select by attribute */
fprintf(prn,"Reverse");
}
fprintf(prn,"\r\33*p1800Y"); /* cursor position */
fprintf(prn,"\33*c100G",shading); /* select % shading */
fprintf(prn,"\33*v2T"); /* select HP shading pattern */
description();
fprintf(prn,"\f"); /* formfeed */
}
description()
{
fprintf(prn,"\33(s1p12v1s0b4101T"); /* select 12 pt CG Times Italic */
fprintf(prn,"Patterned fonts on a "
"black rule background.\n\n\r"
"- Shadowed CG Times\n\r"
"- Incremental Vertical Movement\n\r"
"- Opaque Pattern Transparency");
}