add get_bounds_nonempty
This commit is contained in:
parent
780d1ca97f
commit
0471addd65
3 changed files with 24 additions and 1 deletions
|
|
@ -332,7 +332,7 @@ class Path(Shape, metaclass=AutoSlots):
|
|||
bounds = numpy.array([[+inf, +inf], [-inf, -inf]])
|
||||
polys = self.to_polygons()
|
||||
for poly in polys:
|
||||
poly_bounds = poly.get_bounds()
|
||||
poly_bounds = poly.get_bounds_nonempty()
|
||||
bounds[0, :] = numpy.minimum(bounds[0, :], poly_bounds[0, :])
|
||||
bounds[1, :] = numpy.maximum(bounds[1, :], poly_bounds[1, :])
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue