    	SUBROUTINE IFARRH( IT, XOP, YOP, WIDTH, HEIGHT, HEAD, ANGLE )
C
C  PROGRMMER: R.S. ZHOU,		ALFRED UNIVERSITY
C
C	THIS ROUTINE DRAWS AN ARROWHEAD.
C
C	IT --------- TYPE OF ARROWHEAD.
C			 1: SINGLE LINE ARROW (->).
C			11: SINGLE LINE DOUBLE-ARROW (<->).
C			 2: DOUBLE LINE ARROW (=>).
C			22: DOUBLE LINE DOUBLE-ARROW (<=>).
C			 3: CONTOUR ARROWHEAD.
C			33: CONTOUR DOUBLE-ARROWHEAD.
C			 4: SOLID ARROWHEAD.
C			44: SOLID DOUBLE-ARROWHEAD.
C	XOP -------- X-COORDINATE OF HEAD-TIP IN INCHES.
C	YOP -------- Y-COORDINATE OF HEAD-TIP IN INCHES.
C		     FOR A DOUBLE-ARROW, IT'S THE RIGHT TIP.
C	WIDTH ------ WIDTH  OF ARROWHEAD.
C	HEIGHT ----- HEIGHT OF ARROWHEAD.
C	HEAD ------- HEAD-SECTION LENGTH OF ARROWHEAD.
C	ANGLE ------ ROTATION ANGLE IN DEGREES
C		  	ANGLE = 0 OR 360 DEGREE( > )
C		  	ANGLE = 90 DEGREE( ^ )
C		  	ANGLE = 180 DEGREE( < )
C			ANGLE = -90 OR 270 DEGREE( V )
C			INTERMEDIATE ANGLES, OF COUSRE, ARE ALLOWED.
C
     	INCLUDE 'TEKLIB.CBS'
     	LOGICAL TWO

     	IWD = IDW
     	IF( ITM.EQ.1 ) GOTO 888
C
C  INITIALIZE...
C
     	IDW = 0
     	ITY = IABS(IT)
     	TWO = .FALSE.
     	IF( ITY.GT.10 ) THEN
     	    ITY = MOD( ITY, 10 )
     	    TWO = .TRUE.
     	ENDIF
     	XPS = XOP
     	YPS = YOP
    	WID = ABS(WIDTH)
     	IF( WID.LT.0.1 ) WID = 0.1
    	HGT = 0.5*ABS(HEIGHT)
     	WDD = ABS(HEAD)
     	IF( .NOT.TWO .AND. WDD.GT.WID ) WDD = WID
     	IF(  TWO .AND. WDD.GT.0.5*WID ) WDD = 0.5*WID
     	ANG = AMOD( ANGLE, 360.0 )
C
C  MOVE ORIGIN TO (XPS,YPS)...
C
     	CALL IFPLOT( XPS, YPS, -9 )
     	CALL IFPLOT( 0.0, 0.0,  3 )
C
C  SET THE ROTATION IF AT ALL...
C
    	IF( ANG.NE.0.0 ) THEN
     	    ANGX = XANG
     	    ANGY = YANG
     	    CALL IFROTA( ANG+XANG, ANG+YANG )
     	ENDIF
C
C  START THE DRAWING...
C
     	IF( ITY.EQ.1 ) THEN	!SINGLE-LINE ARROW
     	    CALL IFPLOT( -WID, 0.0, 2 )
     	    CALL IFPLOT( -WDD, HGT, 3 )
     	    CALL IFPLOT(  0.0, 0.0, 2 )
     	    CALL IFPLOT( -WDD,-HGT, 2 )
     	    IF( TWO ) THEN
     	    	CALL IFPLOT( -WID+WDD, HGT, 3 )
     	    	CALL IFPLOT(     -WID, 0.0, 2 )
     	    	CALL IFPLOT( -WID+WDD,-HGT, 2 )
     	    ENDIF
     	ELSE IF( ITY.EQ.2 ) THEN	!DOUBLE-LINE ARROW
     	    HHH = 0.34*HGT
     	    WTN = HHH*WDD/HGT
     	    CALL IFPLOT( -WDD, HGT, 2 )
     	    CALL IFPLOT(  0.0, 0.0, 3 )
     	    CALL IFPLOT( -WDD,-HGT, 2 )
     	    IF( .NOT.TWO ) THEN
     	    	CALL IFPLOT( -WID, HHH, 3 )
     	    	CALL IFPLOT( -WTN, HHH, 2 )
     	    	CALL IFPLOT( -WTN,-HHH, 3 )
     	    	CALL IFPLOT( -WID,-HHH, 2 )
     	    ELSE
     	    	CALL IFPLOT( -WID+WDD, HGT, 3 )
     	    	CALL IFPLOT(     -WID, 0.0, 2 )
     	    	CALL IFPLOT( -WID+WDD,-HGT, 2 )
     	    	CALL IFPLOT( -WID+WTN, HHH, 3 )
     	    	CALL IFPLOT(     -WTN, HHH, 2 )
     	    	CALL IFPLOT(     -WTN,-HHH, 3 )
     	    	CALL IFPLOT( -WID+WTN,-HHH, 2 )
     	    ENDIF
     	ELSE IF( ITY.GT.2 ) THEN	!CONTOUR ARROWHEAD
     	    IF( ITY.EQ.4 ) CALL IFFILL(1)	!SOLID ARROWHEAD
     	    WWW = 0.80*WDD
     	    HHH = 0.34*HGT
     	    CALL IFPLOT(  0.0, 0.0, 3 )
     	    CALL IFPLOT( -WDD, HGT, 2 )
     	    CALL IFPLOT( -WWW, HHH, 2 )
     	    IF( .NOT.TWO ) THEN
     	    	CALL IFPLOT( -WID, HHH, 2 )
     	    	CALL IFPLOT( -WID,-HHH, 2 )
     	    ELSE
     	    	CALL IFPLOT( -WID+WWW, HHH, 2 )
     	    	CALL IFPLOT( -WID+WDD, HGT, 2 )
     		CALL IFPLOT(     -WID, 0.0, 2 )
     	    	CALL IFPLOT( -WID+WDD,-HGT, 2 )
     	    	CALL IFPLOT( -WID+WWW,-HHH, 2 )
     	    ENDIF
     	    CALL IFPLOT( -WWW,-HHH, 2 )
     	    CALL IFPLOT( -WDD,-HGT, 2 )
     	    CALL IFPLOT(  0.0, 0.0, 2 )
     	    IF( ITY.EQ.4 ) CALL IFFILL(0)	!SOLID ARROWHEAD
     	ENDIF
C
C  RESTORE...
C
    	IF( ANG.NE.0.0 ) CALL IFROTA( ANGX, ANGY )
     	CALL IFPLOT( -XOP, -YOP, -9 )

888	IF( IWD.NE.0 ) THEN
     	    IF( NPPS.GT.0 ) CALL IFPLOT_DUMP
     	    WRITE(IDF,1000) IT,WIDTH,HEIGHT,HEAD,XOP,YOP,ANGLE
     	ENDIF
1000	FORMAT('ARRH:',I3,6F8.3)
     	IDW = IWD

999	RETURN
    	END

