Offsets a given line by a specified distance to the left or right side.
The line to offset, defined by points p0 and p1.
p0
p1
The distance to offset the line.
The direction to offset the line ('left' or 'right').
A new line object with both endpoints offset by the specified distance and direction.
Offsets a given line by a specified distance to the left or right side.