Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 53aafbf

Browse files
committed
removed screen noise comments from gtkagg and image since I no longer consider this to be a bug
svn path=/trunk/matplotlib/; revision=5785
1 parent d795d42 commit 53aafbf

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

lib/matplotlib/backends/backend_gtkagg.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,6 @@ def _render_figure(self, pixmap, width, height):
8181
w = int(ren.width)
8282
h = int(ren.height)
8383

84-
# There apparently is a bug here on some versions of pygtk
85-
# (2.6) that crops up in corner cases. Eg, in
86-
# figimage_demo.py, there is background pixel noise because
87-
# the figure frame is off and the blended image background has
88-
# alpha 0. and you see the uninitialzed data ("screen noise").
89-
# If in _image.cpp Image:from_image you fill the background
90-
# with a non transparent value, it goes away.
9184
pixbuf = gtk.gdk.pixbuf_new_from_data(
9285
buf, gtk.gdk.COLORSPACE_RGB, True, 8, w, h, w*4)
9386
pixmap.draw_pixbuf(pixmap.new_gc(), pixbuf, 0, 0, 0, 0, w, h,

src/_image.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -743,9 +743,6 @@ _image_module::from_images(const Py::Tuple& args) {
743743
renderer_base rb(pixf);
744744

745745

746-
//clear the background of the rendering buffer with alpha 1 and the
747-
//gtkagg screen noise problem in figimage_demo.py goes away -- see
748-
//comment backend_gtkagg.py _render_figure method JDH
749746
rb.clear(agg::rgba(1, 1, 1, 1));
750747

751748
for (size_t imnum=0; imnum< N; imnum++) {

0 commit comments

Comments
 (0)