77from arcade .exceptions import ReplacementWarning , warning
88from arcade .hitbox import HitBox
99from arcade .texture import Texture
10- from arcade .types import LRBT , RGBA255 , AsFloat , Color , Point , Point2 , Point2List , Rect , RGBOrA255
10+ from arcade .types import LRBT , AsFloat , Color , Point , Point2 , Point2List , Rect , RGBOrA255
1111from arcade .utils import copy_dunders_unimplemented
1212
1313if TYPE_CHECKING :
@@ -764,7 +764,7 @@ def remove_from_sprite_lists(self) -> None:
764764
765765 # ----- Drawing Methods -----
766766
767- def draw_hit_box (self , color : RGBA255 = BLACK , line_thickness : float = 2.0 ) -> None :
767+ def draw_hit_box (self , color : RGBOrA255 = BLACK , line_thickness : float = 2.0 ) -> None :
768768 """
769769 Draw a sprite's hit-box. This is useful for debugging.
770770
@@ -774,10 +774,11 @@ def draw_hit_box(self, color: RGBA255 = BLACK, line_thickness: float = 2.0) -> N
774774 line_thickness:
775775 How thick the box should be
776776 """
777+ converted_color = Color .from_iterable (color )
777778 points : Point2List = self .hit_box .get_adjusted_points ()
778779 # NOTE: This is a COPY operation. We don't want to modify the points.
779780 points = tuple (points ) + tuple (points [:- 1 ])
780- arcade .draw_line_strip (points , color = color , line_width = line_thickness )
781+ arcade .draw_line_strip (points , color = converted_color , line_width = line_thickness )
781782
782783 # ---- Shortcut Methods ----
783784
0 commit comments