Connected discontiguous polygon corners by radarhere · Pull Request #5980 · python-pillow/Pillow
Resolves #4347
The issue reports that for a particular polygon, the corners are not visually joined to the main shape.
Pillow draws this polygon is by plotting on each row where each of the edges intersect, and then going through row by row and drawing horizontal lines. If I adjust Pillow to just draw the intersections of the edges on each row, it is clearer what has happened - no point in any of the lines is wrong, the angles are just such that the corner doesn't connect to the rest of the shape visually.
When hitting such corners, this PR finds the two edges making up the corner, calculates where those edges intersected with the adjacent row, and then stretches out the corner to connect to it.
The test includes the polygon from the issue, and two variations I put together.

Here is the test image without this fix.


