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

Function path

docs/app/js/sanddance-app.js:122794–122807  ·  view source on GitHub ↗
(context46, item, opacity)

Source from the content-addressed store, hash-verified

122792 return boundStroke(bounds13.set(x1 = item.x || 0, y1 = item.y || 0, item.x2 != null ? item.x2 : x1, item.y2 != null ? item.y2 : y1), item);
122793}
122794function path(context46, item, opacity) {
122795 var x1, y1, x2, y2;
122796 if (item.stroke && stroke(context46, item, opacity)) {
122797 x1 = item.x || 0;
122798 y1 = item.y || 0;
122799 x2 = item.x2 != null ? item.x2 : x1;
122800 y2 = item.y2 != null ? item.y2 : y1;
122801 context46.beginPath();
122802 context46.moveTo(x1, y1);
122803 context46.lineTo(x2, y2);
122804 return true;
122805 }
122806 return false;
122807}
122808function draw$1(context47, scene, bounds14) {
122809 visit(scene, (item)=>{
122810 if (bounds14 && !bounds14.intersects(item.bounds)) return; // bounds check

Callers 4

draw$1Function · 0.70
hit$1Function · 0.70
transformFunction · 0.70
shapeGeneratorFunction · 0.70

Calls 3

strokeFunction · 0.70
moveToMethod · 0.45
lineToMethod · 0.45

Tested by

no test coverage detected