	SUBROUTINE IFSTYL( LTYP, LWID )
C
C  PROGRAMMER:  R.S. ZHOU
C		ALFRED UNIVERSITY,  JAN-1988
C
C	THIS ROUTINE SETS ACTIVE PLOTTING STYLUS
C	FOR SUBSEQUENT VECTOR GENERATIONS.
C
C	LTYP: ACTIVE LINE TYPE.
C
C		LTYP = 1: SOLID
C		LTYP = 2: DOTTED
C		LTYP = 3: 1-DOT CENTER
C		LTYP = 4: SHORT DASH
C		LTYP = 5: MEDIUM DASH
C		LTYP = 6: 3-DOT CENTER
C		LTYP = 7: LONG-SHORT DASH
C		LTYP = 8: LOOSE DASH
C
C	LWID: ACTIVE LINE WIDTH INDEX.
C
	INCLUDE 'LN03PS.CBS'

     	IF( LTYP.EQ.LTY .AND. LWID.EQ.LWD ) RETURN
     	IF( IABS(LTYP).GT.0 ) THEN
     	    LTY = IABS(LTYP)
     	    IF( LTY.GT.8 ) LTY = 8
     	ENDIF
     	IF( IABS(LWID).GT.0 ) THEN
     	    LWD = IABS(LWID)
     	    IF( LWD.GT.9 ) LWD = 9
     	ENDIF
     	IF( NVEC.GT.0 ) CALL IFPLOT_DUMP(0)
     	IF( LINE.GT.0 ) WRITE(LUN,4321)
4321	FORMAT('stroke')
     	WRITE(LUN,1000) WPS*LWD
1000	FORMAT(F4.1,' setlinewidth')
     	I1 = WPS*LWD+0.51	!DOT
     	IS = LWD/2+2		!SPACING
     	I4 = 4*I1		!SHORT DASH
     	I8 = 8*I1		!LONG DASH
     	IF( LTY.EQ.1 ) THEN
     	    WRITE(LUN,1001)
1001	    FORMAT(' [] 0 setdash')		!SOLID LINE
     	ELSE IF( LTY.EQ.2 ) THEN
     	    WRITE(LUN,1002) I1, IS		!DOTTED LINE
1002	    FORMAT(' [',2I3,'] 0 setdash')
     	ELSE IF( LTY.EQ.3 ) THEN
     	    WRITE(LUN,1003) I4, IS, I1, IS	!ONE-DOT CENTER
1003	    FORMAT(' [',4I3,'] 0 setdash')
     	ELSE IF( LTY.EQ.4 ) THEN
     	    WRITE(LUN,1004) I4, IS		!SHORT DASH
1004	    FORMAT(' [',2I3,'] 0 setdash')
     	ELSE IF( LTY.EQ.5 ) THEN		!MEDIUM DASH
     	    WRITE(LUN,1005) I8, IS
1005	    FORMAT(' [',2I3,'] 0 setdash')
     	ELSE IF( LTY.EQ.6 ) THEN
     	    WRITE(LUN,1006) I4,IS,I1,IS,I1,IS,I1,IS	!3-DOT CENTER
1006	    FORMAT(' [',8I3,'] 0 setdash')
     	ELSE IF( LTY.EQ.7 ) THEN
     	    WRITE(LUN,1007) I8,IS,I4,IS			!LONG-SHORT DASH
1007	    FORMAT(' [',4I3,'] 0 setdash')
     	ELSE IF( LTY.EQ.8 ) THEN
     	    WRITE(LUN,1008) I4,2*IS			!SPARSE DASH
1008	    FORMAT(' [',2I3,'] 0 setdash')
     	ENDIF
     	LINE = 0
999	RETURN
	END

