'=========================================================================== ' Subject: FAT LINES Date: 08-06-99 (20:08) ' Author: Marius Andra Code: QB, QBasic, PDS ' Origin: marius.andra@mail.ee Packet: GRAPHICS.ABC '=========================================================================== DECLARE SUB li (x1!, y1!, x2!, y2!, c!, t!) SCREEN 12 li 10, 10, 100, 100, 14, 20 SUB li (x1, y1, x2, y2, c, t) LINE (x1, y1)-(x2, y2), c IF t = 0 THEN EXIT SUB r = INSTR(STR$(t), ".") SELECT CASE r CASE 0 IF x1 = x2 AND y1 <> y2 THEN FOR i = 1 TO (t - 1) / 2: LINE (x1 - i, y1)-(x2 - i, y2), c: LINE (x1 + i, y1)-(x2 + i, y2), c: NEXT i: LINE (x1 - i, y1)-(x2 - i, y2), c IF y1 = y2 AND x1 <> x2 THEN FOR i = 1 TO (t - 1) / 2: LINE (x1, y1 - i)-(x2, y2 - i), c: LINE (x1, y1 + i)-(x2, y2 + i), c: NEXT i: LINE (x1, y1 - i)-(x2, y2 - i), c IF x1 < x2 AND y2 > y1 THEN FOR i = 1 TO (t - 1) / 2: LINE (x1 + i, y1)-(x2, y2 - i), c: LINE (x1, y1 + i)-(x2 - i, y2), c: NEXT i: LINE (x1 + i, y1)-(x2, y2 - i), c IF x2 < x1 AND y2 > y1 THEN FOR i = 1 TO (t - 1) / 2: LINE (x1 - i, y1)-(x2, y2 - i), c: LINE (x1, y1 + i)-(x2 + i, y2), c: NEXT i: LINE (x1 - i, y1)-(x2, y2 - i), c IF x1 < x2 AND y2 < y1 THEN FOR i = 1 TO (t - 1) / 2: LINE (x1, y1 - i)-(x2 - i, y2), c: LINE (x1 + i, y1)-(x2, y2 + i), c: NEXT i: LINE (x1, y1 - i)-(x2 - i, y2), c IF x2 < x1 AND y2 < y1 THEN FOR i = 1 TO (t - 1) / 2: LINE (x1, y1 + i)-(x2 - i, y2), c: LINE (x1 - i, y1)-(x2, y2 + i), c: NEXT i: LINE (x1, y1 + i)-(x2 - i, y2), c CASE ELSE IF x1 = x2 AND y1 <> y2 THEN FOR i = 1 TO t / 2: LINE (x1 - i, y1)-(x2 - i, y2), c: LINE (x1 + i, y1)-(x2 + i, y2), c: NEXT i IF y1 = y2 AND x1 <> x2 THEN FOR i = 1 TO t / 2: LINE (x1, y1 - i)-(x2, y2 - i), c: LINE (x1, y1 + i)-(x2, y2 + i), c: NEXT i IF x1 < x2 AND y2 > y1 THEN FOR i = 1 TO t / 2: LINE (x1 + i, y1)-(x2, y2 - i), c: LINE (x1, y1 + i)-(x2 - i, y2), c: NEXT i IF x2 < x1 AND y2 > y1 THEN FOR i = 1 TO t / 2: LINE (x1 - i, y1)-(x2, y2 - i), c: LINE (x1, y1 + i)-(x2 + i, y2), c: NEXT i IF x1 < x2 AND y2 < y1 THEN FOR i = 1 TO t / 2: LINE (x1, y1 - i)-(x2 - i, y2), c: LINE (x1 + i, y1)-(x2, y2 + i), c: NEXT i IF x2 < x1 AND y2 < y1 THEN FOR i = 1 TO t / 2: LINE (x1, y1 + i)-(x2 - i, y2), c: LINE (x1 - i, y1)-(x2, y2 + i), c: NEXT i END SELECT END SUB