Skip to content

Commit dd8165d

Browse files
author
lauren mccarthy
committed
fixing bug with drawing circle
1 parent ccc84b2 commit dd8165d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/p5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3937,7 +3937,7 @@ var shape2d_primitives = function (require, core, canvas, constants) {
39373937
var vals = canvas.modeAdjust(x, y, w, h, this._ellipseMode);
39383938
ctx.beginPath();
39393939
if (w === h) {
3940-
ctx.arc(vals.x, vals.y, vals.w / 2, 0, 2 * Math.PI, false);
3940+
ctx.arc(vals.x + vals.w / 2, vals.y + vals.w / 2, vals.w / 2, 0, 2 * Math.PI, false);
39413941
} else {
39423942
var kappa = 0.5522848, ox = vals.w / 2 * kappa, oy = vals.h / 2 * kappa, xe = vals.x + vals.w, ye = vals.y + vals.h, xm = vals.x + vals.w / 2, ym = vals.y + vals.h / 2;
39433943
ctx.moveTo(vals.x, ym);

0 commit comments

Comments
 (0)