From 0e87c02e74e08c7bf156373b0d2459563e17ecd6 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Wed, 1 Feb 2012 14:38:15 -0800 Subject: make GLAnchorPoint functions as part of its prototype --- js/helper-classes/RDGE/GLSubpath.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'js/helper-classes/RDGE/GLSubpath.js') diff --git a/js/helper-classes/RDGE/GLSubpath.js b/js/helper-classes/RDGE/GLSubpath.js index 52699f85..fd2f3560 100644 --- a/js/helper-classes/RDGE/GLSubpath.js +++ b/js/helper-classes/RDGE/GLSubpath.js @@ -141,6 +141,7 @@ function GLSubpath() { var lineCap = ['butt','round','square']; ctx.lineCap = lineCap[1]; ctx.beginPath(); + var prevAnchor = this.getAnchor(0); ctx.moveTo(prevAnchor.getPosX()-bboxMin[0],prevAnchor.getPosY()-bboxMin[1]); for (var i = 1; i < numAnchors; i++) { @@ -156,8 +157,15 @@ function GLSubpath() { if (this._isClosed){ ctx.fill(); } - ctx.stroke(); + /* + var numPoints = this._samples.length/3; + ctx.moveTo(this._samples[0],this._samples[1]); + for (var i=0;i