lazy-widgets
Version:
Typescript retained mode GUI for the HTML canvas API
14 lines • 398 B
JavaScript
const TAU = Math.PI * 2;
/**
* Painting utility: paints a circle. Coordinates are relative to the center of
* the circle. Uses ctx's current fillStyle. Does not restore the context state
* after finishing.
*
* @category Helper
*/
export function paintCircle(ctx, x, y, radius) {
ctx.beginPath();
ctx.arc(x, y, radius, 0, TAU);
ctx.fill();
}
//# sourceMappingURL=paintCircle.js.map