@@ -557,7 +557,7 @@ def draw(self, renderer):
557
557
self .stale = False
558
558
559
559
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 )
561
561
if fontsize :
562
562
self .patch .set_mutation_scale (fontsize )
563
563
self .stale = True
@@ -811,7 +811,7 @@ def get_extent(self, renderer):
811
811
ismath = "TeX" if self ._text .get_usetex () else False )
812
812
813
813
bbox , info , yd = self ._text ._get_layout (renderer )
814
- w , h = bbox .width , bbox . height
814
+ w , h = bbox .size
815
815
816
816
self ._baseline_transform .clear ()
817
817
@@ -1111,7 +1111,7 @@ def _offset(w, h, xd, yd, renderer):
1111
1111
self .set_offset (_offset )
1112
1112
1113
1113
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 )
1115
1115
if fontsize :
1116
1116
self .patch .set_mutation_scale (fontsize )
1117
1117
@@ -1146,8 +1146,7 @@ def _get_anchored_bbox(loc, bbox, parentbbox, borderpad):
1146
1146
# validated. If 0 (None), we just let ``bbox.anchored`` raise.
1147
1147
c = [None , "NE" , "NW" , "SW" , "SE" , "E" , "W" , "E" , "S" , "N" , "C" ][loc ]
1148
1148
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
1151
1150
1152
1151
1153
1152
class AnchoredText (AnchoredOffsetbox ):
@@ -1487,8 +1486,7 @@ def _update_position_xybox(self, renderer, xy_pixel):
1487
1486
1488
1487
# update patch position
1489
1488
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 )
1492
1490
1493
1491
x , y = xy_pixel
1494
1492
0 commit comments