@@ -557,7 +557,7 @@ def draw(self, renderer):
557557 self .stale = False
558558
559559 def update_frame (self , bbox , fontsize = None ):
560- self .patch .set_bounds (bbox .x0 , bbox . y0 , bbox . width , bbox . height )
560+ self .patch .set_bounds (bbox .bounds )
561561 if fontsize :
562562 self .patch .set_mutation_scale (fontsize )
563563 self .stale = True
@@ -811,7 +811,7 @@ def get_extent(self, renderer):
811811 ismath = "TeX" if self ._text .get_usetex () else False )
812812
813813 bbox , info , yd = self ._text ._get_layout (renderer )
814- w , h = bbox .width , bbox . height
814+ w , h = bbox .size
815815
816816 self ._baseline_transform .clear ()
817817
@@ -1111,7 +1111,7 @@ def _offset(w, h, xd, yd, renderer):
11111111 self .set_offset (_offset )
11121112
11131113 def update_frame (self , bbox , fontsize = None ):
1114- self .patch .set_bounds (bbox .x0 , bbox . y0 , bbox . width , bbox . height )
1114+ self .patch .set_bounds (bbox .bounds )
11151115 if fontsize :
11161116 self .patch .set_mutation_scale (fontsize )
11171117
@@ -1146,8 +1146,7 @@ def _get_anchored_bbox(loc, bbox, parentbbox, borderpad):
11461146 # validated. If 0 (None), we just let ``bbox.anchored`` raise.
11471147 c = [None , "NE" , "NW" , "SW" , "SE" , "E" , "W" , "E" , "S" , "N" , "C" ][loc ]
11481148 container = parentbbox .padded (- borderpad )
1149- anchored_box = bbox .anchored (c , container = container )
1150- return anchored_box .x0 , anchored_box .y0
1149+ return bbox .anchored (c , container = container ).p0
11511150
11521151
11531152class AnchoredText (AnchoredOffsetbox ):
@@ -1487,8 +1486,7 @@ def _update_position_xybox(self, renderer, xy_pixel):
14871486
14881487 # update patch position
14891488 bbox = self .offsetbox .get_window_extent (renderer )
1490- self .patch .set_bounds (bbox .x0 , bbox .y0 ,
1491- bbox .width , bbox .height )
1489+ self .patch .set_bounds (bbox .bounds )
14921490
14931491 x , y = xy_pixel
14941492
0 commit comments