01 / Offset direction
Positive expands, negative contracts
Closed paths can be offset outward or inward. The source shape remains visible so the distance and direction are easy to compare.
paperjs-offset guide
A compact guide to the two operations this package provides, the options that change their output,
and the quality checks behind algorithm: 'auto'.
OffsetExpand or contract closed paths.
StrokeConvert stroked paths into filled outlines.
AutoTry multiple strategies and choose the best-scored result.
01 / Offset direction
Closed paths can be offset outward or inward. The source shape remains visible so the distance and direction are easy to compare.
02 / Joins
Miter, bevel, and round joins produce different corner geometry. Miter joins also respect the configured limit.
03 / Strokes
offsetStroke handles open and closed paths. Open-path terminals use butt or round caps.
04 / Compound paths
Compound paths are normalized before and after offsetting, which helps repeated offsets stay coherent.
05 / Strategy
The auto strategy compares candidate results with the same scoring function exposed by analyze.
06 / Quality
analyze reports score, self-intersections, containment errors, and other warning signals for generated paths.