MCPcopy Create free account
hub / github.com/d3/d3-shape / rect

Function rect

test/polygonContext.js:9–9  ·  view source on GitHub ↗
(x, y, w, h)

Source from the content-addressed store, hash-verified

7 moveTo(x, y) { this.points = [[x, y]]; },
8 lineTo(x, y) { this.points.push([x, y]); },
9 rect(x, y, w, h) { this.points = [[x, y], [x + w, y], [x + w, y + h], [x, y + h]]; },
10 closePath() {}
11 };
12}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected