@@ -922,6 +922,10 @@ inline void RendererAgg::_draw_path_collection_generic(GCAgg &gc,
922922 typedef PathSnapper<clipped_t > snapped_t ;
923923 typedef agg::conv_curve<snapped_t > snapped_curve_t ;
924924 typedef agg::conv_curve<clipped_t > curve_t ;
925+ typedef Sketch<clipped_t > sketch_clipped_t ;
926+ typedef Sketch<curve_t > sketch_curve_t ;
927+ typedef Sketch<snapped_t > sketch_snapped_t ;
928+ typedef Sketch<snapped_curve_t > sketch_snapped_curve_t ;
925929
926930 size_t Npaths = path_generator.num_paths ();
927931 size_t Noffsets = offsets.size ();
@@ -997,31 +1001,29 @@ inline void RendererAgg::_draw_path_collection_generic(GCAgg &gc,
9971001 }
9981002 }
9991003
1004+ gc.isaa = antialiaseds (i % Naa);
1005+ transformed_path_t tpath (path, trans);
1006+ nan_removed_t nan_removed (tpath, true , has_codes);
1007+ clipped_t clipped (nan_removed, do_clip, width, height);
10001008 if (check_snap) {
1001- gc.isaa = antialiaseds (i % Naa);
1002-
1003- transformed_path_t tpath (path, trans);
1004- nan_removed_t nan_removed (tpath, true , has_codes);
1005- clipped_t clipped (nan_removed, do_clip, width, height);
10061009 snapped_t snapped (
10071010 clipped, gc.snap_mode , path.total_vertices (), points_to_pixels (gc.linewidth ));
10081011 if (has_codes) {
10091012 snapped_curve_t curve (snapped);
1010- _draw_path (curve, has_clippath, face, gc);
1013+ sketch_snapped_curve_t sketch (curve, gc.sketch .scale , gc.sketch .length , gc.sketch .randomness );
1014+ _draw_path (sketch, has_clippath, face, gc);
10111015 } else {
1012- _draw_path (snapped, has_clippath, face, gc);
1016+ sketch_snapped_t sketch (snapped, gc.sketch .scale , gc.sketch .length , gc.sketch .randomness );
1017+ _draw_path (sketch, has_clippath, face, gc);
10131018 }
10141019 } else {
1015- gc.isaa = antialiaseds (i % Naa);
1016-
1017- transformed_path_t tpath (path, trans);
1018- nan_removed_t nan_removed (tpath, true , has_codes);
1019- clipped_t clipped (nan_removed, do_clip, width, height);
10201020 if (has_codes) {
10211021 curve_t curve (clipped);
1022- _draw_path (curve, has_clippath, face, gc);
1022+ sketch_curve_t sketch (curve, gc.sketch .scale , gc.sketch .length , gc.sketch .randomness );
1023+ _draw_path (sketch, has_clippath, face, gc);
10231024 } else {
1024- _draw_path (clipped, has_clippath, face, gc);
1025+ sketch_clipped_t sketch (clipped, gc.sketch .scale , gc.sketch .length , gc.sketch .randomness );
1026+ _draw_path (sketch, has_clippath, face, gc);
10251027 }
10261028 }
10271029 }
0 commit comments