@@ -269,17 +269,18 @@ const char *Py_get_path_collection_extents__doc__ =
269
269
static PyObject *Py_get_path_collection_extents (PyObject *self, PyObject *args, PyObject *kwds)
270
270
{
271
271
agg::trans_affine master_transform;
272
- PyObject *pathsobj ;
272
+ py::PathGenerator paths ;
273
273
numpy::array_view<const double , 3 > transforms;
274
274
numpy::array_view<const double , 2 > offsets;
275
275
agg::trans_affine offset_trans;
276
276
extent_limits e;
277
277
278
278
if (!PyArg_ParseTuple (args,
279
- " O&OO &O&O&:get_path_collection_extents" ,
279
+ " O&O&O &O&O&:get_path_collection_extents" ,
280
280
&convert_trans_affine,
281
281
&master_transform,
282
- &pathsobj,
282
+ &convert_pathgen,
283
+ &paths,
283
284
&convert_transforms,
284
285
&transforms,
285
286
&convert_points,
@@ -289,18 +290,9 @@ static PyObject *Py_get_path_collection_extents(PyObject *self, PyObject *args,
289
290
return NULL ;
290
291
}
291
292
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)));
304
296
305
297
npy_intp dims[] = { 2 , 2 };
306
298
numpy::array_view<double , 2 > extents (dims);
@@ -327,7 +319,7 @@ static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyO
327
319
{
328
320
double x, y, radius;
329
321
agg::trans_affine master_transform;
330
- PyObject *pathsobj ;
322
+ py::PathGenerator paths ;
331
323
numpy::array_view<const double , 3 > transforms;
332
324
numpy::array_view<const double , 2 > offsets;
333
325
agg::trans_affine offset_trans;
@@ -336,13 +328,14 @@ static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyO
336
328
std::vector<int > result;
337
329
338
330
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" ,
340
332
&x,
341
333
&y,
342
334
&radius,
343
335
&convert_trans_affine,
344
336
&master_transform,
345
- &pathsobj,
337
+ &convert_pathgen,
338
+ &paths,
346
339
&convert_transforms,
347
340
&transforms,
348
341
&convert_points,
@@ -355,26 +348,17 @@ static PyObject *Py_point_in_path_collection(PyObject *self, PyObject *args, PyO
355
348
return NULL ;
356
349
}
357
350
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)));
378
362
379
363
npy_intp dims[] = {(npy_intp)result.size () };
380
364
numpy::array_view<int , 1 > pyresult (dims);
0 commit comments