aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/circle.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom/circle.js')
-rwxr-xr-xjs/lib/geom/circle.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/js/lib/geom/circle.js b/js/lib/geom/circle.js
index 1073c2db..896803bf 100755
--- a/js/lib/geom/circle.js
+++ b/js/lib/geom/circle.js
@@ -46,6 +46,10 @@ var Circle = function GLCircle() {
46 this._fillColor = fillColor; 46 this._fillColor = fillColor;
47 47
48 this._strokeStyle = strokeStyle; 48 this._strokeStyle = strokeStyle;
49
50 this._matrix = Matrix.I(4);
51 //this._matrix[12] = xOffset;
52 //this._matrix[13] = yOffset;
49 } 53 }
50 54
51 this.m_world = world; 55 this.m_world = world;
@@ -187,7 +191,7 @@ var Circle = function GLCircle() {
187 // get the normalized device coordinates (NDC) for 191 // get the normalized device coordinates (NDC) for
188 // all position and dimensions. 192 // all position and dimensions.
189 var vpw = world.getViewportWidth(), vph = world.getViewportHeight(); 193 var vpw = world.getViewportWidth(), vph = world.getViewportHeight();
190 var xNDC = 2*this._xOffset/vpw, yNDC = 2*this._yOffset/vph, 194 var xNDC = 2*this._xOffset/vpw, yNDC = -2*this._yOffset/vph,
191 xRadNDC = this._width/vpw, yRadNDC = this._height/vph, 195 xRadNDC = this._width/vpw, yRadNDC = this._height/vph,
192 xStrokeNDC = 2*this._strokeWidth/vpw, yStrokeNDC = 2*this._strokeWidth/vph, 196 xStrokeNDC = 2*this._strokeWidth/vpw, yStrokeNDC = 2*this._strokeWidth/vph,
193 xInnRadNDC = this._innerRadius*xRadNDC, yInnRadNDC = this._innerRadius*yRadNDC; 197 xInnRadNDC = this._innerRadius*xRadNDC, yInnRadNDC = this._innerRadius*yRadNDC;
@@ -725,7 +729,7 @@ var Circle = function GLCircle() {
725 // get the normalized device coordinates (NDC) for 729 // get the normalized device coordinates (NDC) for
726 // the position and radii. 730 // the position and radii.
727 var vpw = world.getViewportWidth(), vph = world.getViewportHeight(); 731 var vpw = world.getViewportWidth(), vph = world.getViewportHeight();
728 var xNDC = 2*this._xOffset/vpw, yNDC = 2*this._yOffset/vph, 732 var xNDC = 2*this._xOffset/vpw, yNDC = -2*this._yOffset/vph,
729 xRadNDC = this._width/vpw, yRadNDC = this._height/vph; 733 xRadNDC = this._width/vpw, yRadNDC = this._height/vph;
730 var projMat = world.makePerspectiveMatrix(); 734 var projMat = world.makePerspectiveMatrix();
731 var z = -world.getViewDistance(); 735 var z = -world.getViewDistance();