You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the great library, it's really proving to be very useful.
I have noticed one of my shapes has a small difference between the native stroke and the generated offsetStroke and wondered if there was a way to fix it.
The shape itself is a path based on two touching identical ovals, which have the same length trimmed off to create an S-like shape.
// my original shape of two ovalsletpathData="M512,512 c141.385,0,256-71.635,256-160S653.385,192,512,192s-256,71.635-256,160S370.615,512,512,512s256,71.635,256,160 S653.385,832,512,832s-256-71.635-256-160S370.615,512,512,512"varpath=newPath(pathData);path.strokeColor='black';path.strokeWidth=32;// some lengths to use to trim the shapeletfullLength=path.lengthlettrimLength=fullLength/16;// trimmed path with start and end croppedvartrimmedPath=path.splitAt(trimLength);varendPath=trimmedPath.splitAt(trimmedPath.length-trimLength);path.remove();endPath.remove();// need to clear the handles so the joins are straighttrimmedPath.firstSegment.handleIn.set({x: 0,y: 0});trimmedPath.lastSegment.handleOut.set({x: 0,y: 0});trimmedPath.lastSegment.selected=true;trimmedPath.firstSegment.selected=true;// offset codevaroffsetPath=trimmedPath.offsetStroke(16);offsetPath.fillColor='red';offsetPath.opacity=0.5;offsetPath.selected=true;
You can see in the image attached that the start section matches perfectly, but for some reason the end section is drawn differently and doesn't quite match the original stroke.
Is there something I could do to resolve this difference?
Many thanks.
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for the great library, it's really proving to be very useful.
I have noticed one of my shapes has a small difference between the native stroke and the generated
offsetStroke
and wondered if there was a way to fix it.The shape itself is a path based on two touching identical ovals, which have the same length trimmed off to create an S-like shape.
You can see in the image attached that the start section matches perfectly, but for some reason the end section is drawn differently and doesn't quite match the original stroke.
Is there something I could do to resolve this difference?
Many thanks.
The text was updated successfully, but these errors were encountered: