Skip to content

Commit 342007c

Browse files
leejjoonmdboom
authored andcommitted
add offset of 0.5 when marker is stroked so that snapping works better in agg backend
1 parent 6fa0064 commit 342007c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_backend_agg.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ RendererAgg::draw_markers(const Py::Tuple& args)
650650
// Deal with the difference in y-axis direction
651651
marker_trans *= agg::trans_affine_scaling(1.0, -1.0);
652652
trans *= agg::trans_affine_scaling(1.0, -1.0);
653-
trans *= agg::trans_affine_translation(0.0, (double)height);
653+
trans *= agg::trans_affine_translation(0.5, (double)height+0.5);
654654

655655
PathIterator marker_path(marker_path_obj);
656656
transformed_path_t marker_path_transformed(marker_path, marker_trans);

0 commit comments

Comments
 (0)