From 05e3e28dd34a377d4c2ee714eb6ce777a0b3f07f Mon Sep 17 00:00:00 2001 From: Jae-Joon Lee Date: Tue, 27 Mar 2012 16:08:12 +0900 Subject: [PATCH] improve snapping in agg backend --- src/path_converters.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path_converters.h b/src/path_converters.h index faacf15ad924..4ca1929adc06 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 = floor(*x - m_snap_value) + m_snap_value; - *y = floor(*y - m_snap_value) + m_snap_value; + *x = floor(*x + 0.5 - m_snap_value) + m_snap_value; + *y = floor(*y + 0.5 - m_snap_value) + m_snap_value; } return code; }