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

  1. C*****************************************************************************
  2. C  LINEPAT.FOR
  3. C
  4. C  This sample program demonstrates predefined line patterns.
  5. C****************************************************************************
  6.       include   "pgl.for"
  7.       integer*2 j, ierr, y, maxx
  8.       character*20 linestyle(9)
  9.  
  10.       linestyle(1) = "SOLID LINE"//CHAR(0)
  11.       linestyle(2) = "HUGE DASH LINE"//CHAR(0)
  12.       linestyle(3) = "LARGE DASH LINE"//CHAR(0)
  13.       linestyle(4) = "MEDIUM DASH LINE"//CHAR(0)
  14.       linestyle(5) = "SMALL DASH LINE"//CHAR(0)
  15.       linestyle(6) = "WIDE DOT LINE"//CHAR(0)
  16.       linestyle(7) = "CLOSE DOT LINE"//CHAR(0)
  17.       linestyle(8) = "DASH DOT LINE"//CHAR(0)
  18.       linestyle(9) = "CENTER LINE"//CHAR(0)
  19.  
  20. C    
  21. C    Open A Drawing File.
  22. C    
  23.     call pgInitDrw( "LINEPAT.PLT"//CHAR(0), 2000, 2000, ierr) 
  24.       if( ierr .ne. 0)then
  25.          print *, 'Error opening drawing file!'
  26.          stop
  27.       endif
  28.  
  29.       call pgSetTextStyle( pgTRIPLEX ) 
  30.       call pgSetTextJustify( pgCENTER, pgTOP ) 
  31.       call pgSetCharSpacing( 3 )
  32.       call pgSetTextScaling( 2,1,2,1 ) 
  33.  
  34.       maxx = pgGetMaxX()
  35.  
  36.       call pgSetTextJustify( pgLEFT, pgBOTTOM )
  37.       call pgSetColor( 1 )
  38.  
  39.       y = 200
  40.       do j = 1,9
  41.         call pgSetLineStyle( j-1, 10 ) 
  42.         call pgSetLineWeight( 50 ) 
  43.         call pgLine( 0, y, maxx/2, y ) 
  44.         call pgDrawTextXY( maxx/2+100, y, linestyle(j) ) 
  45.         y = y + 200
  46.       enddo
  47. C
  48. C      Close The Drawing File.
  49. C    
  50.       call pgEndDrw() 
  51. C
  52.       END
  53.