MCPcopy Index your code
hub / github.com/microsoft/SandDance / box

Function box

packages/vega-deck.gl/src/marks/rule.ts:49–61  ·  view source on GitHub ↗
(gx: number, gy: number, height: number, width: number, stroke: string, strokeWidth: number, diagonals = false)

Source from the content-addressed store, hash-verified

47}
48
49export function box(gx: number, gy: number, height: number, width: number, stroke: string, strokeWidth: number, diagonals = false) {
50 const lines = [
51 styledLine(gx, gy, gx + width, gy, stroke, strokeWidth),
52 styledLine(gx + width, gy, gx + width, gy + height, stroke, strokeWidth),
53 styledLine(gx + width, gy + height, gx, gy + height, stroke, strokeWidth),
54 styledLine(gx, gy + height, gx, gy, stroke, strokeWidth),
55 ];
56 if (diagonals) {
57 lines.push(styledLine(gx, gy, gx + width, gy + height, stroke, strokeWidth));
58 lines.push(styledLine(gx, gy + height, gx + width, gy, stroke, strokeWidth));
59 }
60 return lines;
61}
62
63export default markStager;

Callers 2

groupFunction · 0.90
setDeckPropsMethod · 0.90

Calls 1

styledLineFunction · 0.70

Tested by

no test coverage detected