Define PathIterator#getPoint(), #getTangent(), #getNormal() and #getCurvature().

This commit is contained in:
Jürg Lehni 2014-09-11 16:06:00 +02:00
parent 67d30f0042
commit 52dd24097f

View file

@ -151,4 +151,11 @@ var PathIterator = Base.extend({
ctx.bezierCurveTo.apply(ctx, curve.slice(2));
}
}
});
}, Base.each(['getPoint', 'getTangent', 'getNormal', 'getCurvature'],
function(name, index) {
this[name] = function(offset) {
return this.evaluate(offset, index);
};
}, {})
);