Esempio n. 1
0
def to_rect(r):
    if isinstance(r, Rect):
        return r
    (l, b), (right, t) = (r.b_box or r.db_id.b_box)

    return Rect.from_edges(l, right, b, t, layer_of(r))
Esempio n. 2
0
 def _bbox(self) -> Rect:
     (left, bottom), (right, top) = self.db.b_box
     return Rect.from_edges(left, right, bottom, top)