Revision: 4446
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4446&view=rev
Author:   mdboom
Date:     2007-11-26 08:52:53 -0800 (Mon, 26 Nov 2007)

Log Message:
-----------
Fix zooming with bounding box in Gtk and Qt backends (others seem to
already work).  Fix text rotation in Wx (non-Agg) backend.

Modified Paths:
--------------
    branches/transforms/lib/matplotlib/backends/backend_gtk.py
    branches/transforms/lib/matplotlib/backends/backend_qt.py
    branches/transforms/lib/matplotlib/backends/backend_qt4.py
    branches/transforms/lib/matplotlib/backends/backend_wx.py

Modified: branches/transforms/lib/matplotlib/backends/backend_gtk.py
===================================================================
--- branches/transforms/lib/matplotlib/backends/backend_gtk.py  2007-11-26 
16:43:19 UTC (rev 4445)
+++ branches/transforms/lib/matplotlib/backends/backend_gtk.py  2007-11-26 
16:52:53 UTC (rev 4446)
@@ -549,7 +549,7 @@
                 return
 
             ax = event.inaxes
-            l,b,w,h = [int(val) for val in ax.bbox.get_bounds()]
+            l,b,w,h = [int(val) for val in ax.bbox.bounds]
             b = int(height)-(b+h)
             axrect = l,b,w,h
             self._imageBack = axrect, drawable.get_image(*axrect)

Modified: branches/transforms/lib/matplotlib/backends/backend_qt.py
===================================================================
--- branches/transforms/lib/matplotlib/backends/backend_qt.py   2007-11-26 
16:43:19 UTC (rev 4445)
+++ branches/transforms/lib/matplotlib/backends/backend_qt.py   2007-11-26 
16:52:53 UTC (rev 4446)
@@ -102,7 +102,7 @@
     def mousePressEvent( self, event ):
         x = event.pos().x()
         # flipy so y=0 is bottom of canvas
-        y = self.figure.bbox.height() - event.pos().y()
+        y = self.figure.bbox.height - event.pos().y()
         button = self.buttond[event.button()]
         FigureCanvasBase.button_press_event( self, x, y, button )
         if DEBUG: print 'button pressed:', event.button()

Modified: branches/transforms/lib/matplotlib/backends/backend_qt4.py
===================================================================
--- branches/transforms/lib/matplotlib/backends/backend_qt4.py  2007-11-26 
16:43:19 UTC (rev 4445)
+++ branches/transforms/lib/matplotlib/backends/backend_qt4.py  2007-11-26 
16:52:53 UTC (rev 4446)
@@ -359,7 +359,7 @@
         QtGui.QApplication.setOverrideCursor( QtGui.QCursor( cursord[cursor] ) 
)
 
     def draw_rubberband( self, event, x0, y0, x1, y1 ):
-        height = self.canvas.figure.bbox.height()
+        height = self.canvas.figure.bbox.height
         y1 = height - y1
         y0 = height - y0
 

Modified: branches/transforms/lib/matplotlib/backends/backend_wx.py
===================================================================
--- branches/transforms/lib/matplotlib/backends/backend_wx.py   2007-11-26 
16:43:19 UTC (rev 4445)
+++ branches/transforms/lib/matplotlib/backends/backend_wx.py   2007-11-26 
16:52:53 UTC (rev 4446)
@@ -343,10 +343,10 @@
         if angle == 0.0:
             gfx_ctx.DrawText(s, x, y)
         else:
-            angle = angle / 180.0 * math.pi
+            rads = angle / 180.0 * math.pi
             xo = h * math.sin(rads)
             yo = h * math.cos(rads)
-            gfx_ctx.DrawRotatedText(s, x - xo, y - yo, angle)
+            gfx_ctx.DrawRotatedText(s, x - xo, y - yo, rads)
             
         gc.unselect()
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to