@@ -28,7 +28,7 @@ object around the draw calls (see :func:`pygame.Surface.lock` and
2828 See the :mod:`pygame.gfxdraw` module for alternative draw methods.
2929"""
3030
31- from typing import overload
31+ from typing import overload , Union
3232
3333from pygame .rect import Rect
3434from pygame .surface import Surface
@@ -571,20 +571,19 @@ def aalines(
571571
572572 def flood_fill (
573573 surface : Surface ,
574- color : ColorLike ,
574+ color : Union [ ColorLike , Surface ] ,
575575 start_point : Point
576- ) -> Rect :
576+ ) -> Rect :
577577 """Replace the color of a cluster of connected same-color pixels, beginning
578578 from the starting point, with a repeating pattern or solid single color
579-
579+
580580 :param Surface surface: surface to draw on
581581 :param color: color to draw with, the alpha value is optional if using a
582582 tuple ``(RGB[A])``
583- :type color: Color or string (for :doc:`color_list`) or int or tuple(int, int, int, [int])
584- :param pattern_surface: pattern to fill with, as a surface
585- :param starting_point: starting point as a sequence of 2 ints/floats,
583+ :type color: :data:`pygame.typing.ColorLike` or a pattern to fill with, as a Surface
584+ :param start_point: starting point as a sequence of 2 ints/floats,
586585 e.g. ``(x, y)``
587- :type starting_point : tuple(int or float, int or float) or
586+ :type start_point : tuple(int or float, int or float) or
588587 list(int or float, int or float) or Vector2(int or float, int or float)
589588
590589 :returns: a rect bounding the changed pixels, if nothing is drawn the
0 commit comments