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

Method render

external/.d3.js:8029–8042  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

8027 return c;
8028 }
8029 render(context) {
8030 const buffer = context == null ? context = new Path : undefined;
8031 const {points, halfedges, triangles} = this;
8032 for (let i = 0, n = halfedges.length; i < n; ++i) {
8033 const j = halfedges[i];
8034 if (j < i) continue;
8035 const ti = triangles[i] * 2;
8036 const tj = triangles[j] * 2;
8037 context.moveTo(points[ti], points[ti + 1]);
8038 context.lineTo(points[tj], points[tj + 1]);
8039 }
8040 this.renderHull(context);
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;

Callers

nothing calls this directly

Calls 4

renderHullMethod · 0.95
moveToMethod · 0.45
lineToMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected