On Sat, Jul 24, 2010 at 3:11 PM, John Hunter <jdh2...@gmail.com> wrote:

> On Sat, Jul 24, 2010 at 1:56 PM, Benjamin Root <ben.r...@ou.edu> wrote:
> > On Sat, Jul 24, 2010 at 12:17 PM, João Luís Silva <jsi...@fc.up.pt>
> wrote:
> >>
> >> On 07/13/2010 02:31 AM, John Hunter wrote:
> >>>
> >>> On Mon, Jul 12, 2010 at 8:05 PM, John Hunter<jdh2...@gmail.com>
>  wrote:
> >>>>
> >>>> All of which is discouraging: we both see bugs but different ones on
> >>>> linux, the appearance of the bug is caused by adding a combobox which
> >>>> is not used (on my system), the bug appears on some platforms (linux)
> >>>> but not others (win) and it appears for both gtk and gtkagg.
> >>>
> >>> The last thing I'll add for now is that my bug, the black pixel noise
> >>> (fills the axes window when motion starts in a zoom-to-rect event)
> >>> which may be unrelated to your bug, is happening in
> >>> backend_gtk.NavigationToolbar2GTK.draw_rubberband in the pair of
> >>> calls:
> >>>
> >>>   # this is used to copy the background that the zoom to rect
> >>> "rubberband" will be drawn over
> >>>   self._imageBack = axrect, drawable.get_image(*axrect)
> >>>
> >>>   # this is used to restore the background before redrawing the
> >>> rectangle for the zoom box
> >>>   drawable.draw_image(gc, imageBack, 0, 0, *lastrect)
> >>>
> >>> Since the bug is only exposed when a combo box is added to the
> >>> hierarchy, and appears to be platform or gtk specific, I'm suspecting
> >>> a gtk bug at this point.  But I don't have anything conclusive or a
> >>> minimal example which I could use to post to the gtk list.  The mpl
> >>> calls and values (axrect, lastrect, etc) look correct on inspection.
> >>> Somehow the call to drawable.get_image is getting a buffer full of
> >>> noise if and only if the combobox is added to the vbox.
> >>>
> >>> JDH
> >>
> >> >From what I could understand from the pygtk documentation get_image /
> >> draw_image are client-side operations. In particular:
> >>
> >> "If the source drawable is a Gdk::Window and partially offscreen or
> >> obscured, then the obscured portions of the returned image will contain
> >> undefined data."
> >>
> >> Anyway they recommend using Pixmap, which is server-side and a offscreen
> >> drawable. I've attached a patch that replaces the get_image / draw_image
> >> with Pixmap operations and fixes this bug. I've tested this patch on
> Linux
> >> and Windows.
> >>
> >> Regards,
> >> João Luís
> >
> > The patch works for me.  I am using the mpl from svn.
>
> Have you tested with any of the animation and blit examples?  How
> about some of the widget examples?  If all these work for you, I
> suggest committing it to the branch and merging to the trunk.
>
> Thanks,
> JDH
>

I tried a bunch of the animation examples and widget examples with and
without the patch.  I could not find one that was affected by this bug,
however, none of them were adversely affected by the patch.  However, both
of the plot_moves.py scripts were improved by the patch.

Ben Root
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to