home *** CD-ROM | disk | FTP | other *** search
-
- USES
- crt,
- graph,
- TEGLfont,
- TEGLIntr,
- FastGrph;
-
- const
- TEGLBackPattern : FillPatternType = ($AA,$55,$AA,$55,$AA,$55,$AA,$55);
-
- var
- ch : char;
- i : word;
-
- procedure waitforkey;
- begin
- while keypressed do ch:=readkey;
- while not keypressed do;
- while keypressed do ch:=readkey;
- end;
-
- procedure hpixline(x,y,x1,c:word);
- var i:word;
- begin
- for i:=x to x1 do
- putpixs(i,y,c);
- end;
-
- procedure vpixline(x,y,y1,c:word);
- var i:word;
- begin
- for i:=y to y1 do
- putpixs(x,i,c);
- end;
-
- procedure TestAllLines(x,y:word; msg:string; rmw,color:word);
- var mx,my,x1,y1 : word;
- begin
- RmwBits := FGNorm;
- fonttable := @font09;
- setcolor(white);
- outtegltextxy(x,y,msg);
-
- RmwBits := rmw;
- inc(y,10);
- mx := 40;
- my := 40;
- x1 := x+80;
- y1 := y+80;
-
- setfillstyle(solidfill,white);
- bar(x,y,x1,y1);
- setfillstyle(solidfill,black);
- bar(x+10,y+10,x1-10,y1-10);
-
- fastline(x,y+my,x+mx,y+my,color); {horizontal line}
- fastline(x+mx,y,x+mx,y+my,color); {vertical line}
-
- hpixline(x+mx,y+my,x1,color); {horizontal line}
- vpixline(x+mx,y+my,y1,color); {vertical line}
-
-
-
- fastline(x,y,x1,y1,color); {slope line}
- fastline(x,y1,x1,y,color); {slope line}
-
- fastline(x,y+(my div 2),x+mx,y+my,color); {slope line}
- fastline(x1,y+(my div 2),x+mx,y+my,color); {slope line}
- fastline(x,y+my+(my div 2),x+mx,y+my,color); {slope line}
- fastline(x1,y+my+(my div 2),x+mx,y+my,color); {slope line}
-
- fastline(x+(mx div 2),y,x+mx,y+my,color); {slope line}
- fastline(x+mx+(mx div 2),y,x+mx,y+my,color); {slope line}
- fastline(x+(mx div 2),y1,x+mx,y+my,color); {slope line}
- fastline(x+mx+(mx div 2),y1,x+mx,y+my,color); {slope line}
- end;
-
- procedure testchars(x,y,color,rmw:word; msg:string);
- begin
- RmwBits := fgnorm;
- setcolor(white);
- fonttable := @font09;
- outtegltextxy(0,y,msg);
-
- fonttable := @font14;
- RmwBits := rmw;
- setcolor(color);
- setfillstyle(solidfill,white);
- bar(x+((getmaxx-x) div 2),y,getmaxx,y+teglcharheight);
- outtegltextxy(x,y,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890');
- end;
-
- begin
- CGA640x200x2;
- Init_TEGLIntr;
- setmouseminmax(0,0,getmaxx,getmaxy);
-
- TestAllLines(10,0,'FGNORM',FGNorm,white);
- TestAllLines(10,100,'FGNORM',FGNorm,black);
-
- TestAllLines(100,0,'FGNOT',FGNot,white);
- TestAllLines(100,100,'FGNOT',FGNot,black);
-
- TestAllLines(200,0,'FGAND',FGAnd,white);
- TestAllLines(200,100,'FGAND',FGAnd,black);
-
- TestAllLines(300,0,'FGXOR',FGXor,white);
- TestAllLines(300,100,'FXOR',FGXor,black);
-
- TestAllLines(400,0,'FGOR',FGOr,white);
- TestAllLines(400,100,'FOR',FGOr,black);
-
- showmouse;
- waitforkey;
- hidemouse;
-
- cleardevice;
-
- fonttable := @font14;
- testchars(70,0,white,FGNORM,'FGNORM');
- testchars(70,teglcharheight+2,black,FGNORM,'FGNORM');
-
- testchars(70,2*(teglcharheight+2),white,FGAND,'FGAND');
- testchars(70,3*(teglcharheight+2),black,FGAND,'FGAND');
-
- testchars(70,4*(teglcharheight+2),white,FGOR,'FGOR');
- testchars(70,5*(teglcharheight+2),black,FGOR,'FGOR');
-
- testchars(70,6*(teglcharheight+2),white,FGXOR,'FGXOR');
- testchars(70,7*(teglcharheight+2),black,FGXOR,'FGXOR');
-
- testchars(70,8*(teglcharheight+2),white,FGNOT,'FGNOT');
- testchars(70,9*(teglcharheight+2),black,FGNOT,'FGNOT');
-
-
- showmouse;
- waitforkey;
- end.