home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / news / 769 / s3laser.prg < prev    next >
Text File  |  1992-08-18  |  4KB  |  143 lines

  1. proc main
  2. prnport()
  3. set printer on
  4. toprinter()
  5. set printer off
  6. set printer to
  7.  
  8.  
  9. proc toprinter
  10.  
  11. //▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  12. //-----set the CPI and LPI to defaults -----------------------------------
  13. ??SL_SETCPI(10)
  14. ??SL_SETLPI(6)
  15.  
  16.  
  17. //▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  18. //-draw 1st box ------------------------------------------------------------
  19. ?SL_BOX(10,10,20,20,"50",10)  // draw box 10,10, 20 20 with 50% shading
  20.                              // and 10 DPI thick
  21. ?SL_GOTO(10,10)
  22. ??SL_ITALIC()+"Box 1"+SL_ITALICOFF()
  23.  
  24.  
  25. //▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  26. //-draw 2nd box ------------------------------------------------------------
  27. ?SL_BOX(12,12,22,22,"25",5)  // draws a box 12,12 to 22 22 with 25% shading
  28.                              // and 5 DPI thick
  29. ?SL_GOTO(12,12)
  30. ??SL_BOLD()+"Box 2"+SL_NORMAL()
  31.  
  32.  
  33.  
  34. //▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  35. //-draw 3rd box ------------------------------------------------------------
  36. ?SL_BOX(14,14,24,24,"100",5)  // draws a box 12,12 to 22 22 with 100% shading
  37.                              // and 5 DPI thick
  38. ?SL_FILL(14,14,24,24,nil,"6") // fill the last box with pattern 6
  39.  
  40. ?SL_GOTO(14,14)
  41. ??SL_BOLD()+"Box 3"+SL_NORMAL()
  42.  
  43.  
  44. //▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  45. //-----------DRAW  horiz lines
  46. ? SL_HLINE(30,5,30,35,"50",2)  // draws a line 30,5 to 30,75 with 50% shading
  47.                                 // AND 2 dpi THICK
  48.  
  49. ? SL_HLINE(32,5,32,35,"100",5)  // draws a line 30,5 to 30,75 with 100% shading
  50.                                 // AND 5 dpi THICK
  51.  
  52. ? SL_HLINE(34,5,34,35,"25",10)  // draws a line 30,5 to 30,75 with 100% shading
  53.                                 // AND 5 dpi THICK
  54.  
  55. //▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  56. //--- draw vertical lines
  57. ? SL_VLINE(30,5,35,5,"50",2)  // draws a line 30,5 to 35,5 with 50% shading
  58.                                 // AND 2 dpi THICK
  59.  
  60. ? SL_VLINE(30,10,35,10,"100",5)  // draws a line 30,10 to 35,10 with 100% shading
  61.                                 // AND 5 dpi THICK
  62.  
  63. ? SL_VLINE(30,20,35,20,"25",10)  // draws a line 30,20 to 35,20 with 100% shading
  64.                                 // AND 5 dpi THICK
  65.  
  66.  
  67.  
  68. //▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  69. // -- show some of the font control functions
  70. ?SL_GOTO(40,0)
  71.  
  72. ?? SL_SETCPI(16.66)
  73.  
  74. ?"Compressed (16.66 CPI) and 6 LPI"
  75. ?"Compressed (16.66 CPI) and 6 LPI"
  76. ?"Compressed (16.66 CPI) and 6 LPI"
  77.  
  78. ?
  79. ??SL_SETLPI(8)
  80. ?"Compressed (16.66 CPI) and 8 LPI"
  81. ?"Compressed (16.66 CPI) and 8 LPI"
  82. ?"Compressed (16.66 CPI) and 8 LPI"
  83.  
  84. ?
  85. ??SL_SETLPI(12)
  86. ?"Compressed (16.66 CPI) and 12 LPI"
  87. ?"Compressed (16.66 CPI) and 12 LPI"
  88. ?"Compressed (16.66 CPI) and 12 LPI"
  89. ?
  90. ??SL_SETCPI(10)
  91. ??SL_SETLPI(6)
  92. ?"Normal (10 CPI and 6 LPI)"
  93. ?"Normal (10 CPI and 6 LPI)"
  94. ?"Normal (10 CPI and 6 LPI)"
  95.  
  96. ??SL_BOLD()
  97. ?"BOLD (10 CPI and 6 LPI) "
  98. ?"BOLD (10 CPI and 6 LPI) "
  99. ?"BOLD (10 CPI and 6 LPI) "
  100.  
  101. ??SL_NORMAL()+SL_ITALIC()
  102. ?"ITALIC (10 CPI and 6 LPI) "
  103. ?"ITALIC (10 CPI and 6 LPI) "
  104. ?"ITALIC (10 CPI and 6 LPI) "
  105. ??SL_ITALICOFF()
  106.  
  107.  
  108. ??SL_BOLD()
  109.  
  110. //▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  111. // --- draw some patterns and some shadings using SL_FILL()
  112.  
  113. ?SL_FILL(5, 40,8,50,nil,"1") // fill pattern 1
  114. ??SL_downrow(1)+"Pattern 1"
  115. ?SL_FILL(9,40,12,50,nil,"2") // fill pattern 2
  116. ??SL_downrow(1)+"Pattern 2"
  117. ?SL_FILL(13,40,16,50,nil,"3") // fill pattern 3
  118. ??SL_downrow(1)+"Pattern 3"
  119. ?SL_FILL(17,40,20,50,nil,"4") // fill pattern 4
  120. ??SL_downrow(1)+"Pattern 4"
  121. ?SL_FILL(21,40,24,50,nil,"5") // fill pattern 5
  122. ??SL_downrow(1)+"Pattern 5"
  123. ?SL_FILL(25,40,28,50,nil,"6") // fill pattern 6
  124. ??SL_downrow(1)+"Pattern 6"
  125.  
  126. ?SL_FILL(5, 60,8,70,"10")  // 10% fill
  127. ??SL_downrow(1)+"10% Fill"
  128. ?SL_FILL(9,60,12,70,"30")   // 30% fill
  129. ??SL_downrow(1)+"20% Fill"
  130. ?SL_FILL(13,60,16,70,"50")   // 50% fill
  131. ??SL_downrow(1)+"50% Fill"
  132. ?SL_FILL(17,60,20,70,"70")   // 70% fill
  133. ??SL_downrow(1)+"70% Fill"
  134. ?SL_FILL(21,60,24,70,"90")   // 90% fill
  135. ??SL_downrow(1)+"90% Fill"
  136. ?SL_FILL(25,60,28,70,"100")  // 100% fill
  137. ??SL_downrow(1)+"100% Fill"
  138.  
  139. ??SL_NORMAL()
  140.  
  141. ?sl_eject()
  142. return
  143.