Revision: 4996
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4996&view=rev
Author:   dsdale
Date:     2008-03-10 06:44:28 -0700 (Mon, 10 Mar 2008)

Log Message:
-----------
workaround a blitting bug in backend_qt4agg

Modified Paths:
--------------
    trunk/matplotlib/CHANGELOG
    trunk/matplotlib/examples/animation_blit_qt4.py
    trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py

Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG  2008-03-10 12:46:12 UTC (rev 4995)
+++ trunk/matplotlib/CHANGELOG  2008-03-10 13:44:28 UTC (rev 4996)
@@ -1,3 +1,7 @@
+2008-03-10 Workaround a bug in backend_qt4agg's blitting due to a
+           buffer width/bbox width mismatch in _backend_agg's
+           copy_from_bbox - DSD
+
 2008-02-16 Added some new rec array functionality to mlab
            (rec_summarize, rec2txt and rec_groupby).  See
            examples/rec_groupby_demo.py.  Thanks to Tim M for rec2txt.

Modified: trunk/matplotlib/examples/animation_blit_qt4.py
===================================================================
--- trunk/matplotlib/examples/animation_blit_qt4.py     2008-03-10 12:46:12 UTC 
(rev 4995)
+++ trunk/matplotlib/examples/animation_blit_qt4.py     2008-03-10 13:44:28 UTC 
(rev 4996)
@@ -22,7 +22,7 @@
         # destroyed first and avoids a possible exception when the user clicks
         # on the window's close box.
         QtCore.QObject.__init__(self, self.canvas)
-        
+
         self.cnt = 0
 
         # create the initial line
@@ -34,7 +34,7 @@
 
     def timerEvent(self, evt):
         # See if the size has changed since last time round.
-        current_size = self.ax.bbox.width(), self.ax.bbox.height()
+        current_size = self.ax.bbox.width, self.ax.bbox.height
 
         if self.old_size != current_size:
             self.old_size = current_size

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py  2008-03-10 
12:46:12 UTC (rev 4995)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_qt4agg.py  2008-03-10 
13:44:28 UTC (rev 4996)
@@ -112,6 +112,7 @@
             l, b, r, t = bbox.extents
             w = int(r) - int(l)
             h = int(t) - int(b)
+            t = int(b) + h
             reg = self.copy_from_bbox(bbox)
             stringBuffer = reg.to_string()
             qImage = QtGui.QImage(stringBuffer, w, h, 
QtGui.QImage.Format_ARGB32)


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 2008.
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