Skip to content

Commit cd6ec85

Browse files
committed
Fixed another flipy bug in tkagg blitting.
svn path=/trunk/matplotlib/; revision=1883
1 parent 6587aec commit cd6ec85

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2005-11-28 Got TkAgg blitting working 100% (cross fingers) correctly. - CM
2+
13
2005-11-27 Multiple changes in cm.py, colors.py, figure.py, image.py,
24
contour.py, contour_demo.py; new _cm.py, examples/image_masked.py.
35
1) Separated the color table data from cm.py out into

lib/matplotlib/backends/tkagg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
def blit(photoimage, aggimage, bbox=None, colormode=1):
55
tk = photoimage.tk
6+
67
try:
78
tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode, id(bbox))
89
except Tk.TclError, v:

src/_tkagg.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ PyAggImagePhoto(ClientData clientdata, Tcl_Interp* interp,
9292

9393
destx = (int)l;
9494
desty = srcheight-(int)t;
95-
//desty = (int)b;
9695
destwidth = (int)(r-l);
9796
destheight = (int)(t-b);
9897
deststride = 4*destwidth;
@@ -107,7 +106,7 @@ PyAggImagePhoto(ClientData clientdata, Tcl_Interp* interp,
107106
pixfmt destpf(destrbuf);
108107
renderer_base destrb(destpf);
109108

110-
agg::rect_base<int> region(destx, desty, (int)r, (int)t);
109+
agg::rect_base<int> region(destx, desty, (int)r, srcheight-(int)b);
111110
destrb.copy_from(*aggRenderer->renderingBuffer, &region,
112111
-destx, -desty);
113112
} else {

0 commit comments

Comments
 (0)