Skip to content

Add a corners parameter for ImageDraw.rounded_rectangle? #6953

@ChrisMGeo

Description

@ChrisMGeo

What's your feature request?

To add an optional bool tuple parameter (corners=(True, True, True, True)), or 4 optional bool parameters (top_left=True, top_right=True, ...) describing which corners of a rectangle should be rounded for ImageDraw.rounded_rectangle and possibly similar functions.

What are your OS, Python and Pillow versions?

  • OS: Windows 10
  • Python: 3.10.10
  • Pillow: latest

Example of feature request

draw.rounded_rectangle((x0, y0, x1, y1), radius=4, fill = white, corners=(True, False, True, False)) # TL TR BL BR
draw.rounded_rectangle((x0, y0, x1, y1), radius=4, fill=white, top_right=False, bottom_right=False)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions