diff --git a/src/renderer/gl_engine/tvgGlTessellator.cpp b/src/renderer/gl_engine/tvgGlTessellator.cpp index 4d90746f..eb794f6a 100644 --- a/src/renderer/gl_engine/tvgGlTessellator.cpp +++ b/src/renderer/gl_engine/tvgGlTessellator.cpp @@ -1746,7 +1746,7 @@ void Stroker::strokeCubicTo(const Point& cnt1, const Point& cnt2, const Point& e void Stroker::strokeClose() { - if (mStrokeState.prevPt != mStrokeState.firstPt) { + if (length(mStrokeState.prevPt - mStrokeState.firstPt) > 0.015625f) { this->strokeLineTo(mStrokeState.firstPt); } diff --git a/src/renderer/wg_engine/tvgWgGeometry.h b/src/renderer/wg_engine/tvgWgGeometry.h index edf2ff71..caa889fc 100755 --- a/src/renderer/wg_engine/tvgWgGeometry.h +++ b/src/renderer/wg_engine/tvgWgGeometry.h @@ -148,7 +148,7 @@ struct WgVertexBuffer void close() { // check if last point is not to close to the first point - if (!tvg::zero(length2(data[0] - last()))) { + if (length(data[0] - last()) > 0.015625f) { append(data[0]); } closed = true;