| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- (******************************************************************************)
- (* SAMPLE01.MOD *)
- (* *)
- (* MoveTo/LineTo Example *)
- (* Taken from SAMPLE01.PAS - Metagraphics Software Corporation (c) 1987-1989 *)
- (* *)
- (* PSW 10/31/90 07:42pm *)
- (******************************************************************************)
- MODULE Sample01;
- (*
- * Graphix
- * Release 3.7
- * (c) Copyright 1986-1992 PMI
- * Green Bay, Wisconsin
- * (414) 468-6040
- * All rights reserved
- *
- *)
- IMPORT GrQry;
- IMPORT GrConst;
- IMPORT Meta;
- IMPORT IO;
- VAR
- GrafixCard,
- CommPort,
- i: INTEGER;
- ch: CHAR;
- sR: GrConst.rect;
- BEGIN
- (* init the system *)
- GrQry.GrInit(GrafixCard, CommPort);
- i := Meta.InitGrafix(-GrafixCard);
- IF (i # 0) THEN
- (* Display reason for no go *)
- GrQry.GrInitErr(GrafixCard, CommPort, i);
- END;
- Meta.SetDisplay(GrConst.GrafPg0); (* Switch to graphics page 0 *)
- Meta.ScreenRect(sR); (* Get the screen limits *)
- Meta.EraseRect(sR); (* Erase the screen *)
- Meta.FrameRect(sR);
- Meta.MoveTo(sR.Xmin, sR.Ymin); (* Draw a full screen x *)
- Meta.LineTo(sR.Xmax, sR.Ymax);
- Meta.MoveTo(sR.Xmin, sR.Ymax);
- Meta.LineTo(sR.Xmax, sR.Ymin);
- Meta.MoveTo(sR.Xmin+10, sR.Ymax DIV 2);
- Meta.DrawString('This is a line of text');
- ch := IO.RdChar(); (* Wait for a keypress *)
- GrQry.GrQuit('', 0);
- END Sample01.
|