@@ -775,6 +775,8 @@ class TextArea(OffsetBox):
775
775
width and height of the TextArea instance is the width and height of its
776
776
child text.
777
777
"""
778
+
779
+ @cbook ._delete_parameter ("3.4" , "minimumdescent" )
778
780
def __init__ (self , s ,
779
781
textprops = None ,
780
782
multilinebaseline = None ,
@@ -794,8 +796,9 @@ def __init__(self, s,
794
796
If `True`, baseline for multiline text is adjusted so that it is
795
797
(approximately) center-aligned with singleline text.
796
798
797
- minimumdescent : bool, optional
798
- If `True`, the box has a minimum descent of "p".
799
+ minimumdescent : bool, default: True
800
+ If `True`, the box has a minimum descent of "p". This is now
801
+ effectively always True.
799
802
"""
800
803
if textprops is None :
801
804
textprops = {}
@@ -835,16 +838,20 @@ def get_multilinebaseline(self):
835
838
"""
836
839
return self ._multilinebaseline
837
840
841
+ @cbook .deprecated ("3.4" )
838
842
def set_minimumdescent (self , t ):
839
843
"""
840
844
Set minimumdescent.
841
845
842
846
If True, extent of the single line text is adjusted so that
843
- it has minimum descent of "p"
847
+ its descent is at least the one of the glyph "p".
844
848
"""
849
+ # The current implementation of Text._get_layout always behaves as if
850
+ # this is True.
845
851
self ._minimumdescent = t
846
852
self .stale = True
847
853
854
+ @cbook .deprecated ("3.4" )
848
855
def get_minimumdescent (self ):
849
856
"""
850
857
Get minimumdescent.
@@ -893,16 +900,8 @@ def get_extent(self, renderer):
893
900
yd_new = 0.5 * h - 0.5 * (h_ - d_ )
894
901
self ._baseline_transform .translate (0 , yd - yd_new )
895
902
yd = yd_new
896
-
897
903
else : # single line
898
-
899
904
h_d = max (h_ - d_ , h - yd )
900
-
901
- if self .get_minimumdescent ():
902
- # To have a minimum descent, i.e., "l" and "p" have same
903
- # descents.
904
- yd = max (yd , d_ )
905
-
906
905
h = h_d + yd
907
906
908
907
ha = self ._text .get_horizontalalignment ()
@@ -1300,7 +1299,7 @@ def __init__(self, s, loc, pad=0.4, borderpad=0.5, prop=None, **kwargs):
1300
1299
raise ValueError (
1301
1300
'Mixing verticalalignment with AnchoredText is not supported.' )
1302
1301
1303
- self .txt = TextArea (s , textprops = prop , minimumdescent = False )
1302
+ self .txt = TextArea (s , textprops = prop )
1304
1303
fp = self .txt ._text .get_fontproperties ()
1305
1304
super ().__init__ (
1306
1305
loc , pad = pad , borderpad = borderpad , child = self .txt , prop = fp ,
0 commit comments