pygame-ce icon indicating copy to clipboard operation
pygame-ce copied to clipboard

draw.aacircle()

Open mzivic7 opened this issue 10 months ago • 1 comments

Pygame-ce has only gfxdraw.aacircle function for drawing antialiased circles, but it has several problems:

  • It's arguments are different from draw.circle
  • It does not accept float as input
  • It can't draw circle quadrants
  • There is no line thickness option Related issue: #2463
  • Draws incorrect lines when radius is larger than about 1000 Related issue: #2450

and it is intended to be deprecated/removed in future.

All these problems are fixed in draw.aacircle, that is implemented in this commit.

Changes:

  • Added draw.aacircle function that has same inputs and outputs as draw.circle
  • Added algorithms for drawing thin and thick antialiased circles, adapted from: https://cgg.mff.cuni.cz/~pepca/ref/WU.pdf
  • Added to documentation
  • Added to code_examples
  • Added to tests

mzivic7 avatar Apr 14 '24 02:04 mzivic7