@@ -465,7 +465,7 @@ Py::Object
465465RendererAgg::draw_markers (const Py::Tuple& args) {
466466 typedef agg::conv_transform<PathIterator> transformed_path_t ;
467467 typedef SimplifyPath<transformed_path_t > simplify_t ;
468- typedef agg::conv_curve<transformed_path_t > curve_t ;
468+ typedef agg::conv_curve<simplify_t > curve_t ;
469469 typedef agg::conv_stroke<curve_t > stroke_t ;
470470 typedef agg::pixfmt_amask_adaptor<pixfmt, alpha_mask_type> pixfmt_amask_type;
471471 typedef agg::renderer_base<pixfmt_amask_type> amask_ren_type;
@@ -488,15 +488,15 @@ RendererAgg::draw_markers(const Py::Tuple& args) {
488488 trans *= agg::trans_affine_translation (0.0 , (double )height);
489489
490490 PathIterator marker_path (marker_path_obj);
491+ bool marker_snap = should_snap (marker_path, marker_trans);
491492 transformed_path_t marker_path_transformed (marker_path, marker_trans);
492- curve_t marker_path_curve (marker_path_transformed);
493+ simplify_t marker_path_simplified (marker_path_transformed, marker_snap, false , width, height);
494+ curve_t marker_path_curve (marker_path_simplified);
493495
494496 PathIterator path (path_obj);
495- bool snap = should_snap (path, trans);
496497 transformed_path_t path_transformed (path, trans);
497498 GCAgg gc = GCAgg (gc_obj, dpi);
498- simplify_t path_simplified (path_transformed, snap, false , width, height);
499- path_simplified.rewind (0 );
499+ path_transformed.rewind (0 );
500500
501501 facepair_t face = _get_rgba_face (face_obj, gc.alpha );
502502
@@ -549,7 +549,7 @@ RendererAgg::draw_markers(const Py::Tuple& args) {
549549 agg::serialized_scanlines_adaptor_aa8::embedded_scanline sl;
550550
551551 if (has_clippath) {
552- while (path_simplified .vertex (&x, &y) != agg::path_cmd_stop) {
552+ while (path_transformed .vertex (&x, &y) != agg::path_cmd_stop) {
553553 pixfmt_amask_type pfa (*pixFmt, *alphaMask);
554554 amask_ren_type r (pfa);
555555 amask_aa_renderer_type ren (r);
@@ -564,7 +564,7 @@ RendererAgg::draw_markers(const Py::Tuple& args) {
564564 agg::render_scanlines (sa, sl, ren);
565565 }
566566 } else {
567- while (path_simplified .vertex (&x, &y) != agg::path_cmd_stop) {
567+ while (path_transformed .vertex (&x, &y) != agg::path_cmd_stop) {
568568 if (face.first ) {
569569 rendererAA->color (face.second );
570570 sa.init (fillCache, fillSize, x, y);
0 commit comments