Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions src/graphic/shape/Circle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,9 @@ class Circle extends Path<CircleProps> {
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();
}
};

Expand Down