Skip to content

Add pygame.draw.aarect() for anti-aliased rectanglesย #3700

@Fantastair

Description

@Fantastair

Description

pygame.draw.rect() provides functionality to draw both regular rectangles and rounded rectangles, but it does not support anti-aliasing.

In contrast, other pygame.draw primitives already have dedicated anti-aliased counterparts:

  • draw.circle() --- draw.aacircle()
  • draw.line() --- draw.aaline()
  • draw.lines() --- draw.aalines()

So I'm wondering if we should also add an anti-aliasing version for draw.rect() (e.g., pygame.draw.aarect()).

I am willing to take on the implementation of this interface and submit a corresponding pull request after getting positive feedback on this issue.

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