MCPcopy Create free account
hub / github.com/breck7/scroll / renderPoints

Method renderPoints

external/.d3.js:8043–8054  ·  view source on GitHub ↗
(context, r)

Source from the content-addressed store, hash-verified

8041 return buffer && buffer.value();
8042 }
8043 renderPoints(context, r) {
8044 if (r === undefined && (!context || typeof context.moveTo !== "function")) r = context, context = null;
8045 r = r == undefined ? 2 : +r;
8046 const buffer = context == null ? context = new Path : undefined;
8047 const {points} = this;
8048 for (let i = 0, n = points.length; i < n; i += 2) {
8049 const x = points[i], y = points[i + 1];
8050 context.moveTo(x + r, y);
8051 context.arc(x, y, r, 0, tau$2);
8052 }
8053 return buffer && buffer.value();
8054 }
8055 renderHull(context) {
8056 const buffer = context == null ? context = new Path : undefined;
8057 const {hull, points} = this;

Callers

nothing calls this directly

Calls 3

arcMethod · 0.80
moveToMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected