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

Skip to content

Commit 09576fa

Browse files
committed
silence warnings, fix build on old MSC compilers
1 parent c2a7143 commit 09576fa

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/_tkagg.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#include <cstdio>
1414
#include <sstream>
1515

16+
#include <mplutils.h> // uint8_t on old MSC_VER
17+
1618
// Include our own excerpts from the Tcl / Tk headers
1719
#include "_tkmini.h"
1820

@@ -101,10 +103,10 @@ static int PyAggImagePhoto(ClientData clientdata, Tcl_Interp *interp, int
101103

102104
if (has_bbox) {
103105
int srcstride = wdata * 4;
104-
destx = x1;
105-
desty = hdata - y2;
106-
destwidth = x2 - x1;
107-
destheight = y2 - y1;
106+
destx = (int)x1;
107+
desty = (int)(hdata - y2);
108+
destwidth = (int)(x2 - x1);
109+
destheight = (int)(y2 - y1);
108110
deststride = 4 * destwidth;
109111

110112
destbuffer = new uint8_t[deststride * destheight];

0 commit comments

Comments
 (0)