Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1a48348

Browse filesBrowse files
committed
FIX: gtk blitting
- Resize (rather than reserve) stl vector which will serve as our buffer. - use `front` rather than `[0]` to get the first element to get the pointer closes #8684
1 parent eea8e4f commit 1a48348
Copy full SHA for 1a48348

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎src/_gtkagg.cpp‎

Copy file name to clipboardExpand all lines: src/_gtkagg.cpp
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.