Skip to content

Commit 05e3e28

Browse files
committed
improve snapping in agg backend
1 parent c5593ee commit 05e3e28

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
@@ -494,8 +494,8 @@ class PathSnapper
494494
code = m_source->vertex(x, y);
495495
if (m_snap && agg::is_vertex(code))
496496
{
497-
*x = floor(*x - m_snap_value) + m_snap_value;
498-
*y = floor(*y - m_snap_value) + m_snap_value;
497+
*x = floor(*x + 0.5 - m_snap_value) + m_snap_value;
498+
*y = floor(*y + 0.5 - m_snap_value) + m_snap_value;
499499
}
500500
return code;
501501
}

0 commit comments

Comments
 (0)