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

Skip to content

Commit 75fde88

Browse files
authored
Merge pull request #8687 from tacaswell/fix_gtk_blit
FIX: gtk blitting
2 parents 6dd935b + 1a48348 commit 75fde88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_gtkagg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ static PyObject *Py_agg_to_gtk_drawable(PyObject *self, PyObject *args, PyObject
7171
destwidth = (int)(rect.x2 - rect.x1);
7272
destheight = (int)(rect.y2 - rect.y1);
7373
deststride = destwidth * 4;
74-
destbuffer.reserve(destheight * deststride);
75-
destbufferptr = &destbuffer[0];
74+
destbuffer.resize(destheight * deststride, 0);
75+
destbufferptr = &destbuffer.front();
7676

7777
agg::rendering_buffer destrbuf;
7878
destrbuf.attach(destbufferptr, destwidth, destheight, deststride);

0 commit comments

Comments
 (0)