diff --git a/src/graphic/shape/Circle.ts b/src/graphic/shape/Circle.ts index dd7508087..00adccf11 100644 --- a/src/graphic/shape/Circle.ts +++ b/src/graphic/shape/Circle.ts @@ -25,20 +25,9 @@ class Circle extends Path { return new CircleShape(); } - buildPath(ctx: CanvasRenderingContext2D, shape: CircleShape, inBundle: boolean) { - // Better stroking in ShapeBundle - // Always do it may have performence issue ( fill may be 2x more cost) - if (inBundle) { - ctx.moveTo(shape.cx + shape.r, shape.cy); - } - // else { - // if (ctx.allocate && !ctx.data.length) { - // ctx.allocate(ctx.CMD_MEM_SIZE.A); - // } - // } - // Better stroking in ShapeBundle - // ctx.moveTo(shape.cx + shape.r, shape.cy); + buildPath(ctx: CanvasRenderingContext2D, shape: CircleShape) { ctx.arc(shape.cx, shape.cy, shape.r, 0, Math.PI * 2); + ctx.closePath(); } };