MCPcopy Create free account
hub / github.com/alignoth/alignoth / renderCell

Method renderCell

resources/vega.min.js:25275–25286  ·  view source on GitHub ↗
(t, e)

Source from the content-addressed store, hash-verified

25273 );
25274 }
25275 renderCell(t, e) {
25276 const n = null == e ? (e = new JF()) : void 0,
25277 r = this._clip(t);
25278 if (null === r || !r.length) return;
25279 e.moveTo(r[0], r[1]);
25280 let i = r.length;
25281 for (; r[0] === r[i - 2] && r[1] === r[i - 1] && i > 1; ) i -= 2;
25282 for (let t = 2; t < i; t += 2)
25283 (r[t] === r[t - 2] && r[t + 1] === r[t - 1]) ||
25284 e.lineTo(r[t], r[t + 1]);
25285 return (e.closePath(), n && n.value());
25286 }
25287 *cellPolygons() {
25288 const {
25289 delaunay: { points: t },

Callers 1

cellPolygonMethod · 0.80

Calls 5

_clipMethod · 0.80
moveToMethod · 0.45
lineToMethod · 0.45
closePathMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected