I am drawing figures made up of line segments (x1,y1)-(x2,y2), there are between 3 and 6 segments, all line segements are some multiple of 45 degrees (mostly 0 and 90)

Given the array of points I need to draw the figure (that is the easy part)…but then I need to move X pixels and draw and outer line as well
the line segments may or may not be drawn in any particular order

an acceptable solution can replace drawing a “line” with drawing a “rectangle”, but the important item is the INSIDE dimensions of the figure must be correct

the problem is figureing out for each segment, do you add or subtract from either X and/or Y

the blue does are the provided X,Y coordinates, the black line is simply connecting the dots, its is the GREEN line I need to determine

Thanks… turns out I can “cheat”… one I started looking at the code that was generating the inside polygon, I just needed to move each point the correct multiple of 45 degrees and it came out perfect… Since all my internal angles are 90, it reduced the math considerably…

If your polygon is simple you can cheat. However, as soon as your angles are not 90 degrees things become a lot more difficult as you have to deal with miters.