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

  1. C*****************************************************************************
  2. C  FILLPAT.FOR
  3. C
  4. C  This sample program demonstrates predefined fill patters.
  5. C****************************************************************************
  6.       include   "pgl.for"
  7.       integer*2 j, ierr, dx
  8.       character*20 fillstyle(12)
  9.  
  10.       fillstyle(1) = "EMPTY FILL"
  11.       fillstyle(2) = "SOLID FILL" 
  12.       fillstyle(3) = "LINE FILL" 
  13.       fillstyle(4) = "LTSLASH FILL" 
  14.       fillstyle(5) = "SLASH FILL" 
  15.       fillstyle(6) = "BKSLASH FILL" 
  16.       fillstyle(7) = "LTBKSLASH FILL" 
  17.       fillstyle(8) = "HATCH FILL" 
  18.       fillstyle(9) = "XHATCH FILL" 
  19.       fillstyle(10) = "INTERLEAVE FILL" 
  20.       fillstyle(11) = "WIDEDOT FILL" 
  21.       fillstyle(12) = "CLOSEDOT FILL" 
  22.  
  23. C    
  24. C    Open A Drawing File.
  25. C    
  26.     call pgInitDrw( "FILLPAT.PLT"//CHAR(0), 4000, 3000, ierr) 
  27.       if( ierr .ne. 0)then
  28.          print *, 'Error opening drawing file!'
  29.          stop
  30.       endif
  31.  
  32.       call pgSetTextStyle( pgTRIPLEX ) 
  33.       call pgSetTextJustify( pgCENTER, pgTOP ) 
  34.       call pgSetCharSpacing( 3 )
  35.       call pgSetTextScaling( 2,1,2,1 ) 
  36.       call pgSetColor( 15 )
  37.  
  38.       do j=1,4
  39.          dx = (j-1) * 1000 
  40.          call pgSetFillStyle( (j-1), 1 ) 
  41.          call pgRectangle( 100+dx, 100, 900+dx, 900, pgOFILL ) 
  42.          call pgDrawTextXY( 500+dx, 920, fillstyle(j) ) 
  43.       enddo
  44.  
  45.       do j=5,8
  46.          dx = (j-5) * 1000 
  47.          call pgSetFillStyle( j-1, 1 ) 
  48.          call pgRectangle( 100+dx, 1100, 900+dx, 1900, pgOFILL ) 
  49.          call pgDrawTextXY( 500+dx, 1920, fillstyle(j) ) 
  50.       enddo
  51.  
  52.       do j=9,12
  53.          dx = (j-9) * 1000 
  54.          call pgSetFillStyle( j-1, 1 ) 
  55.          call pgRectangle( 100+dx, 2100, 900+dx, 2900, pgOFILL ) 
  56.          call pgDrawTextXY( 500+dx, 2920, fillstyle(j) ) 
  57.       enddo
  58.  
  59. C
  60. C      Close The Drawing File.
  61. C    
  62.       call pgEndDrw() 
  63. C
  64.       END
  65.