Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cf43d57

Browse files
committed
Support markers with NaNs
1 parent 2fc0fb6 commit cf43d57

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/_backend_agg.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,8 @@ Py::Object
665665
RendererAgg::draw_markers(const Py::Tuple& args)
666666
{
667667
typedef agg::conv_transform<PathIterator> transformed_path_t;
668-
typedef PathSnapper<transformed_path_t> snap_t;
668+
typedef PathNanRemover<transformed_path_t> nan_removed_t;
669+
typedef PathSnapper<nan_removed_t> snap_t;
669670
typedef agg::conv_curve<snap_t> curve_t;
670671
typedef agg::conv_stroke<curve_t> stroke_t;
671672
typedef agg::pixfmt_amask_adaptor<pixfmt, alpha_mask_type> pixfmt_amask_type;
@@ -693,15 +694,17 @@ RendererAgg::draw_markers(const Py::Tuple& args)
693694

694695
PathIterator marker_path(marker_path_obj);
695696
transformed_path_t marker_path_transformed(marker_path, marker_trans);
696-
snap_t marker_path_snapped(marker_path_transformed,
697+
nan_removed_t marker_path_nan_removed(marker_path_transformed, true, marker_path.has_curves());
698+
snap_t marker_path_snapped(marker_path_nan_removed,
697699
gc.snap_mode,
698700
marker_path.total_vertices(),
699701
gc.linewidth);
700702
curve_t marker_path_curve(marker_path_snapped);
701703

702704
PathIterator path(path_obj);
703705
transformed_path_t path_transformed(path, trans);
704-
snap_t path_snapped(path_transformed,
706+
nan_removed_t path_nan_removed(path_transformed, false, false);
707+
snap_t path_snapped(path_nan_removed,
705708
SNAP_FALSE,
706709
path.total_vertices(),
707710
0.0);

0 commit comments

Comments
 (0)