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

Skip to content

Commit cbc5fed

Browse files
committed
add offset of 0.5 when marker is stroked so that snapping works better in agg backend
1 parent f4f2a1a commit cbc5fed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_backend_agg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ RendererAgg::draw_markers(const Py::Tuple& args)
660660
// Deal with the difference in y-axis direction
661661
marker_trans *= agg::trans_affine_scaling(1.0, -1.0);
662662
trans *= agg::trans_affine_scaling(1.0, -1.0);
663-
trans *= agg::trans_affine_translation(0.0, (double)height);
663+
trans *= agg::trans_affine_translation(0.5, (double)height+0.5);
664664

665665
PathIterator marker_path(marker_path_obj);
666666
transformed_path_t marker_path_transformed(marker_path, marker_trans);

0 commit comments

Comments
 (0)