home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / basic / PGL.ZIP / PGLCLS.ZIP / LINEPAT.PRG < prev    next >
Encoding:
Text File  |  1992-01-20  |  1.4 KB  |  67 lines

  1. ****************************************************************************
  2. *  LINEPAT.PRG
  3. *
  4. *  Line pattern demo program.
  5. ****************************************************************************
  6. *
  7. * Include PGL.PRG
  8. *
  9. SET PROCEDURE TO PGL
  10. DO  PGLINIT
  11. *
  12. PUBLIC linestyle[9]       
  13. PUBLIC j, ierr, y, maxx
  14.  
  15. **************************************************************************
  16. * - MAIN PROCEDURE
  17. **************************************************************************
  18.  
  19. linestyle[1]= 'SOLID LINE'
  20. linestyle[2]= 'HUGE DASH LINE'
  21. linestyle[3]= 'LARGE DASH LINE'
  22. linestyle[4]= 'MEDIUM DASH LINE'
  23. linestyle[5]= 'SMALL DASH LINE'
  24. linestyle[6]= 'WIDE DOT LINE'
  25. linestyle[7]= 'CLOSE DOT LINE'
  26. linestyle[8]= 'DASH DOT LINE'
  27. linestyle[9]= 'CENTER LINE'
  28.  
  29. *    
  30. *    Open A Drawing File
  31. *    
  32.      pgINIT( 'linepat.plt' , 2000, 2000, @ierr  ) 
  33.      if ierr <>  0 
  34.       ? "error opening drawing file!"
  35.       return
  36.      end if
  37.  
  38.  
  39.    pgSTStyle( pgTRIPLEX )
  40.    pgSTJust( pgCENTER, pgTOP )
  41.    pgSCHARSP( 3 )
  42.    pgSTScale( 2, 1, 2, 1 )
  43.    pgSColor( 15 )
  44.  
  45.    maxx = pgGmaxx()
  46.    pgSTJust( pgLEFT, pgBOTTOM )
  47.    pgSColor( 1 )
  48.  
  49.  
  50.    y = 200
  51.    for j = 1 TO 9
  52.        ? linestyle[j] 
  53.        pgSLStyle( j-1, 1 )
  54.        pgSLWgt( 50 )
  55.        pgLin( 0, y, maxx / 2, y )
  56.        pgDTXY( maxx / 2 + 100, y, linestyle[j] )
  57.        y = y + 200
  58.    next
  59.  
  60. *     
  61. *    Close The Drawing File.
  62. *    
  63.      pgEND()
  64. *
  65. * - END MAIN PROCEDURE
  66. *
  67.