    	SUBROUTINE IFFILL( IPT )
C
C  PROGRAMMER:  RONG-SHENG ZHOU
C		BOSTON COLLEGE, 8/1988
C
C	THIS ROUTINE IMPLEMENTS AREA/POLYGON FILL.
C
C	IPT >0< : START AREA/POLYGON FILL.
C	IPT = 0 : TERMINATE AREA FILL.
C	IPT > 0 : EDGE/OUTLINE THE FILLED AREA.
C	IPT < 0 : DO NOT EDGE/OUTLINE THE FILLED AREA.
C
C	FOR THE TIME BEING, FILL-PATTERNS ARE IMPLEMENTED
C	AS SHADING OF DIFFERENT GRAY LEVELS.
C
    	INCLUDE 'LN03PS.CBS'

     	IF( IPT.EQ.IFP ) RETURN
     	IF( NVEC.GT.0 ) CALL IFPLOT_DUMP(0)
     	IF( IPT.NE.0 ) THEN
     	    IF( LINE.GT.0 ) WRITE(LUN,4321)
4321	    FORMAT('stroke')
     	    IFP = IPT
     	    JFP = IABS(IFP)
     	    IF( JFP.LT.1 ) JFP = 1
     	    IF( JFP.GT.8 ) JFP = 8
     	    IF( JFP.GT.1 ) WRITE(LUN,1000) 0.14*(JFP-1)
1000	    FORMAT(F4.2,' setgray')
     	ELSE
     	    IF( IFP.GT.0 ) THEN
     		WRITE(LUN,2000)
2000		FORMAT('gsave eofill grestore')
     		IF( IABS(IFP).GT.1 ) WRITE(LUN,2002)
2002		FORMAT('0.0 setgray')
     		WRITE(LUN,2003)
2003		FORMAT('stroke')
     	    ELSE
     		WRITE(LUN,2001)
2001		FORMAT('eofill')
     		IF( IABS(IFP).GT.1 ) WRITE(LUN,2002)
     	    ENDIF
     	    IFP = 0
     	ENDIF
     	LINE = 0
     	RETURN
    	END

