Fixed connecting discontiguous corners by radarhere · Pull Request #8620 · python-pillow/Pillow
Resolves #8616
#5980 introduced code to connect discontiguous corners, when the angles in a polygon became acute enough that drawing each line going across the image in isolation left gaps. It did so by moving one of the points along the x-axis to draw more pixels and connect the parts.
Then #6303 tried to fix a bug where instead of drawing more pixels by moving a line end, a starting point was moved, and less pixels were drawn. It did so by ensuring that the the vertex being fixed was the top of both lines, or the bottom of both lines. However, the bug has now resurfaced in #8616, so this PR removes that first fix. Instead, this PR checks that it is an odd numbered x-coordinate that is checked for a discontiguous corner - odd meaning the end of a horizontal set of pixels, rather than the start.