diff --git a/src/_backend_agg.cpp b/src/_backend_agg.cpp index 824f51dcdbe8..73fbe627d069 100644 --- a/src/_backend_agg.cpp +++ b/src/_backend_agg.cpp @@ -660,7 +660,7 @@ RendererAgg::draw_markers(const Py::Tuple& args) // Deal with the difference in y-axis direction marker_trans *= agg::trans_affine_scaling(1.0, -1.0); trans *= agg::trans_affine_scaling(1.0, -1.0); - trans *= agg::trans_affine_translation(0.0, (double)height); + trans *= agg::trans_affine_translation(0.5, (double)height+0.5); PathIterator marker_path(marker_path_obj); transformed_path_t marker_path_transformed(marker_path, marker_trans); diff --git a/src/path_converters.h b/src/path_converters.h index c45ff862c6f6..e1263c117e5e 100644 --- a/src/path_converters.h +++ b/src/path_converters.h @@ -494,8 +494,8 @@ class PathSnapper code = m_source->vertex(x, y); if (m_snap && agg::is_vertex(code)) { - *x = mpl_round(*x) + m_snap_value; - *y = mpl_round(*y) + m_snap_value; + *x = mpl_round(*x-m_snap_value) + m_snap_value; + *y = mpl_round(*y-m_snap_value) + m_snap_value; } return code; }