cione-comp-lib
Version:
`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`
28 lines (27 loc) • 750 B
JavaScript
import { __extends } from "../../../../tslib/tslib.es6.mjs";
import Path from "../Path.mjs";
var CircleShape = function() {
function CircleShape2() {
this.cx = 0;
this.cy = 0;
this.r = 0;
}
return CircleShape2;
}();
var Circle = function(_super) {
__extends(Circle2, _super);
function Circle2(opts) {
return _super.call(this, opts) || this;
}
Circle2.prototype.getDefaultShape = function() {
return new CircleShape();
};
Circle2.prototype.buildPath = function(ctx, shape) {
ctx.moveTo(shape.cx + shape.r, shape.cy);
ctx.arc(shape.cx, shape.cy, shape.r, 0, Math.PI * 2);
};
return Circle2;
}(Path);
Circle.prototype.type = "circle";
var Circle$1 = Circle;
export { CircleShape, Circle$1 as default };