mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Define PathFlattener#evaluate() for curve evaluation at given offsets.
This commit is contained in:
parent
c296eb0883
commit
74b9da9882
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue