home *** CD-ROM | disk | FTP | other *** search
- {--------------------------------------------------------------}
- { GraphFiler }
- { }
- { Graphics file I/O demonstration program }
- { }
- { by Jeff Duntemann }
- { Turbo Pascal V5.0 }
- { Last update 7/24/88 }
- { }
- { From: COMPLETE TURBO PASCAL 5.0 by Jeff Duntemann }
- { Scott, Foresman & Co., Inc. 1988 ISBN 0-673-38355-5 }
- {--------------------------------------------------------------}
-
- PROGRAM GraphFiler;
-
- USES Crt,Graph3; { Uses Turbo Pascal 3.0-style graphics for }
- { simplicity's sake... }
-
- VAR
- I : Integer;
- ErrorCode : Integer;
-
-
- {$I GSAVE.SRC}
- {$I GLOAD.SRC}
-
-
- BEGIN { GraphFiler MAIN }
- ClrScr; { Clear the text screen }
- HiResColor(15); { Use white as foreground color }
- HiRes; { Clears graphics screen }
- TextColor(1);
- FOR I := 0 TO 199 DO { Draw lines }
- IF I MOD 5 = 0 THEN Draw(0,0,640,I,1);
- GSave('LINES.PIC',ErrorCode); { Save graphics image to a file }
- Write('Press RETURN to clear screeen and re-load image: ');
- Readln;
- HiRes; { Clears graphics screen }
- GLoad('LINES.PIC',ErrorCode); { Load saved file into display buffer }
- Readln { Wait for RETURN before terminating }
- END.