home *** CD-ROM | disk | FTP | other *** search
- {$A+,B-,D-,E-,F-,G-,I-,L-,N-,O-,P-,Q-,R-,S-,T-,V-,X-}
- {$M 16384,0,655360}
-
- (*===================================================================*)
- (* BITMAPS.PAS *)
- (* Demonstration von GetImage und PutImage *)
- (* (C) 1993 te-wi Verlag München *)
- (*===================================================================*)
-
- PROGRAM BitMaps;
-
- USES
- Dos, Crt, Graph;
-
- VAR
- x, y, gd, gm : INTEGER;
- p1, p2 : Pointer;
- size : WORD;
- TriplexScriptFont: INTEGER;
-
- BEGIN
- DetectGraph(gd, gm);
- IF (NOT gd IN [EGA, EGA64, VGA]) THEN
- BEGIN
- WriteLn('Dieses Programm benötigt EGA+.');
- Halt;
- END;
- InitGraph(gd, gm, GetEnv('BGIPATH'));
- TriplexScriptFont := InstallUserFont('TSCR');
- SetTextJustify(LeftText, BottomText);
- SetFillStyle(SolidFill, Cyan);
- Bar(1, 1, 219, 69);
- SetTextStyle(TriplexScriptFont, 0, 4);
- x := 10; y := 36;
- SetColor(White);
- OutTextXY(x + 60, y, 'tewi');
- OutTextXY(x + 61, y, 'tewi');
- SetColor(Black);
- y := y + TextHeight('Pp') DIV 2 + 5;
- SetTextStyle(SmallFont, 0, 4);
- OutTextXY(x + 15, y, 'Die etwas bessere PC-Literatur');
- size := ImageSize(0, 0, 230, 70);
- GetMem(p1, Size); GetMem(p2, Size);
- GetImage(0, 0, 220, 70, p1^);
- SetFillStyle(SolidFill, Black);
- Bar(0, 0, 250, 70);
- GetImage(0,0, 220, 70, p2^);
- REPEAT
- Randomize;
- x := Random(GetMaxX - 221);
- y := Random(GetMaxY - 71);
- PutImage(x, y, p1^, NormalPut);
- Delay(Random(1000) + 1000);
- PutImage(x, y, p2^, NormalPut);
- UNTIL KeyPressed; (* aus der Unit Crt *)
- FreeMem(p1, Size);
- FreeMem(p2, Size);
- CloseGraph;
- END.
-
- (*===================================================================*)
-