@@ -1228,8 +1228,9 @@ void __cleanup_path(VertexSource& source,
12281228void _cleanup_path (PathIterator& path, const agg::trans_affine& trans,
12291229 bool remove_nans, bool do_clip,
12301230 const agg::rect_base<double >& rect,
1231- e_quantize_mode quantize_mode, bool do_simplify,
1232- bool return_curves, std::vector<double >& vertices,
1231+ e_quantize_mode quantize_mode, double stroke_width,
1232+ bool do_simplify, bool return_curves,
1233+ std::vector<double >& vertices,
12331234 std::vector<npy_uint8>& codes) {
12341235 typedef agg::conv_transform<PathIterator> transformed_path_t ;
12351236 typedef PathNanRemover<transformed_path_t > nan_removal_t ;
@@ -1241,7 +1242,7 @@ void _cleanup_path(PathIterator& path, const agg::trans_affine& trans,
12411242 transformed_path_t tpath (path, trans);
12421243 nan_removal_t nan_removed (tpath, remove_nans, path.has_curves ());
12431244 clipped_t clipped (nan_removed, do_clip, rect);
1244- quantized_t quantized (clipped, quantize_mode, path.total_vertices ());
1245+ quantized_t quantized (clipped, quantize_mode, path.total_vertices (), stroke_width );
12451246 simplify_t simplified (quantized, do_simplify, path.simplify_threshold ());
12461247
12471248 vertices.reserve (path.total_vertices () * 2 );
@@ -1260,7 +1261,7 @@ void _cleanup_path(PathIterator& path, const agg::trans_affine& trans,
12601261
12611262Py::Object _path_module::cleanup_path (const Py::Tuple& args)
12621263{
1263- args.verify_length (7 );
1264+ args.verify_length (8 );
12641265
12651266 PathIterator path (args[0 ]);
12661267 agg::trans_affine trans = py_to_agg_transformation_matrix (args[1 ].ptr (), false );
@@ -1300,8 +1301,10 @@ Py::Object _path_module::cleanup_path(const Py::Tuple& args)
13001301 quantize_mode = QUANTIZE_FALSE;
13011302 }
13021303
1304+ double stroke_width = Py::Float (args[5 ]);
1305+
13031306 bool simplify;
1304- Py::Object simplify_obj = args[5 ];
1307+ Py::Object simplify_obj = args[6 ];
13051308 if (simplify_obj.isNone ())
13061309 {
13071310 simplify = path.should_simplify ();
@@ -1311,13 +1314,13 @@ Py::Object _path_module::cleanup_path(const Py::Tuple& args)
13111314 simplify = simplify_obj.isTrue ();
13121315 }
13131316
1314- bool return_curves = args[6 ].isTrue ();
1317+ bool return_curves = args[7 ].isTrue ();
13151318
13161319 std::vector<double > vertices;
13171320 std::vector<npy_uint8> codes;
13181321
13191322 _cleanup_path (path, trans, remove_nans, do_clip, clip_rect, quantize_mode,
1320- simplify, return_curves, vertices, codes);
1323+ stroke_width, simplify, return_curves, vertices, codes);
13211324
13221325 npy_intp length = codes.size ();
13231326 npy_intp dims[] = { length, 2 , 0 };
0 commit comments