Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt4 clear before draw #2449

Merged
merged 1 commit into from Sep 23, 2013
Merged

Conversation

tacaswell
Copy link
Member

Clears the canvas before re-drawing the QtAgg canvas. This matters if you have an updating figure with a transparent patch (http://stackoverflow.com/questions/18944561/matplotlib-pyqt4-transparent-figure).

I think this is a bug fix, but this will rebase cleanly to master if people disagree.

being able to see shadows of previous draws underneath.

see: http://stackoverflow.com/questions/18944561/matplotlib-pyqt4-transparent-figure

Added some documentation to `paintEvent`
@pelson
Copy link
Member

pelson commented Sep 23, 2013

I fixed a similar bug a couple of months ago on the *Agg backends. The relevant change was d8fce7b - did that not fix this problem for you?

@mdboom
Copy link
Member

mdboom commented Sep 23, 2013

I think d8fce7b only dealt with the Agg buffer. This clears the Qt window buffer before transferring the Agg buffer.

Seems reasonable for the maintenance branch to me -- I doubt anyone is relying on retention of the image beneath the transparent pixels.

@tacaswell
Copy link
Member Author

I saw this issue on more-or-less current master.

@pelson
Copy link
Member

pelson commented Sep 23, 2013

I doubt anyone is relying on retention of the image beneath the transparent pixels.

And if they are, they deserve what they get:

New features
(http://xkcd.com/1172/)

@pelson
Copy link
Member

pelson commented Sep 23, 2013

👍 for against 1.3

@pelson
Copy link
Member

pelson commented Sep 23, 2013

I've tested this against PySide on RHEL6 and it gets my 👍

mdboom added a commit that referenced this pull request Sep 23, 2013
@mdboom mdboom merged commit 513637b into matplotlib:v1.3.x Sep 23, 2013
@tacaswell tacaswell deleted the qt4_clear_before_draw branch September 23, 2013 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants