|
11 | 11 |
|
12 | 12 | #include "_path.h" |
13 | 13 |
|
| 14 | +#include "_backend_agg_basic_types.h" |
14 | 15 | #include "py_adaptors.h" |
15 | 16 | #include "py_converters.h" |
16 | 17 | #include "py_converters_11.h" |
@@ -302,14 +303,8 @@ Py_convert_path_to_polygons(mpl::PathIterator path, agg::trans_affine trans, |
302 | 303 | static py::tuple |
303 | 304 | Py_cleanup_path(mpl::PathIterator path, agg::trans_affine trans, bool remove_nans, |
304 | 305 | agg::rect_d clip_rect, e_snap_mode snap_mode, double stroke_width, |
305 | | - std::optional<bool> simplify, bool return_curves, py::object sketch_obj) |
| 306 | + std::optional<bool> simplify, bool return_curves, SketchParams sketch) |
306 | 307 | { |
307 | | - SketchParams sketch; |
308 | | - |
309 | | - if (!convert_sketch_params(sketch_obj.ptr(), &sketch)) { |
310 | | - throw py::error_already_set(); |
311 | | - } |
312 | | - |
313 | 308 | if (!simplify.has_value()) { |
314 | 309 | simplify = path.should_simplify(); |
315 | 310 | } |
@@ -367,18 +362,13 @@ postfix : bool |
367 | 362 | static py::object |
368 | 363 | Py_convert_to_string(mpl::PathIterator path, agg::trans_affine trans, |
369 | 364 | agg::rect_d cliprect, std::optional<bool> simplify, |
370 | | - py::object sketch_obj, int precision, |
| 365 | + SketchParams sketch, int precision, |
371 | 366 | std::array<std::string, 5> codes_obj, bool postfix) |
372 | 367 | { |
373 | | - SketchParams sketch; |
374 | 368 | char *codes[5]; |
375 | 369 | std::string buffer; |
376 | 370 | bool status; |
377 | 371 |
|
378 | | - if (!convert_sketch_params(sketch_obj.ptr(), &sketch)) { |
379 | | - throw py::error_already_set(); |
380 | | - } |
381 | | - |
382 | 372 | for(auto i = 0; i < 5; ++i) { |
383 | 373 | codes[i] = const_cast<char *>(codes_obj[i].c_str()); |
384 | 374 | } |
|
0 commit comments