From 7f52e55b3ed1bb4d5398fa644dfb475a3239b137 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Thu, 21 Jan 2021 03:24:11 +0100 Subject: [PATCH] sw_engine math: fixing matrix transformation Unnecessary rounding during matrix transformation has been removed. The problem occured when scaling a shape with a dashed stroke. --- src/lib/sw_engine/tvgSwMath.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/sw_engine/tvgSwMath.cpp b/src/lib/sw_engine/tvgSwMath.cpp index 33ad563..f0acbbf 100644 --- a/src/lib/sw_engine/tvgSwMath.cpp +++ b/src/lib/sw_engine/tvgSwMath.cpp @@ -422,8 +422,8 @@ SwPoint mathTransform(const Point* to, const Matrix* transform) { if (!transform) return {TO_SWCOORD(to->x), TO_SWCOORD(to->y)}; - auto tx = round(to->x * transform->e11 + to->y * transform->e12 + transform->e13); - auto ty = round(to->x * transform->e21 + to->y * transform->e22 + transform->e23); + auto tx = to->x * transform->e11 + to->y * transform->e12 + transform->e13; + auto ty = to->x * transform->e21 + to->y * transform->e22 + transform->e23; return {TO_SWCOORD(tx), TO_SWCOORD(ty)}; } -- 2.7.4