Skip to content
Open
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
13 changes: 5 additions & 8 deletions axi/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,11 @@ def convex_hull(self):
@property
def bounds(self):
if self._bounds is None:
points = self.points
if points:
x1 = min(x for x, y in points)
x2 = max(x for x, y in points)
y1 = min(y for x, y in points)
y2 = max(y for x, y in points)
else:
x1 = x2 = y1 = y2 = 0
points = self.points + [(0, 0)]
x1 = min(x for x, y in points)
x2 = max(x for x, y in points)
y1 = min(y for x, y in points)
y2 = max(y for x, y in points)
self._bounds = (x1, y1, x2, y2)
return self._bounds

Expand Down