MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / drawCircles

Function drawCircles

libraries/p5.js:2040–2050  ·  view source on GitHub ↗
(l, x, y, scale)

Source from the content-addressed store, hash-verified

2038Glyph.prototype.drawPoints = function(ctx, x, y, fontSize) {
2039
2040 function drawCircles(l, x, y, scale) {
2041 var PI_SQ = Math.PI * 2;
2042 ctx.beginPath();
2043 for (var j = 0; j < l.length; j += 1) {
2044 ctx.moveTo(x + (l[j].x * scale), y + (l[j].y * scale));
2045 ctx.arc(x + (l[j].x * scale), y + (l[j].y * scale), 2, 0, PI_SQ, false);
2046 }
2047
2048 ctx.closePath();
2049 ctx.fill();
2050 }
2051
2052 x = x !== undefined ? x : 0;
2053 y = y !== undefined ? y : 0;

Callers 1

p5.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected