Rectangle.js 434 B

1234567891011121314151617
  1. //CLASS:几何类型:矩形
  2. //x1,y1坐下角的坐标,x2,y2右上角的坐标
  3. function Rectangle(x1, y1,x2,y2 ) {
  4. Geometry.apply(this, arguments);
  5. this.leftupX = x1;
  6. this.leftupY = y2;
  7. this.rightupX= x2;
  8. this.rightupY= y2;
  9. this.rightdownX=x2;
  10. this.rightdownY=y1;
  11. this.leftdownX=x1;
  12. this.leftdownY=y1;
  13. };
  14. Rectangle.prototype = new Rectangle();
  15. Rectangle.prototype.geoType = "Rectangle";