@@ -145,20 +145,6 @@ static int PyRendererAgg_init(PyRendererAgg *self, PyObject *args, PyObject *kwd
145145 return -1 ;
146146 }
147147
148- if (dpi <= 0.0 ) {
149- PyErr_SetString (PyExc_ValueError, " dpi must be positive" );
150- return -1 ;
151- }
152-
153- if (width >= 1 << 16 || height >= 1 << 16 ) {
154- PyErr_Format (
155- PyExc_ValueError,
156- " Image size of %dx%d pixels is too large. "
157- " It must be less than 2^16 in each direction." ,
158- width, height);
159- return -1 ;
160- }
161-
162148 CALL_CPP_INIT (" RendererAgg" , self->x = new RendererAgg (width, height, dpi))
163149
164150 return 0 ;
@@ -420,19 +406,6 @@ PyRendererAgg_draw_gouraud_triangles(PyRendererAgg *self, PyObject *args)
420406 &trans)) {
421407 return NULL ;
422408 }
423- if (points.shape (0 ) && !check_trailing_shape (points, " points" , 3 , 2 )) {
424- return NULL ;
425- }
426- if (colors.shape (0 ) && !check_trailing_shape (colors, " colors" , 3 , 4 )) {
427- return NULL ;
428- }
429- if (points.shape (0 ) != colors.shape (0 )) {
430- PyErr_Format (PyExc_ValueError,
431- " points and colors arrays must be the same length, got "
432- " %" NPY_INTP_FMT " points and %" NPY_INTP_FMT " colors" ,
433- points.shape (0 ), colors.shape (0 ));
434- return NULL ;
435- }
436409
437410 CALL_CPP (" draw_gouraud_triangles" , self->x ->draw_gouraud_triangles (gc, points, colors, trans));
438411
0 commit comments