|
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"
|
@@ -296,14 +297,8 @@ Py_convert_path_to_polygons(mpl::PathIterator path, agg::trans_affine trans,
|
296 | 297 | static py::tuple
|
297 | 298 | Py_cleanup_path(mpl::PathIterator path, agg::trans_affine trans, bool remove_nans,
|
298 | 299 | agg::rect_d clip_rect, e_snap_mode snap_mode, double stroke_width,
|
299 |
| - std::optional<bool> simplify, bool return_curves, py::object sketch_obj) |
| 300 | + std::optional<bool> simplify, bool return_curves, SketchParams sketch) |
300 | 301 | {
|
301 |
| - SketchParams sketch; |
302 |
| - |
303 |
| - if (!convert_sketch_params(sketch_obj.ptr(), &sketch)) { |
304 |
| - throw py::error_already_set(); |
305 |
| - } |
306 |
| - |
307 | 302 | if (!simplify.has_value()) {
|
308 | 303 | simplify = path.should_simplify();
|
309 | 304 | }
|
@@ -361,18 +356,13 @@ postfix : bool
|
361 | 356 | static py::object
|
362 | 357 | Py_convert_to_string(mpl::PathIterator path, agg::trans_affine trans,
|
363 | 358 | agg::rect_d cliprect, std::optional<bool> simplify,
|
364 |
| - py::object sketch_obj, int precision, |
| 359 | + SketchParams sketch, int precision, |
365 | 360 | std::array<std::string, 5> codes_obj, bool postfix)
|
366 | 361 | {
|
367 |
| - SketchParams sketch; |
368 | 362 | char *codes[5];
|
369 | 363 | std::string buffer;
|
370 | 364 | bool status;
|
371 | 365 |
|
372 |
| - if (!convert_sketch_params(sketch_obj.ptr(), &sketch)) { |
373 |
| - throw py::error_already_set(); |
374 |
| - } |
375 |
| - |
376 | 366 | for(auto i = 0; i < 5; ++i) {
|
377 | 367 | codes[i] = const_cast<char *>(codes_obj[i].c_str());
|
378 | 368 | }
|
|
0 commit comments