C*****************************************************************************
C  LINEPAT.FOR
C
C  This sample program demonstrates predefined line patterns.
C****************************************************************************
      include   "pgl.for"
      integer*2 j, ierr, y, maxx
      character*20 linestyle(9)

      linestyle(1) = "SOLID LINE"//CHAR(0)
      linestyle(2) = "HUGE DASH LINE"//CHAR(0)
      linestyle(3) = "LARGE DASH LINE"//CHAR(0)
      linestyle(4) = "MEDIUM DASH LINE"//CHAR(0)
      linestyle(5) = "SMALL DASH LINE"//CHAR(0)
      linestyle(6) = "WIDE DOT LINE"//CHAR(0)
      linestyle(7) = "CLOSE DOT LINE"//CHAR(0)
      linestyle(8) = "DASH DOT LINE"//CHAR(0)
      linestyle(9) = "CENTER LINE"//CHAR(0)

C	
C	Open A Drawing File.
C	
	call pgInitDrw( "LINEPAT.PLT"//CHAR(0), 2000, 2000, ierr) 
      if( ierr .ne. 0)then
         print *, 'Error opening drawing file!'
         stop
      endif

      call pgSetTextStyle( pgTRIPLEX ) 
      call pgSetTextJustify( pgCENTER, pgTOP ) 
      call pgSetCharSpacing( 3 )
      call pgSetTextScaling( 2,1,2,1 ) 

      maxx = pgGetMaxX()

      call pgSetTextJustify( pgLEFT, pgBOTTOM )
      call pgSetColor( 1 )

      y = 200
      do j = 1,9
        call pgSetLineStyle( j-1, 10 ) 
        call pgSetLineWeight( 50 ) 
        call pgLine( 0, y, maxx/2, y ) 
        call pgDrawTextXY( maxx/2+100, y, linestyle(j) ) 
        y = y + 200
      enddo
C
C      Close The Drawing File.
C	
      call pgEndDrw() 
C
      END
