home *** CD-ROM | disk | FTP | other *** search
- (* ------------------------------------------------------ *)
- (* PATSDEMO.PAS *)
- (* (c) 1989 D.Nashed & TOOLBOX *)
- (* ------------------------------------------------------ *)
- PROGRAM PatsDemo;
-
- USES Crt, Graph, Pats;
-
- CONST xmax = 719; xfenster = 8;
- ymax = 347; yfenster = 8;
-
- VAR xf, yf : INTEGER;
-
- PROCEDURE Main;
- VAR x, y : INTEGER; faktor : REAL;
-
- PROCEDURE FensterAusgeben(xbasis, ybasis, hell : INTEGER);
- BEGIN
- Line(xbasis+00, ybasis+00, xbasis+xf, ybasis+00);
- Line(xbasis+xf, ybasis+00, xbasis+xf, ybasis+yf);
- Line(xbasis+xf, ybasis+yf, xbasis+00, ybasis+yf);
- Line(xbasis+00, ybasis+yf, xbasis+00, ybasis+00);
- SetFillPattern(pat [hell], 1);
- FloodFill(xbasis+1, ybasis+1, 1);
- END;
-
- BEGIN
- xf := xmax DIV xfenster;
- yf := ymax DIV yfenster;
- faktor := (xfenster * yfenster - 1) / 64;
- FOR x := 0 TO xfenster - 1 DO
- FOR y := 0 TO yfenster - 1 DO
- FensterAusgeben(x*xf, y*yf,
- Trunc((x*yfenster + y)/faktor));
- END;
-
- PROCEDURE Init;
- VAR det, modus, x, y, t : INTEGER;
- BEGIN
- ClrScr;
- DetectGraph(det, modus);
- IF det <> 7 THEN BEGIN
- WriteLn('Hercules card required');
- Halt;
- END;
- det := detect;
- modus := 0;
- InitGraph(det, modus, '');
- IF GraphResult <> grOk THEN Halt;
- END;
-
- BEGIN
- Init;
- Main;
- ReadLn;
- CloseGraph;
- END.
- (* ------------------------------------------------------ *)
- (* Ende von PATSDEMO.PAS *)