        SUBROUTINE GSDRW3(X0,Y0,X1,Y1)
C
C        DRAW A LINE FROM (X0,Y0) TO (X1,Y1) IN ABSOLUTE COORDINATES.
C        ASSUMES THAT CLIPPING HAS ALREADY BEEN DONE.   TO SUPPRESS UNNECESSA
C        "MOVES", THIS IS THE ONLY ROUTINE THAT SHOULD CALL GSDRVR(3,,,).
C        THE LINE IS DRAWN IN THE CURRENT LINE TYPE.   THIS ROUTINE DOES NOT
C        SET THE ABSOLUTE POSITION (XAPOS,YAPOS).   IT IS UP TO THE CALLER TO
C        DO SO IF NECESSARY.
C
        INCLUDE GCLTYP.PRM
C
        IF (ILNTYP .GT. 1) GO TO 50
        IF (.NOT. LPOSND) CALL GSDRVR(3,X0,Y0)
        GO TO 220
C
C       SEGMENT LINE TO MAKE CURRENT LINE TYPE
C
50      CONTINUE
        IF (.NOT. LINILT) GO TO 100
        INXTL = 1
        DLEFT = DIST(1,ILNTYP-1)
        LINILT = .FALSE.
        IF (.NOT. LPOSND) CALL GSDRVR(3,X0,Y0)
100     DX = X1-X0
        DY = Y1-Y0
        DL = SQRT(DX**2+DY**2)
C
C       SEE IF THIS SEGMENT IS SHORTER THAT DIST. LEFT ON LINE TYPE
C
        IF (DL .LE. DLEFT) GO TO 200
C
C       SEGMENT IS LONGER, SO ADVANCE TO LINE TYPE BREAK
C
        S = DLEFT/DL
        X0 = S*DX+X0
        Y0 = S*DY+Y0
C
C       SEE IF THIS PART OF THE LINE TYPE IS DRAWN OR SKIPPED
C
        IF (IAND(INXTL,1) .NE. 0) GO TO 120
                CALL GSDRVR(3,X0,Y0)
                GO TO 140
120         CONTINUE
                CALL GSDRVR(4,X0,Y0)
140     CONTINUE
C
C       NOW GO TO NEXT PORTION OF LINE TYPE
C
        INXTL = INXTL + 1
        IF (INXTL .GT. 4) INXTL = 1
        DLEFT = DIST(INXTL,ILNTYP-1)
        GO TO 100
C
C       DRAW LAST OF LINE IF DRAWN
C
200     CONTINUE
        DLEFT = DLEFT - DL
        IF (IAND(INXTL,1) .NE. 0) GO TO 220
                LPOSND = .FALSE.
                GO TO 240
220         CONTINUE
                CALL GSDRVR(4,X1,Y1)
                LPOSND = .TRUE.
240     CONTINUE
        RETURN
        END

