If left and right sides meet in ImageDraw.rounded_rectangle(), do not draw rectangle to fill gap by radarhere · Pull Request #8304 · python-pillow/Pillow

Resolves #8303

rounded_rectangle() draws

  1. the corners
  2. a vertical rectangle to join the left and right sides
  3. a rectangle on the left to join the top left and lower left corners
  4. a rectangle on the right to join the top right and lower right corners

The code from the issue is failing in step 2 when there is no gap between the left and the right sides. So this PR skips that step if it isn't needed.