This commit is contained in:
Isaiah Odhner 2023-05-19 00:38:32 -04:00
parent 14725279c9
commit 81720d51e6

View File

@ -1403,7 +1403,10 @@ class AnsiArtDocument:
x = int((x - min_x) / cell_width)
y = int((y - min_y) / cell_height)
if fill is not None:
document.bg[y][x] = fill
try:
document.bg[y][x] = fill
except IndexError:
print("Warning: rect out of bounds: " + ET.tostring(rect, encoding="unicode"))
# Find text elements to define the foreground.
texts = root.findall(".//{http://www.w3.org/2000/svg}text")