diff --git a/arcade/draw/line.py b/arcade/draw/line.py index 7473a02b7c..a2e232f6ea 100644 --- a/arcade/draw/line.py +++ b/arcade/draw/line.py @@ -1,7 +1,7 @@ import array from arcade import gl -from arcade.types import Color, Point2List, RGBOrA255 +from arcade.types import Color, Point2, Point2List, RGBOrA255 from arcade.window_commands import get_window from .helpers import _generic_draw_line_strip, get_points_for_thick_line @@ -23,8 +23,8 @@ def draw_line_strip(point_list: Point2List, color: RGBOrA255, line_width: float if line_width == 1: _generic_draw_line_strip(point_list, color, gl.LINE_STRIP) else: - triangle_point_list: Point2List = [] - # This needs a lot of improvement + triangle_point_list: list[Point2] = [] + # FIXME: This needs a lot of improvement last_point = None for point in point_list: if last_point is not None: diff --git a/arcade/draw/polygon.py b/arcade/draw/polygon.py index 25921d3604..7ea68aa6fd 100644 --- a/arcade/draw/polygon.py +++ b/arcade/draw/polygon.py @@ -1,6 +1,6 @@ from arcade import gl from arcade.earclip import earclip -from arcade.types import Point2List, RGBOrA255 +from arcade.types import Point2, Point2List, RGBOrA255 from .helpers import _generic_draw_line_strip, get_points_for_thick_line @@ -40,7 +40,7 @@ def draw_polygon_outline(point_list: Point2List, color: RGBOrA255, line_width: f new_point_list.append(point_list[0]) # Create a place to store the triangles we'll use to thicken the line - triangle_point_list = [] + triangle_point_list: list[Point2] = [] # This needs a lot of improvement last_point = None diff --git a/arcade/texture_atlas/uv_data.py b/arcade/texture_atlas/uv_data.py index e8b9fee2ec..1cd439c566 100644 --- a/arcade/texture_atlas/uv_data.py +++ b/arcade/texture_atlas/uv_data.py @@ -124,7 +124,11 @@ def get_existing_or_free_slot(self, name: str) -> int: return slot except IndexError: raise Exception( - ("No more free slots in the UV texture. " f"Max number of slots: {self._num_slots}") + ( + "No more free slots in the UV texture." + f"Max number of textures: {self._num_slots}." + "Consider creating a texture atlas with a larger capacity." + ) ) def free_slot_by_name(self, name: str) -> None: