home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Vectronix 2
/
VECTRONIX2.iso
/
FILES_07
/
LATTIC_3.ZIP
/
EXAMPLES
/
TEXT.C
< prev
Wrap
C/C++ Source or Header
|
1990-05-14
|
1KB
|
64 lines
/*
* Demonstrate the Line-A text routines
*
* lc -L text.c
*
* Copyright (c) 1990 HiSoft
*/
#include <linea.h>
#include <string.h>
int main(void)
{
register int i;
linea0();
for (i=0; i<0x20; i++)
{
register const char *s="Hello World";
register char c;
if (i>=0x10)
DSTX=V_X_MAX/2;
else
DSTX=0;
while (c=*s++)
{
short x[500];
TEXTFG=1;
TEXTBG=0;
STYLE=i;
c-=V_DEF_FONT->font_low_ade;
SRCX=V_DEF_FONT->font_char_off[c];
SRCY=0;
DELX=V_DEF_FONT->font_char_off[c+1]-SRCX;
DELY=V_DEF_FONT->font_height;
FBASE=V_DEF_FONT->font_data;
FWIDTH=V_DEF_FONT->font_width;
LITEMSK=V_DEF_FONT->font_lightening;
SKEWMSK=V_DEF_FONT->font_skewing;
WEIGHT=V_DEF_FONT->font_thickening;
if (STYLE & 1<<2) /* skewed */
{
ROFF=V_DEF_FONT->font_right_off;
LOFF=V_DEF_FONT->font_left_off;
}
else
ROFF=LOFF=0;
SCALE=0;
XDDA=0x8000;
DDAINC=256;
SCALDIR=0;
CHUP=0;
MONO=0;
SCRTCHP=x;
SCRPT2=sizeof(x)/2;
CLIP=0;
DSTY=(i&0xf)*V_DEF_FONT->font_height;
linea8();
}
}
}