|
13 | 13 | #include <cstdio> |
14 | 14 | #include <sstream> |
15 | 15 |
|
16 | | -#include <mplutils.h> // uint8_t on old MSC_VER |
| 16 | +#include <agg_basics.h> // agg:int8u |
17 | 17 |
|
18 | 18 | // Include our own excerpts from the Tcl / Tk headers |
19 | 19 | #include "_tkmini.h" |
@@ -52,7 +52,7 @@ static int PyAggImagePhoto(ClientData clientdata, Tcl_Interp *interp, int |
52 | 52 | int wdata, hdata, bbox_parse; |
53 | 53 | float x1, x2, y1, y2; |
54 | 54 | bool has_bbox; |
55 | | - uint8_t *destbuffer, *buffer; |
| 55 | + agg::int8u *destbuffer, *buffer; |
56 | 56 | int destx, desty, destwidth, destheight, deststride; |
57 | 57 |
|
58 | 58 | long mode; |
@@ -80,7 +80,7 @@ static int PyAggImagePhoto(ClientData clientdata, Tcl_Interp *interp, int |
80 | 80 | (char *)NULL); |
81 | 81 | return TCL_ERROR; |
82 | 82 | } |
83 | | - buffer = (uint8_t*)pdata; |
| 83 | + buffer = (agg::int8u*)pdata; |
84 | 84 |
|
85 | 85 | /* get array mode (0=mono, 1=rgb, 2=rgba) */ |
86 | 86 | mode = atol(argv[3]); |
@@ -109,7 +109,7 @@ static int PyAggImagePhoto(ClientData clientdata, Tcl_Interp *interp, int |
109 | 109 | destheight = (int)(y2 - y1); |
110 | 110 | deststride = 4 * destwidth; |
111 | 111 |
|
112 | | - destbuffer = new uint8_t[deststride * destheight]; |
| 112 | + destbuffer = new agg::int8u[deststride * destheight]; |
113 | 113 | if (destbuffer == NULL) { |
114 | 114 | TCL_APPEND_RESULT(interp, "could not allocate memory", (char *)NULL); |
115 | 115 | return TCL_ERROR; |
|
0 commit comments