12345678910111213141516171819 |
- //CLASS:几何类型:圆
- function Circle(x, y, radius) {
- Geometry.apply(this, arguments);
- this.radius = radius;
- this.x = x;
- this.y = y;
- };
- Circle.prototype.getBounds = function () {
- if(!this.bounds) {
- this.bounds = new CanvasSketch.Bounds(this.x - this.radius, this.y - this.radius, this.x + this.radius, this.y + this.radius);
- return this.bounds;
- } else {
- return this.bounds;
- }
- };
- Circle.prototype.geoType = "Circle";
|