From 12cefd798e7b28d05af4a39abd601bc862081881 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 27 May 2024 21:48:38 +1000 Subject: [PATCH] Added method links to release notes --- docs/reference/ImageDraw.rst | 25 ++++++++++++------------- docs/releasenotes/10.4.0.rst | 9 ++++++--- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/docs/reference/ImageDraw.rst b/docs/reference/ImageDraw.rst index c4ce76cc0..1404869ca 100644 --- a/docs/reference/ImageDraw.rst +++ b/docs/reference/ImageDraw.rst @@ -227,6 +227,18 @@ Methods .. versionadded:: 5.3.0 +.. py:method:: ImageDraw.circle(xy, radius, fill=None, outline=None, width=1) + + Draws a circle with a given radius centering on a point. + + .. versionadded:: 10.4.0 + + :param xy: The point for the center of the circle, e.g. ``(x, y)``. + :param radius: Radius of the circle. + :param outline: Color to use for the outline. + :param fill: Color to use for the fill. + :param width: The line width, in pixels. + .. py:method:: ImageDraw.ellipse(xy, fill=None, outline=None, width=1) Draws an ellipse inside the given bounding box. @@ -240,19 +252,6 @@ Methods .. versionadded:: 5.3.0 -.. py:method:: ImageDraw.circle(xy, radius, fill=None, outline=None, width=1) - - Draws a circle given the center coordinates and a radius. - - .. versionadded:: 10.4.0 - - :param xy: One point to define the circle center. Sequence: - ``[x, y]`` - :param radius: Radius of the circle - :param outline: Color to use for the outline. - :param fill: Color to use for the fill. - :param width: The line width, in pixels. - .. py:method:: ImageDraw.line(xy, fill=None, width=0, joint=None) Draws a line between the coordinates in the ``xy`` list. diff --git a/docs/releasenotes/10.4.0.rst b/docs/releasenotes/10.4.0.rst index 3c4258801..e0d695a8b 100644 --- a/docs/releasenotes/10.4.0.rst +++ b/docs/releasenotes/10.4.0.rst @@ -45,9 +45,12 @@ TODO API Additions ============= -Added PIL.ImageDraw.circle() -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Given the circle center coordinate pair and a radius, plots a circle using PIL.ImageDraw.ellipse() +ImageDraw.circle +^^^^^^^^^^^^^^^^ + +Added :py:meth:`~PIL.ImageDraw.ImageDraw.circle`. It provides the same functionality as +:py:meth:`~PIL.ImageDraw.ImageDraw.ellipse`, but instead of taking a bounding box, it +takes a center point and radius. TODO ^^^^