Every line of 'javascript rectangle object' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
24 function Rectangle( x, y, width, height ) { 25 assert && assert( height !== undefined, 'Rectangle requires 4 parameters' ); 26 Bounds2.call( this, x, y, x + width, y + height ); 27 }
275 function showRectangle(objId, positions) { 276 var material = Cesium.Color.fromCssColorString('#ff0').withAlpha(0.5); 277 var outlineMaterial = new Cesium.PolylineDashMaterialProperty({ 278 dashLength: 16, 279 color: Cesium.Color.fromCssColorString('#00f').withAlpha(0.7) 280 }); 281 var rect = Cesium.Rectangle.fromCartesianArray(positions); 282 var arr = [rect.west, rect.north, rect.east, rect.north, rect.east, rect.south, rect.west, rect.south, rect.west, rect.north]; 283 var outlinePositions = Cesium.Cartesian3.fromRadiansArray(arr); 284 var bData = { 285 layerId: layerId, 286 objId: objId, 287 shapeType: "Rectangle", 288 polyline: { 289 positions: outlinePositions, 290 clampToGround: true, 291 width: 2, 292 material: outlineMaterial 293 }, 294 rectangle: { 295 coordinates: rect, 296 material: material 297 } 298 }; 299 var entity = viewer.entities.add(bData); 300 }
17 function Rectangle(/*Number*/ xCoord, /*Number*/ yCoord) { 18 Shape.call(this, xCoord, yCoord); 19 }
4 function Rectangle(x,y,width,height){ 5 this.x = x; 6 this.y = y; 7 this.width = width; 8 this.height = height; 9 }
64 function Rectangle(x, y, width, height) { 65 this.x = x; 66 this.y = y; 67 this.width = width; 68 this.height = height; 69 }
139 function Rectangle(width, height) { 140 this.width = width; 141 this.height = height; 142 }
2 function Rectangle(width, height) { 3 this.width = width; 4 this.height = height; 5 }
21 function Rectangle(x, y, w, h) { 22 Shape.call(this); 23 this.w = w; 24 this.h = h; 25 }
101 function Rectangle(left, top, width, height) { 102 _super.call(this); 103 this.left = left; 104 this.top = top; 105 this.width = width; 106 this.height = height; 107 }