@@ -954,9 +954,9 @@ RendererAgg::draw_text_image(const Py::Tuple& args)
954
954
" First argument to draw_text_image must be a FT2Font.Image object or a Nx2 uint8 numpy array." );
955
955
}
956
956
image_obj = Py::Object (image_array, true );
957
- buffer = (unsigned char *)PyArray_DATA (image_array);
958
- width = PyArray_DIM (image_array, 1 );
959
- height = PyArray_DIM (image_array, 0 );
957
+ buffer = (unsigned char *)PyArray_DATA ((PyArrayObject*) image_array);
958
+ width = PyArray_DIM ((PyArrayObject*) image_array, 1 );
959
+ height = PyArray_DIM ((PyArrayObject*) image_array, 0 );
960
960
}
961
961
else
962
962
{
@@ -1546,11 +1546,11 @@ RendererAgg::_draw_path_collection_generic
1546
1546
}
1547
1547
1548
1548
size_t Npaths = path_generator.num_paths ();
1549
- size_t Noffsets = offsets-> dimensions [ 0 ] ;
1549
+ size_t Noffsets = PyArray_DIM ( offsets, 0 ) ;
1550
1550
size_t N = std::max (Npaths, Noffsets);
1551
- size_t Ntransforms = transforms_arr-> dimensions [ 0 ] ;
1552
- size_t Nfacecolors = facecolors-> dimensions [ 0 ] ;
1553
- size_t Nedgecolors = edgecolors-> dimensions [ 0 ] ;
1551
+ size_t Ntransforms = PyArray_DIM ( transforms_arr, 0 ) ;
1552
+ size_t Nfacecolors = PyArray_DIM ( facecolors, 0 ) ;
1553
+ size_t Nedgecolors = PyArray_DIM ( edgecolors, 0 ) ;
1554
1554
size_t Nlinewidths = linewidths.length ();
1555
1555
size_t Nlinestyles = std::min (linestyles_obj.length (), N);
1556
1556
size_t Naa = antialiaseds.length ();
0 commit comments