Skip to content

Commit 5f08c66

Browse files
committed
butterbur/tesselation: Completely skip stroke code when stroke width is 0
- For tesselating fill only
1 parent 4be153c commit 5f08c66

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

butterbur/src/tesselation/shapesTesselation.ec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ struct TesselatedShape
204204
fillCount = 0;
205205
vCount = 0;
206206

207-
if(/*lineWidth > 1 && */tc && (tc > 1 || cap != flat))
207+
if(stroke.width > 0 && tc && (tc > 1 || cap != flat))
208208
{
209209
int rCount = (!noJoin && join == round) ? 7 : (!noJoin && join == bevel) ? 2 : 1;
210210
int capCount = (cap == round) ? 7 : 1;
@@ -469,15 +469,15 @@ struct TesselatedShape
469469
vCount = tc;
470470
points = renew points Pointf[tc];
471471
memcpy(points, nodes, tc * sizeof(Pointf));
472-
ixCount = tc + closed;
473-
ix = renew ix uint16[tc];
472+
ixCount = 0; //tc + closed;
473+
fillCount = tc + closed;
474+
ix = null; //renew ix uint16[tc];
474475
ixFill = renew ixFill uint16[tc + closed];
475476

476477
for(i = 0; i < tc; i++)
477478
ixFill[i] = (uint16)i;
478479
if(closed)
479480
ixFill[i] = 0;
480-
memcpy(ixFill, ix, tc * sizeof(Pointf));
481481
}
482482

483483
if(closed)

0 commit comments

Comments
 (0)