diff --git a/src/path.js b/src/path.js index c51b0fdbafe..b9c262c40eb 100644 --- a/src/path.js +++ b/src/path.js @@ -296,6 +296,11 @@ Path.prototype.shiftAlong = function(distance) { throw "Ran out of curve to shift along"; }; +/** Returns a point that lies at fraction along this */ +Path.prototype.shiftFractionAlong = function(fraction) { + return this.shiftAlong(this.length() * fraction); +}; + /** Returns a point that lies at distance along bezier */ function shiftAlongBezier(distance, bezier) { let steps = 100;