aboutsummaryrefslogtreecommitdiff
path: root/js/lib/geom/rectangle.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/geom/rectangle.js')
-rwxr-xr-xjs/lib/geom/rectangle.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/js/lib/geom/rectangle.js b/js/lib/geom/rectangle.js
index 490a9a6f..296ed024 100755
--- a/js/lib/geom/rectangle.js
+++ b/js/lib/geom/rectangle.js
@@ -57,13 +57,10 @@ var Rectangle = function GLRectangle() {
57 this._strokeStyle = strokeStyle; 57 this._strokeStyle = strokeStyle;
58 58
59 this._matrix = Matrix.I(4); 59 this._matrix = Matrix.I(4);
60 //this._matrix[12] = xoffset;
61 //this._matrix[13] = yoffset;
62 } 60 }
63 61
64 // the overall radius includes the fill and the stroke. separate the two based onthe stroke width 62 // the overall radius includes the fill and the stroke. separate the two based onthe stroke width
65 // this._fillRad = this._radius - this._strokeWidth; 63 // this._fillRad = this._radius - this._strokeWidth;
66 // var err = 0.05;
67 var err = 0; 64 var err = 0;
68 this._fillWidth = this._width - this._strokeWidth + err; 65 this._fillWidth = this._width - this._strokeWidth + err;
69 this._fillHeight = this._height - this._strokeWidth + err; 66 this._fillHeight = this._height - this._strokeWidth + err;
@@ -116,18 +113,10 @@ var Rectangle = function GLRectangle() {
116 return this._strokeColor; 113 return this._strokeColor;
117 }; 114 };
118 115
119 //this.setStrokeColor = function(c) {
120 // this._strokeColor = c;
121 // };
122
123 this.getFillColor = function() { 116 this.getFillColor = function() {
124 return this._fillColor; 117 return this._fillColor;
125 }; 118 };
126 119
127 //this.setFillColor = function(c) {
128 // this._fillColor = c.slice(0);
129 // };
130
131 this.getTLRadius = function() { 120 this.getTLRadius = function() {
132 return this._tlRadius; 121 return this._tlRadius;
133 }; 122 };
@@ -324,6 +313,7 @@ var Rectangle = function GLRectangle() {
324 // stroke 313 // stroke
325 var strokeMaterial = this.makeStrokeMaterial(); 314 var strokeMaterial = this.makeStrokeMaterial();
326 var strokePrim = this.createStroke([x,y], 2*xFill, 2*yFill, strokeSize, tlRadius, blRadius, brRadius, trRadius, strokeMaterial); 315 var strokePrim = this.createStroke([x,y], 2*xFill, 2*yFill, strokeSize, tlRadius, blRadius, brRadius, trRadius, strokeMaterial);
316 strokeMaterial.fitToPrimitive( strokePrim );
327 this._primArray.push( strokePrim ); 317 this._primArray.push( strokePrim );
328 this._materialNodeArray.push( strokeMaterial.getMaterialNode() ); 318 this._materialNodeArray.push( strokeMaterial.getMaterialNode() );
329 319
@@ -337,6 +327,7 @@ var Rectangle = function GLRectangle() {
337 var fillMaterial = this.makeFillMaterial(); 327 var fillMaterial = this.makeFillMaterial();
338 //console.log( "fillMaterial: " + fillMaterial.getName() ); 328 //console.log( "fillMaterial: " + fillMaterial.getName() );
339 var fillPrim = this.createFill([x,y], 2*xFill, 2*yFill, tlRadius, blRadius, brRadius, trRadius, fillMaterial); 329 var fillPrim = this.createFill([x,y], 2*xFill, 2*yFill, tlRadius, blRadius, brRadius, trRadius, fillMaterial);
330 fillMaterial.fitToPrimitive( fillPrim );
340 this._primArray.push( fillPrim ); 331 this._primArray.push( fillPrim );
341 this._materialNodeArray.push( fillMaterial.getMaterialNode() ); 332 this._materialNodeArray.push( fillMaterial.getMaterialNode() );
342 333