Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Arcade [PyPi Release History](https://pypi.org/project/arcade/#history) page.
atlas is resized or rebuilt. This way it's easy to track when texture coordinates
has changed.
- Added `Text.visible` (bool) property to control the visibility of text objects.
- Fixed an issue causing points and lines to draw random primitives when
passing in an empty list.

## 3.3.0

Expand Down
2 changes: 2 additions & 0 deletions arcade/draw/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ def draw_lines(point_list: Point2List, color: RGBOrA255, line_width: float = 1)

line_pos_array = array.array("f", (v for point in point_list for v in point))
num_points = len(point_list)
if num_points == 0:
return

# Grow buffer until large enough to hold all our data
goal_buffer_size = num_points * 3 * 4
Expand Down
2 changes: 2 additions & 0 deletions arcade/draw/point.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def draw_points(point_list: Point2List, color: RGBOrA255, size: float = 1.0) ->

# Get # of points and translate Python tuples to a C-style array
num_points = len(point_list)
if num_points == 0:
return
point_array = array.array("f", (v for point in point_list for v in point))

# Resize buffer
Expand Down
Loading