class CurveArc {
constructor(context) {
this._context = context;
}
lineStart() {
this._index = 0;
this._context.moveTo(0, 50);
this._context.lineTo(100 - 5, 50);
this._context.arcTo(100, 50, 100, 50 + 5, 5);
this._context.lineTo(100, 100 - 5);
this._context.arcTo(100, 100, 100 + 5, 100, 5);
this._context.lineTo(200, 100);
}
lineEnd() {}
point(x, y) {
x = +x, y = +y;
if (this._index === 0) {
this._context.moveTo(x, y);
} else if (this.index === 1) {
}
else {
const dx = Math.sign(x - this._x0) * 5
const dy = Math.sign(y - this._y0) * 5
this.dx0 = dx;
this.dy0 = dy;
}
this._x0 = x;
this._y0 = y;
this._index += 1;
}
}