@@ -118,7 +118,7 @@ class SimplifyPath
118118 SimplifyPath (VertexSource& source, bool quantize, bool simplify,
119119 double width = 0.0 , double height = 0.0 ) :
120120 m_source (&source), m_quantize(quantize), m_simplify(simplify),
121- m_width (width), m_height(height), m_queue_read(0 ), m_queue_write(0 ),
121+ m_width (width + 1.0 ), m_height(height + 1.0 ), m_queue_read(0 ), m_queue_write(0 ),
122122 m_moveto (true ), m_lastx(0.0 ), m_lasty(0.0 ), m_clipped(false ),
123123 m_do_clipping (width > 0.0 && height > 0.0 ),
124124 m_origdx (0.0 ), m_origdy(0.0 ),
@@ -246,9 +246,9 @@ class SimplifyPath
246246 // could be clipped, but a more involved calculation would be needed
247247 if (m_do_clipping &&
248248 ((*x < -1.0 && m_lastx < -1.0 ) ||
249- (*x > m_width + 1.0 && m_lastx > m_width + 1.0 ) ||
249+ (*x > m_width && m_lastx > m_width) ||
250250 (*y < -1.0 && m_lasty < -1.0 ) ||
251- (*y > m_height + 1.0 && m_lasty > m_height + 1.0 )))
251+ (*y > m_height && m_lasty > m_height)))
252252 {
253253 m_lastx = *x;
254254 m_lasty = *y;
0 commit comments