@@ -206,6 +206,62 @@ object around the draw calls (see :func:`pygame.Surface.lock` and
206206
207207 .. ## pygame.draw.circle ##
208208
209+ .. function :: aacircle
210+
211+ | :sl:`draw an antialiased circle`
212+ | :sg:`aacircle(surface, color, center, radius) -> Rect`
213+ | :sg:`aacircle(surface, color, center, radius, width=0, draw_top_right=None, draw_top_left=None, draw_bottom_left=None, draw_bottom_right=None) -> Rect`
214+
215+ Draws an antialiased circle on the given surface.
216+ Uses Xaolin Wu Circle Algorithm.
217+ adapted from: https://cgg.mff.cuni.cz/~pepca/ref/WU.pdf
218+
219+ :param Surface surface: surface to draw on
220+ :param color: color to draw with, the alpha value is optional if using a
221+ tuple ``(RGB[A]) ``
222+ :type color: Color or string (for :doc: `color_list `) or int or tuple(int, int, int, [int])
223+ :param center: center point of the circle as a sequence of 2 ints/floats,
224+ e.g. ``(x, y) ``
225+ :type center: tuple(int or float, int or float) or
226+ list(int or float, int or float) or Vector2(int or float, int or float)
227+ :param radius: radius of the circle, measured from the ``center `` parameter,
228+ nothing will be drawn if the ``radius `` is less than 1
229+ :type radius: int or float
230+ :param int width: (optional) used for line thickness or to indicate that
231+ the circle is to be filled
232+
233+ | if ``width == 0``, (default) fill the circle
234+ | if ``width > 0``, used for line thickness
235+ | if ``width < 0``, nothing will be drawn
236+ |
237+
238+ .. note ::
239+ When using ``width `` values ``> 1 ``, the edge lines will only grow
240+ inward.
241+ :param bool draw_top_right: (optional) if this is set to True then the top right corner
242+ of the circle will be drawn
243+ :param bool draw_top_left: (optional) if this is set to True then the top left corner
244+ of the circle will be drawn
245+ :param bool draw_bottom_left: (optional) if this is set to True then the bottom left corner
246+ of the circle will be drawn
247+ :param bool draw_bottom_right: (optional) if this is set to True then the bottom right corner
248+ of the circle will be drawn
249+
250+ | if any of the draw_circle_part is True then it will draw all circle parts that have the True
251+ | value, otherwise it will draw the entire circle.
252+
253+ :returns: a rect bounding the changed pixels, if nothing is drawn the
254+ bounding rect's position will be the ``center `` parameter value (float
255+ values will be truncated) and its width and height will be 0
256+ :rtype: Rect
257+
258+ :raises TypeError: if ``center `` is not a sequence of two numbers
259+ :raises TypeError: if ``radius `` is not a number
260+
261+ .. versionadded :: 2.5.0
262+
263+ .. ## pygame.draw.aacircle ##
264+
209265 .. function :: ellipse
210266
211267 | :sl:`draw an ellipse`
0 commit comments