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

Method renderHull

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

Source from the content-addressed store, hash-verified

8053 return buffer && buffer.value();
8054 }
8055 renderHull(context) {
8056 const buffer = context == null ? context = new Path : undefined;
8057 const {hull, points} = this;
8058 const h = hull[0] * 2, n = hull.length;
8059 context.moveTo(points[h], points[h + 1]);
8060 for (let i = 1; i < n; ++i) {
8061 const h = 2 * hull[i];
8062 context.lineTo(points[h], points[h + 1]);
8063 }
8064 context.closePath();
8065 return buffer && buffer.value();
8066 }
8067 hullPolygon() {
8068 const polygon = new Polygon;
8069 this.renderHull(polygon);

Callers 3

renderMethod · 0.95
hullPolygonMethod · 0.95
_renderMethod · 0.80

Calls 4

moveToMethod · 0.45
lineToMethod · 0.45
closePathMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected