Define PathFlattener#evaluate() for curve evaluation at given offsets.

This commit is contained in:
Jürg Lehni 2011-06-05 13:20:20 +01:00
parent c296eb0883
commit 74b9da9882

View file

@ -113,6 +113,12 @@ var PathFlattener = Base.extend({
};
},
evaluate: function(offset, type) {
var param = this.getParameter(offset);
return Curve.evaluate.apply(Curve,
this.curves[param.index].concat([param.value, type]));
},
drawPart: function(ctx, from, to) {
from = this.getParameter(from);
to = this.getParameter(to);