From 74b9da9882c0b444acd795babb0d4d427ed1a52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 5 Jun 2011 13:20:20 +0100 Subject: [PATCH] Define PathFlattener#evaluate() for curve evaluation at given offsets. --- src/path/PathFlattener.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/path/PathFlattener.js b/src/path/PathFlattener.js index 9f6f6a71..bb62046c 100644 --- a/src/path/PathFlattener.js +++ b/src/path/PathFlattener.js @@ -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);