def circle(screensize, center, radius, color=1.0, bg_color=0, blur=1):
    """Draw an image with a circle.

    Draws a circle of color ``color``, on a background of color ``bg_color``,
    on a screen of size ``screensize`` at the position ``center=(x, y)``,
    with a radius ``radius`` but slightly blurred on the border by ``blur``
    pixels.

    Parameters
    ----------

    screensize : tuple or list
        Size of the canvas.

    center : tuple or list
        Center of the circle.

    radius : float
        Radius of the circle, in pixels.

    bg_color : tuple or float, optional
        Color for the background of the canvas. As default, black.

    blur : float, optional
        Blur for the border of the circle.

    Examples
    --------

    .. code:: python

        from moviepy.video.tools.drawing import circle

        circle(
            (5, 5),  # size
            (2, 2),  # center
            2,      # radius
        )
        # array([[0.        , 0.        , 0.        , 0.        , 0.        ],
        #        [0.        , 0.58578644, 1.        , 0.58578644, 0.        ],
        #        [0.        , 1.        , 1.        , 1.        , 0.        ],
        #        [0.        , 0.58578644, 1.        , 0.58578644, 0.        ],
        #        [0.        , 0.        , 0.        , 0.        , 0.        ]])
    """
    offset = 1.0 * (radius - blur) / radius if radius else 0
    return color_gradient(
        screensize,
        p1=center,
        radius=radius,
        color_1=color,
        color_2=bg_color,
        shape="radial",
        offset=offset,
    )
Draw an image with a circle.

    Draws a circle of color ``color``, on a background of color ``bg_color``,
    on a screen of size ``screensize`` at the position ``center=(x, y)``,
    with a radius ``radius`` but slightly blurred on the border by ``blur``
    pixels.

    Parameters
    ----------

    screensize : tuple or list
        Size of the canvas.

    center : tuple or list
        Center of the circle.

    radius : float
        Radius of the circle, in pixels.

    bg_color : tuple or float, optional
        Color for the background of the canvas. As default, black.

    blur : float, optional
        Blur for the border of the circle.

    Examples
    --------

    .. code:: python

        from moviepy.video.tools.drawing import circle

        circle(
            (5, 5),  # size
            (2, 2),  # center
            2,      # radius
        )
        # array([[0.        , 0.        , 0.        , 0.        , 0.        ],
        #        [0.        , 0.58578644, 1.        , 0.58578644, 0.        ],
        #        [0.        , 1.        , 1.        , 1.        , 0.        ],
        #        [0.        , 0.58578644, 1.        , 0.58578644, 0.        ],
        #        [0.        , 0.        , 0.        , 0.        , 0.        ]])
    
moviepy/video/tools/drawing.py