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

  1. ****************************************************************************
  2. *  FILLPAT.PRG
  3. *
  4. *  Fill pattern demo program.
  5. ****************************************************************************
  6. *
  7. * Include PGL.PRG
  8. *
  9. SET PROCEDURE TO PGL
  10. DO  PGLINIT
  11. *
  12. PUBLIC fillstyle[12]       
  13. PUBLIC j, ierr, dx
  14. **************************************************************************
  15. * - MAIN PROCEDURE
  16. **************************************************************************
  17. fillstyle[1]= 'EMPTY FILL'
  18. fillstyle[2]= 'SOLID FILL'
  19. fillstyle[3]= 'LINE FILL'
  20. fillstyle[4]= 'LTSLASH FILL'
  21. fillstyle[5]= 'SLASH FILL'
  22. fillstyle[6]= 'BKSLASH FILL'
  23. fillstyle[7]= 'LTBKSLASH FILL'
  24. fillstyle[8]= 'HATCH FILL'
  25. fillstyle[9]= 'XHATCH FILL'
  26. fillstyle[10]= 'INTERLEAVE FILL'
  27. fillstyle[11]= 'WIDEDOT FILL'
  28. fillstyle[12]= 'CLOSEDOT FILL' 
  29.  
  30. *    
  31. *    Open A Drawing File
  32. *    
  33.      pgINIT( 'fillpat.plt' , 4000, 3000, @ierr  ) 
  34.      if ierr <>  0 
  35.       ? "error opening drawing file!"
  36.       return
  37.      end if
  38.  
  39.  
  40.    pgSTStyle( pgTRIPLEX )
  41.    pgSTJust( pgCENTER, pgTOP )
  42.    pgSCHARSP( 3 )
  43.    pgSTScale( 2, 1, 2, 1 )
  44.    pgSColor( 15 )
  45.  
  46.    for j = 1 TO 4
  47.       dx = (j-1) * 1000 
  48.       pgSFStyle( j-1, 1 ) 
  49.       pgRect( 100+dx, 100, 900+dx, 900, pgOFILL ) 
  50.       pgDTXY( 500+dx, 920, fillstyle[j] ) 
  51.     next
  52.  
  53.    for j = 5 TO 8 
  54.       dx = (j-5) * 1000 
  55.       pgSFStyle( j-1, 1 ) 
  56.       pgRect( 100+dx, 1100, 900+dx, 1900, pgOFILL ) 
  57.       pgDTXY( 500+dx, 1920, fillstyle[j] ) 
  58.     next
  59.  
  60.    for j = 9 TO 12 
  61.       dx = (j-9) * 1000 
  62.       pgSFStyle( j-1, 1 ) 
  63.       pgRect( 100+dx, 2100, 900+dx, 2900, pgOFILL ) 
  64.       pgDTXY( 500+dx, 2920, fillstyle[j] ) 
  65.     next
  66. *     
  67. *    Close The Drawing File.
  68. *    
  69.      pgEND()
  70. *
  71. * - END MAIN PROCEDURE
  72. *
  73.