mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-27 00:26:51 +00:00
sw_engine stroke: initialize a missing variable.
Change-Id: I1c3d83d56045f592ff89a5462d4de494e50c9d34
This commit is contained in:
parent
55e215e6ea
commit
b212df1061
1 changed files with 2 additions and 4 deletions
|
@ -297,13 +297,11 @@ static void _inside(SwStroke& stroke, int32_t side, SwFixed lineLength)
|
||||||
auto border = stroke.borders + side;
|
auto border = stroke.borders + side;
|
||||||
auto theta = mathDiff(stroke.angleIn, stroke.angleOut) / 2;
|
auto theta = mathDiff(stroke.angleIn, stroke.angleOut) / 2;
|
||||||
SwPoint delta;
|
SwPoint delta;
|
||||||
bool intersect;
|
bool intersect = false;
|
||||||
|
|
||||||
/* Only intersect borders if between two line_to's and both
|
/* Only intersect borders if between two line_to's and both
|
||||||
lines are long enough (line length is zero fur curves). */
|
lines are long enough (line length is zero fur curves). */
|
||||||
if (!border->movable || lineLength == 0) {
|
if (border->movable && lineLength > 0) {
|
||||||
intersect = false;
|
|
||||||
} else {
|
|
||||||
//compute minimum required length of lines
|
//compute minimum required length of lines
|
||||||
SwFixed minLength = abs(mathMultiply(stroke.width, mathTan(theta)));
|
SwFixed minLength = abs(mathMultiply(stroke.width, mathTan(theta)));
|
||||||
if (stroke.lineLength >= minLength && lineLength >= minLength) intersect = true;
|
if (stroke.lineLength >= minLength && lineLength >= minLength) intersect = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue