@@ -235,25 +235,14 @@ def connect_bbox(bbox1, bbox2, loc1, loc2=None):
235235 corner of *bbox2*.
236236 """
237237 if isinstance (bbox1 , Rectangle ):
238- transform = bbox1 .get_transform ()
239- bbox1 = Bbox .from_bounds (0 , 0 , 1 , 1 )
240- bbox1 = TransformedBbox (bbox1 , transform )
241-
238+ bbox1 = TransformedBbox (Bbox .unit (), bbox1 .get_transform ())
242239 if isinstance (bbox2 , Rectangle ):
243- transform = bbox2 .get_transform ()
244- bbox2 = Bbox .from_bounds (0 , 0 , 1 , 1 )
245- bbox2 = TransformedBbox (bbox2 , transform )
246-
240+ bbox2 = TransformedBbox (Bbox .unit (), bbox2 .get_transform ())
247241 if loc2 is None :
248242 loc2 = loc1
249-
250243 x1 , y1 = BboxConnector .get_bbox_edge_pos (bbox1 , loc1 )
251244 x2 , y2 = BboxConnector .get_bbox_edge_pos (bbox2 , loc2 )
252-
253- verts = [[x1 , y1 ], [x2 , y2 ]]
254- codes = [Path .MOVETO , Path .LINETO ]
255-
256- return Path (verts , codes )
245+ return Path ([[x1 , y1 ], [x2 , y2 ]])
257246
258247 @docstring .dedent_interpd
259248 def __init__ (self , bbox1 , bbox2 , loc1 , loc2 = None , ** kwargs ):
0 commit comments