sw_engine: fix a regression bug.

stroke line drawing has been broken at a certain case,
this reverts a part of change from the old optimization:

d81f5d29fb

note that this change wouldn't affect any performance.

issue: https://github.com/thorvg/thorvg/issues/2015
This commit is contained in:
Hermet Park 2024-03-03 15:31:18 +09:00
parent 3ed8309a11
commit 604c4dc0b0

View file

@ -50,12 +50,6 @@ bool mathSmallCubic(const SwPoint* base, SwFixed& angleIn, SwFixed& angleMid, Sw
auto d2 = base[1] - base[2]; auto d2 = base[1] - base[2];
auto d3 = base[0] - base[1]; auto d3 = base[0] - base[1];
if (d1 == d2 || d2 == d3) {
if (d3.small()) angleIn = angleMid = angleOut = 0;
else angleIn = angleMid = angleOut = mathAtan(d3);
return true;
}
if (d1.small()) { if (d1.small()) {
if (d2.small()) { if (d2.small()) {
if (d3.small()) { if (d3.small()) {