@@ -269,17 +269,18 @@ const char *Py_get_path_collection_extents__doc__ =
269269static PyObject *Py_get_path_collection_extents (PyObject *self, PyObject *args, PyObject *kwds)
270270{
271271 agg::trans_affine master_transform;
272- PyObject *pathsobj ;
272+ py::PathGenerator paths ;
273273 numpy::array_view<const double , 3 > transforms;
274274 numpy::array_view<const double , 2 > offsets;
275275 agg::trans_affine offset_trans;
276276 extent_limits e;
277277
278278 if (!PyArg_ParseTuple (args,
279- " O&OO &O&O&:get_path_collection_extents" ,
279+ " O&O&O &O&O&:get_path_collection_extents" ,
280280 &convert_trans_affine,
281281 &master_transform,
282- &pathsobj,
282+ &convert_pathgen,
283+ &paths,
283284 &convert_transforms,
284285 &transforms,
285286 &convert_points,
@@ -289,18 +290,9 @@ static PyObject *Py_get_path_collection_extents(PyObject *self, PyObject *args,
289290 return NULL ;
290291 }
291292
292- try
293- {
294- py::PathGenerator paths (pathsobj);
295-
296- CALL_CPP (" get_path_collection_extents" ,
297- (get_path_collection_extents (
298- master_transform, paths, transforms, offsets, offset_trans, e)));
299- }
300- catch (const py::exception &)
301- {
302- return NULL ;
303- }
293+ CALL_CPP (" get_path_collection_extents" ,
294+ (get_path_collection_extents (
295+ master_transform, paths, transforms, offsets, offset_trans, e)));
304296
305297 npy_intp dims[] = { 2 , 2 };
306298 numpy::array_view<double , 2 > extents (dims);
@@ -327,7 +319,7 @@ static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyO
327319{
328320 double x, y, radius;
329321 agg::trans_affine master_transform;
330- PyObject *pathsobj ;
322+ py::PathGenerator paths ;
331323 numpy::array_view<const double , 3 > transforms;
332324 numpy::array_view<const double , 2 > offsets;
333325 agg::trans_affine offset_trans;
@@ -336,13 +328,14 @@ static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyO
336328 std::vector<int > result;
337329
338330 if (!PyArg_ParseTuple (args,
339- " dddO&OO &O&O&O&O:point_in_path_collection" ,
331+ " dddO&O&O &O&O&O&O:point_in_path_collection" ,
340332 &x,
341333 &y,
342334 &radius,
343335 &convert_trans_affine,
344336 &master_transform,
345- &pathsobj,
337+ &convert_pathgen,
338+ &paths,
346339 &convert_transforms,
347340 &transforms,
348341 &convert_points,
@@ -355,26 +348,17 @@ static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyO
355348 return NULL ;
356349 }
357350
358- try
359- {
360- py::PathGenerator paths (pathsobj);
361-
362- CALL_CPP (" point_in_path_collection" ,
363- (point_in_path_collection (x,
364- y,
365- radius,
366- master_transform,
367- paths,
368- transforms,
369- offsets,
370- offset_trans,
371- filled,
372- result)));
373- }
374- catch (const py::exception &)
375- {
376- return NULL ;
377- }
351+ CALL_CPP (" point_in_path_collection" ,
352+ (point_in_path_collection (x,
353+ y,
354+ radius,
355+ master_transform,
356+ paths,
357+ transforms,
358+ offsets,
359+ offset_trans,
360+ filled,
361+ result)));
378362
379363 npy_intp dims[] = {(npy_intp)result.size () };
380364 numpy::array_view<int , 1 > pyresult (dims);
0 commit comments