home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Vectronix 2
/
VECTRONIX2.iso
/
FILES_07
/
LATTIC_3.ZIP
/
EXAMPLES
/
POLY.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-05-14
|
1KB
|
57 lines
/*
* Demonstrate the Line-A polygon primitive
*
* lc -L poly.c
*
* Copyright (c) 1990 HiSoft
*/
#include <linea.h>
int main(void)
{
short pts[]={160,100,0,50,80,199,319,199,319,50,160,100};
short contrl[2];
short pattern[]=
{
0x0940, /* %0000 1001 0100 0000 */
0x0940, /* %0000 1001 0100 0000 */
0x0f40, /* %0000 1111 0100 0000 */
0x0940, /* %0000 1001 0100 0000 */
0x0940, /* %0000 1001 0100 0000 */
0x0000, /* %0000 0000 0000 0000 */
0x64dc, /* %0110 0100 1101 1100 */
0x8a88, /* %1000 1010 1000 1000 */
0xcac8, /* %1100 1010 1100 1000 */
0x2a88, /* %0010 1010 1000 1000 */
0xa488, /* %1100 0100 1000 1000 */
0x0000, /* %0000 0000 0000 0000 */
0x0000, /* %0000 0000 0000 0000 */
0x0000, /* %0000 0000 0000 0000 */
0x0000, /* %0000 0000 0000 0000 */
0x0000, /* %0000 0000 0000 0000 */
};
register int i;
linea0();
PTSIN=&pts;
CONTRL=&contrl;
contrl[1]=sizeof(pts)/(sizeof(short)*2)-1;
COLBIT0=1;
COLBIT1=1;
COLBIT2=1;
COLBIT3=1;
WMODE=0;
PATPTR=&pattern;
PATMSK=sizeof(pattern)/sizeof(short)-1;
MFILL=0;
CLIP=0;
Y1=0;
for (i=0; i<200; i++)
{
Y1++;
linea6();
}
}