@@ -115,6 +115,7 @@ def __init__(self,
115
115
wrap = False ,
116
116
transform_rotates_text = False ,
117
117
parse_math = None , # defaults to rcParams['text.parse_math']
118
+ antialiased = None ,
118
119
** kwargs
119
120
):
120
121
"""
@@ -135,6 +136,7 @@ def __init__(self,
135
136
super ().__init__ ()
136
137
self ._x , self ._y = x , y
137
138
self ._text = ''
139
+ self ._antialiased = None
138
140
self ._reset_visual_defaults (
139
141
text = text ,
140
142
color = color ,
@@ -149,6 +151,7 @@ def __init__(self,
149
151
transform_rotates_text = transform_rotates_text ,
150
152
linespacing = linespacing ,
151
153
rotation_mode = rotation_mode ,
154
+ antialiased = antialiased
152
155
)
153
156
self .update (kwargs )
154
157
@@ -167,6 +170,7 @@ def _reset_visual_defaults(
167
170
transform_rotates_text = False ,
168
171
linespacing = None ,
169
172
rotation_mode = None ,
173
+ antialiased = None
170
174
):
171
175
self .set_text (text )
172
176
self .set_color (
@@ -187,6 +191,7 @@ def _reset_visual_defaults(
187
191
linespacing = 1.2 # Maybe use rcParam later.
188
192
self .set_linespacing (linespacing )
189
193
self .set_rotation_mode (rotation_mode )
194
+ self .set_antialiased (antialiased )
190
195
191
196
def update (self , kwargs ):
192
197
# docstring inherited
@@ -309,6 +314,21 @@ def get_rotation_mode(self):
309
314
"""Return the text rotation mode."""
310
315
return self ._rotation_mode
311
316
317
+ def set_antialiased (self , b ):
318
+ """
319
+ Set whether to use antialiased rendering.
320
+
321
+ Parameters
322
+ ----------
323
+ b : bool
324
+ """
325
+ self ._antialiased = b
326
+ self .stale = True
327
+
328
+ def get_antialiased (self ):
329
+ """Return whether antialiased rendering is used."""
330
+ return self ._antialiased
331
+
312
332
def update_from (self , other ):
313
333
# docstring inherited
314
334
super ().update_from (other )
0 commit comments