| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- (******************************************************************************)
- (* SAMPLE05.MOD *)
- (* *)
- (* ZoomBits Example *)
- (* Taken from SAMPLE05.PAS - Metagraphics Software Corporation (c) 1987-1989 *)
- (* *)
- (* PSW 10/31/90 09:25pm *)
- (******************************************************************************)
- MODULE Sample05;
- (*
- * Graphix
- * Release 3.7
- * (c) Copyright 1986-1992 PMI
- * Green Bay, Wisconsin
- * (414) 468-6040
- * All rights reserved
- *
- *)
- IMPORT GrQry;
- IMPORT GrConst;
- IMPORT GrPorts;
- IMPORT Meta;
- IMPORT IO;
- VAR
- GrafixCard,
- CommPort: INTEGER;
- i, j: INTEGER;
- ch: CHAR;
- thePort: GrPorts.adsPort; (* pointer to default port *)
- theBitmap: GrPorts.adsBMap; (* pointer to default bitmap *)
- scrnR, dstR,
- srcR: 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.ScreenRect(scrnR);
- Meta.SetDisplay(GrConst.GrafPg0);
- Meta.EraseRect(scrnR);
- Meta.GetPort(thePort); (* Get default port address *)
- theBitmap := thePort^.portBMap; (* Get default bmap address *)
- Meta.MoveTo(50, 50);
- Meta.DrawString('ZoomBits');
- Meta.SetRect(srcR, 45, 40, 115, 55);
- Meta.FrameRect(srcR);
- Meta.SetRect(dstR, 50, 100, 595, 195);
- Meta.FrameRect(dstR);
- Meta.ZoomBits(theBitmap, theBitmap, srcR, dstR, dstR, 0);
- Meta.MoveTo(10, 20);
- Meta.DrawString('press return to terminate');
- ch := IO.RdChar();
- GrQry.GrQuit('', 0);
- END Sample05.
|