Original Post
Hi, although the method discussed here here works somewhat satisfactory now, I'm still thinking if there could a better method to achieve the following aesthetic:
(I want to draw a border around an arbitrary polygon; in this example the source polygon is the red arrow) What came to my is the following: Could I not simply do two drawing steps? 1) Draw the filled red polygon 2) Then draw the border around the red polygon using thick lines The only problem now is that the thick lines must join together nicely. I could do this by giving them round edges (draw a circle of radius "line_thickness" at each end) but I think it would be much better if the lines had sharp joints. Here's an illustration (the first poly lines use sharp joints, the second poly lines use round joints):
So my question would be: How to achieve the first aesthetic? How do I connect two thick line segments so that it looks nicely just as in the first example in the illustration above? I don't really have an idea how it could be done. Also, to the nice people who have followed my other threads on this polygon border topic: Would this thick line-approach solve the floating point accuracy problems which we have discussed in the other threads? Thanks for your help. Andy
(I want to draw a border around an arbitrary polygon; in this example the source polygon is the red arrow) What came to my is the following: Could I not simply do two drawing steps? 1) Draw the filled red polygon 2) Then draw the border around the red polygon using thick lines The only problem now is that the thick lines must join together nicely. I could do this by giving them round edges (draw a circle of radius "line_thickness" at each end) but I think it would be much better if the lines had sharp joints. Here's an illustration (the first poly lines use sharp joints, the second poly lines use round joints):
So my question would be: How to achieve the first aesthetic? How do I connect two thick line segments so that it looks nicely just as in the first example in the illustration above? I don't really have an idea how it could be done. Also, to the nice people who have followed my other threads on this polygon border topic: Would this thick line-approach solve the floating point accuracy problems which we have discussed in the other threads? Thanks for your help. Andy