7
7
from arcade .exceptions import ReplacementWarning , warning
8
8
from arcade .hitbox import HitBox
9
9
from 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
11
11
from arcade .utils import copy_dunders_unimplemented
12
12
13
13
if TYPE_CHECKING :
@@ -764,7 +764,7 @@ def remove_from_sprite_lists(self) -> None:
764
764
765
765
# ----- Drawing Methods -----
766
766
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 :
768
768
"""
769
769
Draw a sprite's hit-box. This is useful for debugging.
770
770
@@ -774,10 +774,11 @@ def draw_hit_box(self, color: RGBA255 = BLACK, line_thickness: float = 2.0) -> N
774
774
line_thickness:
775
775
How thick the box should be
776
776
"""
777
+ converted_color = Color .from_iterable (color )
777
778
points : Point2List = self .hit_box .get_adjusted_points ()
778
779
# NOTE: This is a COPY operation. We don't want to modify the points.
779
780
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 )
781
782
782
783
# ---- Shortcut Methods ----
783
784
0 commit comments