@@ -16,7 +16,6 @@ class RendererBase:
1616 """An abstract base class to handle drawing/rendering operations
1717 """
1818
19-
2019 def open_group (self , s ):
2120 """open a grouping element with label s
2221 Is only currently used by backend_svg
@@ -299,6 +298,9 @@ def draw_regpoly_collection(
299298 self .draw_polygon (gc , rgbFace , zip (thisxverts , thisyverts ))
300299
301300
301+ def draw_tex (self , gc , x , y , s , prop , angle , ismath = 'TeX!' ):
302+ raise NotImplementedError
303+
302304 def draw_text (self , gc , x , y , s , prop , angle , ismath = False ):
303305 """
304306 Draw the text.Text instance s at x,y (display coords) with font
@@ -317,9 +319,6 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False):
317319 """
318320 raise NotImplementedError
319321
320- def draw_tex (self , gc , x , y , s , prop , angle , ismath = 'TeX!' ):
321- raise NotImplementedError
322-
323322 def flipy (self ):
324323 """return true if y small numbers are top for renderer
325324 Is used for drawing text (text.py) and images (image.py) only
@@ -343,6 +342,11 @@ def get_text_width_height(self, s, prop, ismath):
343342 """
344343 return 1 ,1
345344
345+ def get_width_height (self ):
346+ """return the figure width and height in points or pixels
347+ (depending on the backend), truncated to integers"""
348+ return int (self .figure .bbox .width ()), int (self .figure .bbox .height ())
349+
346350 def new_gc (self ):
347351 """
348352 Return an instance of a GraphicsContextBase
@@ -833,12 +837,6 @@ def mpl_disconnect(self, cid):
833837 return
834838
835839
836- def get_width_height (self ):
837- """return the figure width and height in points or pixels
838- (depending on the backend), truncated to integers"""
839- return int (self .figure .bbox .width ()), int (self .figure .bbox .height ())
840-
841-
842840class FigureManagerBase :
843841 """
844842 Helper class for matlab mode, wraps everything up into a neat bundle
0 commit comments