Skip to content

ImageDraw.Draw.polygon output is sometimes discontiguous #4347

@elfprince13

Description

@elfprince13

What did you do?

I drew a filled quadrilateral.

What did you expect to happen?

The output would be a contiguous quadrilateral.

What actually happened?

The output was discontiguous.

What are your OS, Python and Pillow versions?

  • OS: macOS 10.14.6
  • Python: Python 3.7.4 (default, Jul 11 2019, 01:08:00) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin
  • Pillow: 6.1.0
from PIL import Image, ImageDraw
img = Image.new("1", (128, 128))
coords = [(29.0, 74.0), (62.0, 57.0), (99.0, 54.0), (66.0, 71.0)]
drawer = ImageDraw.Draw(img)
drawer.polygon(coords,1,1)
img.show()

Screen Shot 2020-01-08 at 4 58 26 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions