SAMPLE05.LST 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. Listing:
  2. 1 (******************************************************************************)
  3. 2 (* SAMPLE05.MOD *)
  4. 3 (* *)
  5. 4 (* ZoomBits Example *)
  6. 5 (* Taken from SAMPLE05.PAS - Metagraphics Software Corporation (c) 1987-1989 *)
  7. 6 (* *)
  8. 7 (* PSW 10/31/90 09:25pm *)
  9. 8 (******************************************************************************)
  10. 9
  11. 10 MODULE Sample05;
  12. 11 (*
  13. 12 * Graphix
  14. 13 * Release 3.7
  15. 14 * (c) Copyright 1986-1992 PMI
  16. 15 * Green Bay, Wisconsin
  17. 16 * (414) 468-6040
  18. 17 * All rights reserved
  19. 18 *
  20. 19 *)
  21. 20
  22. 21 IMPORT GrQry;
  23. 22 IMPORT GrConst;
  24. 23 IMPORT GrPorts;
  25. 24 IMPORT Meta;
  26. 25 IMPORT IO;
  27. 26
  28. 27 VAR
  29. 28 GrafixCard,
  30. 29 CommPort: INTEGER;
  31. 30 i, j: INTEGER;
  32. 31 ch: CHAR;
  33. 32 thePort: GrPorts.adsPort; (* pointer to default port *)
  34. ***** ^ not supported yet
  35. 33 theBitmap: GrPorts.adsBMap; (* pointer to default bitmap *)
  36. ***** ^ not supported yet
  37. 34 scrnR, dstR,
  38. 35 srcR: GrConst.rect;
  39. ***** ^ not supported yet
  40. 36
  41. 37
  42. 38 BEGIN
  43. 39 (* init the system *)
  44. 40
  45. 41 GrQry.GrInit(GrafixCard, CommPort);
  46. ***** ^ not supported yet
  47. ***** ^ not supported yet
  48. ***** ^ not supported yet
  49. 42
  50. 43 i := Meta.InitGrafix(-GrafixCard);
  51. ***** ^ not supported yet
  52. ***** ^ not supported yet
  53. ***** ^ not supported yet
  54. 44
  55. 45 IF (i # 0) THEN
  56. 46 (* Display reason for no go *)
  57. 47 GrQry.GrInitErr(GrafixCard, CommPort, i);
  58. ***** ^ not supported yet
  59. ***** ^ not supported yet
  60. ***** ^ not supported yet
  61. 48 END;
  62. 49
  63. 50 Meta.ScreenRect(scrnR);
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. 51 Meta.SetDisplay(GrConst.GrafPg0);
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. 52 Meta.EraseRect(scrnR);
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. ***** ^ not supported yet
  76. 53
  77. 54 Meta.GetPort(thePort); (* Get default port address *)
  78. ***** ^ not supported yet
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. 55 theBitmap := thePort^.portBMap; (* Get default bmap address *)
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. 56 Meta.MoveTo(50, 50);
  86. ***** ^ not supported yet
  87. ***** ^ not supported yet
  88. ***** ^ not supported yet
  89. 57 Meta.DrawString('ZoomBits');
  90. ***** ^ not supported yet
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. 58 Meta.SetRect(srcR, 45, 40, 115, 55);
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. ***** ^ not supported yet
  98. 59 Meta.FrameRect(srcR);
  99. ***** ^ not supported yet
  100. ***** ^ not supported yet
  101. ***** ^ not supported yet
  102. 60 Meta.SetRect(dstR, 50, 100, 595, 195);
  103. ***** ^ not supported yet
  104. ***** ^ not supported yet
  105. ***** ^ not supported yet
  106. ***** ^ not supported yet
  107. 61 Meta.FrameRect(dstR);
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. 62 Meta.ZoomBits(theBitmap, theBitmap, srcR, dstR, dstR, 0);
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. ***** ^ not supported yet
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. ***** ^ not supported yet
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. 63
  121. 64 Meta.MoveTo(10, 20);
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. 65 Meta.DrawString('press return to terminate');
  126. ***** ^ not supported yet
  127. ***** ^ not supported yet
  128. ***** ^ not supported yet
  129. 66
  130. 67 ch := IO.RdChar();
  131. ***** ^ not supported yet
  132. ***** ^ not supported yet
  133. ***** ^ not supported yet
  134. 68
  135. 69 GrQry.GrQuit('', 0);
  136. ***** ^ not supported yet
  137. ***** ^ not supported yet
  138. ***** ^ not supported yet
  139. 70 END Sample05.
  140. 68 errors