8000 improve snapping in agg backend · matplotlib/matplotlib@a6e7006 · GitHub
[go: up one dir, main page]

Skip to content

Commit a6e7006

Browse files
leejjoonmdboom
authored andcommitted
improve snapping in agg backend
1 parent c7da07d commit a6e7006

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/path_converters.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,8 @@ class PathSnapper
514514
code = m_source->vertex(x, y);
515515
if (m_snap && agg::is_vertex(code))
516516
{
517-
*x = floor(*x - m_snap_value) + m_snap_value;
518-
*y = floor(*y - m_snap_value) + m_snap_value;
517+
*x = floor(*x + 0.5 - m_snap_value) + m_snap_value;
518+
*y = floor(*y + 0.5 - m_snap_value) + m_snap_value;
519519
}
520520
return code;
521521
}

0 commit comments

Comments
 (0)
0