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.
This commit is contained in:
Mira Grudzinska 2021-01-21 03:24:11 +01:00 committed by Hermet Park
parent 6db7f85ffb
commit 229a013fcd

View 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)};
}