SAMPLE01.LST 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. Listing:
  2. 1 (******************************************************************************)
  3. 2 (* SAMPLE01.MOD *)
  4. 3 (* *)
  5. 4 (* MoveTo/LineTo Example *)
  6. 5 (* Taken from SAMPLE01.PAS - Metagraphics Software Corporation (c) 1987-1989 *)
  7. 6 (* *)
  8. 7 (* PSW 10/31/90 07:42pm *)
  9. 8 (******************************************************************************)
  10. 9
  11. 10 MODULE Sample01;
  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 Meta;
  25. 24 IMPORT IO;
  26. 25
  27. 26 VAR
  28. 27 GrafixCard,
  29. 28 CommPort,
  30. 29 i: INTEGER;
  31. 30 ch: CHAR;
  32. 31 sR: GrConst.rect;
  33. ***** ^ not supported yet
  34. 32
  35. 33
  36. 34 BEGIN
  37. 35 (* init the system *)
  38. 36
  39. 37 GrQry.GrInit(GrafixCard, CommPort);
  40. ***** ^ not supported yet
  41. ***** ^ not supported yet
  42. ***** ^ not supported yet
  43. 38
  44. 39 i := Meta.InitGrafix(-GrafixCard);
  45. ***** ^ not supported yet
  46. ***** ^ not supported yet
  47. ***** ^ not supported yet
  48. 40
  49. 41 IF (i # 0) THEN
  50. 42 (* Display reason for no go *)
  51. 43 GrQry.GrInitErr(GrafixCard, CommPort, i);
  52. ***** ^ not supported yet
  53. ***** ^ not supported yet
  54. ***** ^ not supported yet
  55. 44 END;
  56. 45
  57. 46 Meta.SetDisplay(GrConst.GrafPg0); (* Switch to graphics page 0 *)
  58. ***** ^ not supported yet
  59. ***** ^ not supported yet
  60. ***** ^ not supported yet
  61. ***** ^ not supported yet
  62. 47 Meta.ScreenRect(sR); (* Get the screen limits *)
  63. ***** ^ not supported yet
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. 48 Meta.EraseRect(sR); (* Erase the screen *)
  67. ***** ^ not supported yet
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. 49 Meta.FrameRect(sR);
  71. ***** ^ not supported yet
  72. ***** ^ not supported yet
  73. ***** ^ not supported yet
  74. 50 Meta.MoveTo(sR.Xmin, sR.Ymin); (* Draw a full screen x *)
  75. ***** ^ not supported yet
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. ***** ^ not supported yet
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. 51 Meta.LineTo(sR.Xmax, sR.Ymax);
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. ***** ^ not supported yet
  86. ***** ^ not supported yet
  87. ***** ^ not supported yet
  88. 52 Meta.MoveTo(sR.Xmin, sR.Ymax);
  89. ***** ^ not supported yet
  90. ***** ^ not supported yet
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. ***** ^ not supported yet
  94. ***** ^ not supported yet
  95. 53 Meta.LineTo(sR.Xmax, sR.Ymin);
  96. ***** ^ not supported yet
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. ***** ^ not supported yet
  101. ***** ^ not supported yet
  102. 54
  103. 55 Meta.MoveTo(sR.Xmin+10, sR.Ymax DIV 2);
  104. ***** ^ not supported yet
  105. ***** ^ not supported yet
  106. ***** ^ not supported yet
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. 56 Meta.DrawString('This is a line of text');
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. ***** ^ not supported yet
  115. 57 ch := IO.RdChar(); (* Wait for a keypress *)
  116. ***** ^ not supported yet
  117. ***** ^ not supported yet
  118. ***** ^ not supported yet
  119. 58
  120. 59 GrQry.GrQuit('', 0);
  121. ***** ^ not supported yet
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. 60 END Sample01.
  125. 63 errors