sw_engine math: fixing matrix transformation
authorMira Grudzinska <m.grudzinska@samsung.com>
Thu, 21 Jan 2021 02:24:11 +0000 (03:24 +0100)
committerJunsuChoi <jsuya.choi@samsung.com>
Tue, 23 Feb 2021 00:32:40 +0000 (09:32 +0900)
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

index 33ad563..f0acbbf 100644 (file)
@@ -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)};
 }