C C do we do anything? C IF (DIST .EQ. 0) RETURN IF ((X1 .EQ. X2) .OR. (Y1 .EQ. Y2)) RETURN C C First, save the old NIBS and LINPAT, and set the new ones C NIBOLD = NIBS LINOLD = LINPAT CALL VECTOR(FLOAT(NIB),FLOAT(LINP),5) C C now find the lowest and highest X and Y values C XLOW = AMIN1(X1,X2) XHIGH = AMAX1(X1,X2) YLOW = AMIN1(Y1,Y2) YHIGH = AMAX1(Y1,Y2) C C lets do vertical lines first C IF ((ISHADE .AND. 2) .EQ. 0) GOTO 200 X = XLOW 110 X = X + DIST IF (X .GE. XHIGH) GOTO 200 CALL VECTOR(X,YLOW,1) CALL VECTOR(X,YHIGH,2) GOTO 110 C C horizontal lines C 200 IF ((ISHADE .AND. "10) .EQ. 0) GOTO 300 Y = YLOW 210 Y = Y + DIST IF (Y .GT. YHIGH) GOTO 300 CALL VECTOR(XLOW,Y,1) CALL VECTOR(XHIGH,Y,2) GOTO 210 C C angles lines ... (do everything relative to (XLOW,YLOW) C 300 IF ((ISHADE .AND. 5) .EQ. 0) GOTO 500 DELTAB = 1.414 * DIST XMAX = XHIGH - XLOW YMAX = YHIGH - YLOW C C this section is for lines with a slope of 1 C IF ((ISHADE .AND. 1) .EQ. 0) GOTO 400 C C loop thru a series of lines, defined by Y=X+B where B = -XMAX ==> YMAX C B = -XMAX 310 B = B + DELTAB IF (B .GE. YMAX) GOTO 400 X = -B ! at Y=0, find X X = AMAX1(X,0.0) ! bound it Y = X+B ! calculate Y CALL VECTOR(X+XLOW,Y+YLOW,1) ! dark vector to the start of the line X = YMAX - B ! at Y=YMAX, find X X = AMIN1(X,XMAX) ! bound it Y = X+B ! calculate Y CALL VECTOR(X+XLOW,Y+YLOW,2) ! draw a line to here GOTO 310 C C this part for slope = -1 C 400 IF ((ISHADE .AND. 4) .EQ. 0) GOTO 500 B = YMAX + XMAX 410 B = B - DELTAB IF (B .LE. 0.0) GOTO 500 X = -(YMAX-B) ! calculate X at Y=YMAX X = AMAX1(X,0.0) ! bound it Y = -X+B ! calculate Y CALL VECTOR(X+XLOW,Y+YLOW,1) ! dark vector to the start X = B ! at Y=0, this is X X = AMIN1(X,XMAX) ! bound it Y = -X+B ! calculate Y at this X CALL VECTOR(X+XLOW,Y+YLOW,2) ! and draw a vector to us GOTO 410 C C all done - restore the nibs and line pattern and leave C 500 CALL VECTOR(FLOAT(NIBOLD),FLOAT(LINOLD),5) RETURN END