So here's a really simple concept, that I'm ending up having a heckuva time with: Instead of drawing a box of X thickness around an area, draw 4 triangular tabs at the edges instead.
So instead of:
**************************************
**************************************
** **
** **
** **
** **
** **
** **
** **
** **
** **
** **
** **
** **
** **
**************************************
**************************************
We'd see something like:
****** *******
****** *******
** **
** **
*** ***
**** ****
** ** ** **
** ** ** **
******* *******
******* *******
Now, ASCII art is too big of a PITA for me to sit and draw all 4 "tabs" in the above illustration, but I think the bottom half showcases the general idea.
Draw a triangle at each corner of a rectangle, and fix it so you can adjust to whatever variable width thickness you want for that triangle.
For a box, the concept is really simple:
FOR i = 0 to line_thickness
LINE(x+i, y+ i)-STEP(wide - 2*i, high - 2*i), desired_color, B
NEXT
But for a set of 4 triangles?? My poor mind has been going crazy trying to sort out the math!
So far, here's what I have (which does 3 of my 4 sides already:)
x = 1
y = 1
'top left
x1 = x * 1280 / 7 + i: y1 = y * 90 + TopOffset + i
x2 = x1 + 20 - i: y2 = y1
x3 = x1: y3 = y1 + 20 - i
Triangle x1, y1, x2, y2, x3, y3
'top right
x4 = (x + 1) * 1280 / 7 + 3 - i: y4 = y1
x5 = x4 - 20 + i: y5 = y4
x6 = x4: y6 = y4 + 20 - i
Triangle x4, y4, x5, y5, x6, y6
'bottom left
x7 = x * 1280 / 7 + i: y7 = (y + 1) * 90 + TopOffset + 3 - i
x8 = x7: y8 = y7 - 20 + i
x9 = x7 + 20 - i: y9 = y7
Triangle x7, y7, x8, y8, x9, y9
SUB Triangle
(x1
, y1
, x2
, y2
, x3
, y3
) LINE (x1
, y1
)-(x2
, y2
), Red
Only four more cups of coffee and another three handfuls of hair, and I'll be finished! :P
Anyone got a very simple little routine to do something like this that I can borrow (*cough* *cough* *steal shamelessly*) in case I ever want to do something like this again in the future?
The code above showcases the concept a lot better than my poor skills at ASCII art ever could. ;)