aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/GLSubpath.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-02-01 14:38:15 -0800
committerPushkar Joshi2012-02-01 14:38:15 -0800
commit0e87c02e74e08c7bf156373b0d2459563e17ecd6 (patch)
treef3d4f1256206c9a13c9f6ef70cdd6f03b5772b5a /js/helper-classes/RDGE/GLSubpath.js
parent62d38a080b2918a0284c854e9bf882bfeeea1e0b (diff)
downloadninja-0e87c02e74e08c7bf156373b0d2459563e17ecd6.tar.gz
make GLAnchorPoint functions as part of its prototype
Diffstat (limited to 'js/helper-classes/RDGE/GLSubpath.js')
-rw-r--r--js/helper-classes/RDGE/GLSubpath.js10
1 files changed, 9 insertions, 1 deletions
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() {
141 var lineCap = ['butt','round','square']; 141 var lineCap = ['butt','round','square'];
142 ctx.lineCap = lineCap[1]; 142 ctx.lineCap = lineCap[1];
143 ctx.beginPath(); 143 ctx.beginPath();
144
144 var prevAnchor = this.getAnchor(0); 145 var prevAnchor = this.getAnchor(0);
145 ctx.moveTo(prevAnchor.getPosX()-bboxMin[0],prevAnchor.getPosY()-bboxMin[1]); 146 ctx.moveTo(prevAnchor.getPosX()-bboxMin[0],prevAnchor.getPosY()-bboxMin[1]);
146 for (var i = 1; i < numAnchors; i++) { 147 for (var i = 1; i < numAnchors; i++) {
@@ -156,8 +157,15 @@ function GLSubpath() {
156 if (this._isClosed){ 157 if (this._isClosed){
157 ctx.fill(); 158 ctx.fill();
158 } 159 }
159 ctx.stroke();
160 160
161 /*
162 var numPoints = this._samples.length/3;
163 ctx.moveTo(this._samples[0],this._samples[1]);
164 for (var i=0;i<numPoints;i++){
165 ctx.lineTo(this._samples[3*i]-bboxMin[0],this._samples[3*i + 1]-bboxMin[1]);
166 }
167 */
168 ctx.stroke();
161 ctx.restore(); 169 ctx.restore();
162 } //render() 170 } //render()
163 171