@@ -297,6 +297,7 @@ def set_rotation_mode(self, m):
297297 self ._rotation_mode = m
298298 else :
299299 raise ValueError ("Unknown rotation_mode : %s" % repr (m ))
300+ self .stale = True
300301
301302 def get_rotation_mode (self ):
302303 "get text rotation mode"
@@ -313,6 +314,7 @@ def update_from(self, other):
313314 self ._rotation = other ._rotation
314315 self ._picker = other ._picker
315316 self ._linespacing = other ._linespacing
317+ self .stale = True
316318
317319 def _get_layout (self , renderer ):
318320 """
@@ -786,6 +788,7 @@ def draw(self, renderer):
786788
787789 gc .restore ()
788790 renderer .close_group ('text' )
791+ self .stale = False
789792
790793 def get_color (self ):
791794 "Return the color of the text"
@@ -963,6 +966,7 @@ def set_backgroundcolor(self, color):
963966 self ._bbox .update (dict (facecolor = color ))
964967
965968 self ._update_clip_properties ()
969+ self .stale = True
966970
967971 def set_color (self , color ):
968972 """
@@ -976,6 +980,7 @@ def set_color(self, color):
976980 except TypeError :
977981 color = tuple (color )
978982 self ._color = color
983+ self .stale = True
979984
980985 def set_ha (self , align ):
981986 'alias for set_horizontalalignment'
@@ -992,6 +997,7 @@ def set_horizontalalignment(self, align):
992997 raise ValueError ('Horizontal alignment must be one of %s' %
993998 str (legal ))
994999 self ._horizontalalignment = align
1000+ self .stale = True
9951001
9961002 def set_ma (self , align ):
9971003 'alias for set_verticalalignment'
@@ -1011,6 +1017,7 @@ def set_multialignment(self, align):
10111017 raise ValueError ('Horizontal alignment must be one of %s' %
10121018 str (legal ))
10131019 self ._multialignment = align
1020+ self .stale = True
10141021
10151022 def set_linespacing (self , spacing ):
10161023 """
@@ -1020,6 +1027,7 @@ def set_linespacing(self, spacing):
10201027 ACCEPTS: float (multiple of font size)
10211028 """
10221029 self ._linespacing = spacing
1030+ self .stale = True
10231031
10241032 def set_family (self , fontname ):
10251033 """
@@ -1033,6 +1041,7 @@ def set_family(self, fontname):
10331041 'monospace' ]
10341042 """
10351043 self ._fontproperties .set_family (fontname )
1044+ self .stale = True
10361045
10371046 def set_variant (self , variant ):
10381047 """
@@ -1041,6 +1050,7 @@ def set_variant(self, variant):
10411050 ACCEPTS: [ 'normal' | 'small-caps' ]
10421051 """
10431052 self ._fontproperties .set_variant (variant )
1053+ self .stale = True
10441054
10451055 def set_fontvariant (self , variant ):
10461056 'alias for set_variant'
@@ -1061,6 +1071,7 @@ def set_style(self, fontstyle):
10611071 ACCEPTS: [ 'normal' | 'italic' | 'oblique']
10621072 """
10631073 self ._fontproperties .set_style (fontstyle )
1074+ self .stale = True
10641075
10651076 def set_fontstyle (self , fontstyle ):
10661077 'alias for set_style'
@@ -1075,6 +1086,7 @@ def set_size(self, fontsize):
10751086 'medium' | 'large' | 'x-large' | 'xx-large' ]
10761087 """
10771088 self ._fontproperties .set_size (fontsize )
1089+ self .stale = True
10781090
10791091 def set_fontsize (self , fontsize ):
10801092 'alias for set_size'
@@ -1090,6 +1102,7 @@ def set_weight(self, weight):
10901102 'extra bold' | 'black' ]
10911103 """
10921104 self ._fontproperties .set_weight (weight )
1105+ self .stale = True
10931106
10941107 def set_fontweight (self , weight ):
10951108 'alias for set_weight'
@@ -1105,6 +1118,7 @@ def set_stretch(self, stretch):
11051118 'ultra-expanded' ]
11061119 """
11071120 self ._fontproperties .set_stretch (stretch )
1121+ self .stale = True
11081122
11091123 def set_fontstretch (self , stretch ):
11101124 'alias for set_stretch'
@@ -1126,6 +1140,7 @@ def set_x(self, x):
11261140 ACCEPTS: float
11271141 """
11281142 self ._x = x
1143+ self .stale = True
11291144
11301145 def set_y (self , y ):
11311146 """
@@ -1134,6 +1149,7 @@ def set_y(self, y):
11341149 ACCEPTS: float
11351150 """
11361151 self ._y = y
1152+ self .stale = True
11371153
11381154 def set_rotation (self , s ):
11391155 """
@@ -1142,6 +1158,7 @@ def set_rotation(self, s):
11421158 ACCEPTS: [ angle in degrees | 'vertical' | 'horizontal' ]
11431159 """
11441160 self ._rotation = s
1161+ self .stale = True
11451162
11461163 def set_va (self , align ):
11471164 'alias for set_verticalalignment'
@@ -1159,6 +1176,7 @@ def set_verticalalignment(self, align):
11591176 str (legal ))
11601177
11611178 self ._verticalalignment = align
1179+ self .stale = True
11621180
11631181 def set_text (self , s ):
11641182 """
@@ -1169,6 +1187,7 @@ def set_text(self, s):
11691187 ACCEPTS: string or anything printable with '%s' conversion.
11701188 """
11711189 self ._text = '%s' % (s ,)
1190+ self .stale = True
11721191
11731192 @staticmethod
11741193 def is_math_text (s ):
@@ -1201,6 +1220,7 @@ def set_fontproperties(self, fp):
12011220 if is_string_like (fp ):
12021221 fp = FontProperties (fp )
12031222 self ._fontproperties = fp .copy ()
1223+ self .stale = True
12041224
12051225 def set_font_properties (self , fp ):
12061226 'alias for set_fontproperties'
@@ -1217,6 +1237,7 @@ def set_usetex(self, usetex):
12171237 self ._usetex = None
12181238 else :
12191239 self ._usetex = bool (usetex )
1240+ self .stale = True
12201241
12211242 def get_usetex (self ):
12221243 """
0 commit comments