Hello All,

I have attached a patch that updates backend_fltkagg.py to use the new
Transform APIs for 0.98.0 (
http://matplotlib.sourceforge.net/api/api_changes.html#notes-about-the-transforms-refactoring).
Without these changes, trying to use FLTKAgg causes a crash with a very
cryptic error.

Thanks for all your work on matplotlib!

Daniel
Index: lib/matplotlib/backends/backend_fltkagg.py
===================================================================
--- lib/matplotlib/backends/backend_fltkagg.py	(revision 7174)
+++ lib/matplotlib/backends/backend_fltkagg.py	(working copy)
@@ -115,6 +115,7 @@
     window = Fltk.Fl_Double_Window(10,10,30,30)
     canvas = FigureCanvasFltkAgg(figure)
     window.end()
+    #Fltk.Fl.visual(Fltk.FL_DOUBLE)
     window.show()
     window.make_current()
     figManager = FigureManagerFltkAgg(canvas, num, window)
@@ -157,7 +158,7 @@
     def handle(self, event):
         x=Fltk.Fl.event_x()
         y=Fltk.Fl.event_y()
-        yf=self._source.figure.bbox.height() - y
+        yf=self._source.figure.bbox.height - y
         if event == Fltk.FL_FOCUS or event == Fltk.FL_UNFOCUS:
             return 1
         elif event == Fltk.FL_KEYDOWN:
@@ -230,7 +231,7 @@
     def resize(self,size):
         w, h = size
         # compute desired figure size in inches
-        dpival = self.figure.dpi.get()
+        dpival = self.figure.dpi
         winch = w/dpival
         hinch = h/dpival
         self.figure.set_size_inches(winch,hinch)
@@ -405,7 +406,7 @@
     """
 
     def __init__(self, canvas, figman):
-        #xmin, xmax = canvas.figure.bbox.intervalx().get_bounds()
+        #xmin, xmax = canvas.figure.bbox.intervalx
         #height, width = 50, xmax-xmin
         self.canvas = canvas
         self.figman = figman
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to